Commit 6de92ab8 authored by Dave Airlie's avatar Dave Airlie

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
parents 389cf708 6bee9b78
...@@ -152,8 +152,7 @@ static const struct drm_connector_funcs atmel_hlcdc_panel_connector_funcs = { ...@@ -152,8 +152,7 @@ static const struct drm_connector_funcs atmel_hlcdc_panel_connector_funcs = {
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
}; };
static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, int endpoint)
const struct device_node *np)
{ {
struct atmel_hlcdc_dc *dc = dev->dev_private; struct atmel_hlcdc_dc *dc = dev->dev_private;
struct atmel_hlcdc_rgb_output *output; struct atmel_hlcdc_rgb_output *output;
...@@ -161,6 +160,11 @@ static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, ...@@ -161,6 +160,11 @@ static int atmel_hlcdc_attach_endpoint(struct drm_device *dev,
struct drm_bridge *bridge; struct drm_bridge *bridge;
int ret; int ret;
ret = drm_of_find_panel_or_bridge(dev->dev->of_node, 0, endpoint,
&panel, &bridge);
if (ret)
return ret;
output = devm_kzalloc(dev->dev, sizeof(*output), GFP_KERNEL); output = devm_kzalloc(dev->dev, sizeof(*output), GFP_KERNEL);
if (!output) if (!output)
return -EINVAL; return -EINVAL;
...@@ -177,10 +181,6 @@ static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, ...@@ -177,10 +181,6 @@ static int atmel_hlcdc_attach_endpoint(struct drm_device *dev,
output->encoder.possible_crtcs = 0x1; output->encoder.possible_crtcs = 0x1;
ret = drm_of_find_panel_or_bridge(np, 0, 0, &panel, &bridge);
if (ret)
return ret;
if (panel) { if (panel) {
output->connector.dpms = DRM_MODE_DPMS_OFF; output->connector.dpms = DRM_MODE_DPMS_OFF;
output->connector.polled = DRM_CONNECTOR_POLL_CONNECT; output->connector.polled = DRM_CONNECTOR_POLL_CONNECT;
...@@ -220,22 +220,14 @@ static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, ...@@ -220,22 +220,14 @@ static int atmel_hlcdc_attach_endpoint(struct drm_device *dev,
int atmel_hlcdc_create_outputs(struct drm_device *dev) int atmel_hlcdc_create_outputs(struct drm_device *dev)
{ {
struct device_node *remote; int endpoint, ret = 0;
int ret = -ENODEV;
int endpoint = 0; for (endpoint = 0; !ret; endpoint++)
ret = atmel_hlcdc_attach_endpoint(dev, endpoint);
while (true) {
/* Loop thru possible multiple connections to the output */ /* At least one device was successfully attached.*/
remote = of_graph_get_remote_node(dev->dev->of_node, 0, if (ret == -ENODEV && endpoint)
endpoint++); return 0;
if (!remote)
break;
ret = atmel_hlcdc_attach_endpoint(dev, remote);
of_node_put(remote);
if (ret)
return ret;
}
return ret; return ret;
} }
config TEGRA_HOST1X config TEGRA_HOST1X
tristate "NVIDIA Tegra host1x driver" tristate "NVIDIA Tegra host1x driver"
depends on ARCH_TEGRA || (ARM && COMPILE_TEST) depends on ARCH_TEGRA || (ARM && COMPILE_TEST)
select IOMMU_IOVA if IOMMU_SUPPORT
help help
Driver for the NVIDIA Tegra host1x hardware. Driver for the NVIDIA Tegra host1x hardware.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment