diff options
| author | Dave Airlie <airlied@redhat.com> | 2016-05-24 22:36:20 -0400 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2016-05-24 22:36:20 -0400 |
| commit | e411295e3ec0b470795a860ec3cc51edf64407c4 (patch) | |
| tree | 4b11ca203f8a64205eff9559255431abae97a707 /drivers/gpu/drm/imx | |
| parent | 92181d47ee74749bdf902f080dab9fa9ef44b37f (diff) | |
| parent | 310944d148e3600dcff8b346bee7fa01d34903b1 (diff) | |
Merge tag 'imx-drm-fixes-2016-05-24' of git://git.pengutronix.de/git/pza/linux into drm-next
imx-drm probing fix
Commit 950b410dd1ab ("gpu: ipu-v3: Fix imx-ipuv3-crtc module autoloading")
broke probing of the imx-drm driver in the non-modular case because the
unset dev->of_node during probing of imx-ipuv3-crtc would cause the
component matching to fail. This patch patch instead matches against
an of_node pointer stored in platform data, allowing dev->of_node to
be left unset for the platform probed imx-ipuv3-crtc devices.
* tag 'imx-drm-fixes-2016-05-24' of git://git.pengutronix.de/git/pza/linux:
drm/imx: Match imx-ipuv3-crtc components using device node in platform data
Diffstat (limited to 'drivers/gpu/drm/imx')
| -rw-r--r-- | drivers/gpu/drm/imx/imx-drm-core.c | 8 | ||||
| -rw-r--r-- | drivers/gpu/drm/imx/ipuv3-crtc.c | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/drm/imx/imx-drm-core.c b/drivers/gpu/drm/imx/imx-drm-core.c index 1080019e7b17..1f14b602882b 100644 --- a/drivers/gpu/drm/imx/imx-drm-core.c +++ b/drivers/gpu/drm/imx/imx-drm-core.c | |||
| @@ -25,6 +25,7 @@ | |||
| 25 | #include <drm/drm_fb_cma_helper.h> | 25 | #include <drm/drm_fb_cma_helper.h> |
| 26 | #include <drm/drm_plane_helper.h> | 26 | #include <drm/drm_plane_helper.h> |
| 27 | #include <drm/drm_of.h> | 27 | #include <drm/drm_of.h> |
| 28 | #include <video/imx-ipu-v3.h> | ||
| 28 | 29 | ||
| 29 | #include "imx-drm.h" | 30 | #include "imx-drm.h" |
| 30 | 31 | ||
| @@ -437,6 +438,13 @@ static int compare_of(struct device *dev, void *data) | |||
| 437 | { | 438 | { |
| 438 | struct device_node *np = data; | 439 | struct device_node *np = data; |
| 439 | 440 | ||
| 441 | /* Special case for DI, dev->of_node may not be set yet */ | ||
| 442 | if (strcmp(dev->driver->name, "imx-ipuv3-crtc") == 0) { | ||
| 443 | struct ipu_client_platformdata *pdata = dev->platform_data; | ||
| 444 | |||
| 445 | return pdata->of_node == np; | ||
| 446 | } | ||
| 447 | |||
| 440 | /* Special case for LDB, one device for two channels */ | 448 | /* Special case for LDB, one device for two channels */ |
| 441 | if (of_node_cmp(np->name, "lvds-channel") == 0) { | 449 | if (of_node_cmp(np->name, "lvds-channel") == 0) { |
| 442 | np = of_get_parent(np); | 450 | np = of_get_parent(np); |
diff --git a/drivers/gpu/drm/imx/ipuv3-crtc.c b/drivers/gpu/drm/imx/ipuv3-crtc.c index dee8e8b3523b..b2c30b8d9816 100644 --- a/drivers/gpu/drm/imx/ipuv3-crtc.c +++ b/drivers/gpu/drm/imx/ipuv3-crtc.c | |||
| @@ -473,7 +473,7 @@ static int ipu_crtc_init(struct ipu_crtc *ipu_crtc, | |||
| 473 | 473 | ||
| 474 | ret = imx_drm_add_crtc(drm, &ipu_crtc->base, &ipu_crtc->imx_crtc, | 474 | ret = imx_drm_add_crtc(drm, &ipu_crtc->base, &ipu_crtc->imx_crtc, |
| 475 | &ipu_crtc->plane[0]->base, &ipu_crtc_helper_funcs, | 475 | &ipu_crtc->plane[0]->base, &ipu_crtc_helper_funcs, |
| 476 | ipu_crtc->dev->of_node); | 476 | pdata->of_node); |
| 477 | if (ret) { | 477 | if (ret) { |
| 478 | dev_err(ipu_crtc->dev, "adding crtc failed with %d.\n", ret); | 478 | dev_err(ipu_crtc->dev, "adding crtc failed with %d.\n", ret); |
| 479 | goto err_put_resources; | 479 | goto err_put_resources; |
