diff options
author | Dave Airlie <airlied@redhat.com> | 2017-05-18 20:20:53 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2017-05-18 20:20:53 -0400 |
commit | 6de92ab875c201553a7c48e131d99fc78406a197 (patch) | |
tree | 8b8273bbcf84975fb4f80434357bc1ddf3d4b848 | |
parent | 389cf7080c062eb5fae525858d2e70aea0422d89 (diff) | |
parent | 6bee9b78a7a5ea257b24d93974538938c82b1169 (diff) |
Merge tag 'drm-misc-fixes-2017-05-18' of git://anongit.freedesktop.org/git/drm-misc into drm-fixes
Driver Changes:
- host1x: Fix link error when host1x is built-in and iova is a module (Arnd)
- hlcdc: Fix arguments passed to drm_of_find_panel_or_bridge (Boris)
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
* tag 'drm-misc-fixes-2017-05-18' of git://anongit.freedesktop.org/git/drm-misc:
drm/atmel-hlcdc: Fix output initialization
gpu: host1x: select IOMMU_IOVA
-rw-r--r-- | drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 36 | ||||
-rw-r--r-- | drivers/gpu/host1x/Kconfig | 1 |
2 files changed, 15 insertions, 22 deletions
diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c index 65a3bd7a0c00..423dda2785d4 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | |||
@@ -152,8 +152,7 @@ static const struct drm_connector_funcs atmel_hlcdc_panel_connector_funcs = { | |||
152 | .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, | 152 | .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, |
153 | }; | 153 | }; |
154 | 154 | ||
155 | static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, | 155 | static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, int endpoint) |
156 | const struct device_node *np) | ||
157 | { | 156 | { |
158 | struct atmel_hlcdc_dc *dc = dev->dev_private; | 157 | struct atmel_hlcdc_dc *dc = dev->dev_private; |
159 | struct atmel_hlcdc_rgb_output *output; | 158 | struct atmel_hlcdc_rgb_output *output; |
@@ -161,6 +160,11 @@ static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, | |||
161 | struct drm_bridge *bridge; | 160 | struct drm_bridge *bridge; |
162 | int ret; | 161 | int ret; |
163 | 162 | ||
163 | ret = drm_of_find_panel_or_bridge(dev->dev->of_node, 0, endpoint, | ||
164 | &panel, &bridge); | ||
165 | if (ret) | ||
166 | return ret; | ||
167 | |||
164 | output = devm_kzalloc(dev->dev, sizeof(*output), GFP_KERNEL); | 168 | output = devm_kzalloc(dev->dev, sizeof(*output), GFP_KERNEL); |
165 | if (!output) | 169 | if (!output) |
166 | return -EINVAL; | 170 | return -EINVAL; |
@@ -177,10 +181,6 @@ static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, | |||
177 | 181 | ||
178 | output->encoder.possible_crtcs = 0x1; | 182 | output->encoder.possible_crtcs = 0x1; |
179 | 183 | ||
180 | ret = drm_of_find_panel_or_bridge(np, 0, 0, &panel, &bridge); | ||
181 | if (ret) | ||
182 | return ret; | ||
183 | |||
184 | if (panel) { | 184 | if (panel) { |
185 | output->connector.dpms = DRM_MODE_DPMS_OFF; | 185 | output->connector.dpms = DRM_MODE_DPMS_OFF; |
186 | output->connector.polled = DRM_CONNECTOR_POLL_CONNECT; | 186 | output->connector.polled = DRM_CONNECTOR_POLL_CONNECT; |
@@ -220,22 +220,14 @@ err_encoder_cleanup: | |||
220 | 220 | ||
221 | int atmel_hlcdc_create_outputs(struct drm_device *dev) | 221 | int atmel_hlcdc_create_outputs(struct drm_device *dev) |
222 | { | 222 | { |
223 | struct device_node *remote; | 223 | int endpoint, ret = 0; |
224 | int ret = -ENODEV; | 224 | |
225 | int endpoint = 0; | 225 | for (endpoint = 0; !ret; endpoint++) |
226 | 226 | ret = atmel_hlcdc_attach_endpoint(dev, endpoint); | |
227 | while (true) { | 227 | |
228 | /* Loop thru possible multiple connections to the output */ | 228 | /* At least one device was successfully attached.*/ |
229 | remote = of_graph_get_remote_node(dev->dev->of_node, 0, | 229 | if (ret == -ENODEV && endpoint) |
230 | endpoint++); | 230 | return 0; |
231 | if (!remote) | ||
232 | break; | ||
233 | |||
234 | ret = atmel_hlcdc_attach_endpoint(dev, remote); | ||
235 | of_node_put(remote); | ||
236 | if (ret) | ||
237 | return ret; | ||
238 | } | ||
239 | 231 | ||
240 | return ret; | 232 | return ret; |
241 | } | 233 | } |
diff --git a/drivers/gpu/host1x/Kconfig b/drivers/gpu/host1x/Kconfig index b2fd029d67b3..91916326957f 100644 --- a/drivers/gpu/host1x/Kconfig +++ b/drivers/gpu/host1x/Kconfig | |||
@@ -1,6 +1,7 @@ | |||
1 | config TEGRA_HOST1X | 1 | config TEGRA_HOST1X |
2 | tristate "NVIDIA Tegra host1x driver" | 2 | tristate "NVIDIA Tegra host1x driver" |
3 | depends on ARCH_TEGRA || (ARM && COMPILE_TEST) | 3 | depends on ARCH_TEGRA || (ARM && COMPILE_TEST) |
4 | select IOMMU_IOVA if IOMMU_SUPPORT | ||
4 | help | 5 | help |
5 | Driver for the NVIDIA Tegra host1x hardware. | 6 | Driver for the NVIDIA Tegra host1x hardware. |
6 | 7 | ||