diff options
Diffstat (limited to 'kernel/drivers/gpu/drm/imx')
-rw-r--r-- | kernel/drivers/gpu/drm/imx/imx-drm-core.c | 8 | ||||
-rw-r--r-- | kernel/drivers/gpu/drm/imx/ipuv3-crtc.c | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/kernel/drivers/gpu/drm/imx/imx-drm-core.c b/kernel/drivers/gpu/drm/imx/imx-drm-core.c index 7b990b4e9..5378bdc3b 100644 --- a/kernel/drivers/gpu/drm/imx/imx-drm-core.c +++ b/kernel/drivers/gpu/drm/imx/imx-drm-core.c @@ -26,6 +26,7 @@ #include <drm/drm_fb_cma_helper.h> #include <drm/drm_plane_helper.h> #include <drm/drm_of.h> +#include <video/imx-ipu-v3.h> #include "imx-drm.h" @@ -504,6 +505,13 @@ static int compare_of(struct device *dev, void *data) { struct device_node *np = data; + /* Special case for DI, dev->of_node may not be set yet */ + if (strcmp(dev->driver->name, "imx-ipuv3-crtc") == 0) { + struct ipu_client_platformdata *pdata = dev->platform_data; + + return pdata->of_node == np; + } + /* Special case for LDB, one device for two channels */ if (of_node_cmp(np->name, "lvds-channel") == 0) { np = of_get_parent(np); diff --git a/kernel/drivers/gpu/drm/imx/ipuv3-crtc.c b/kernel/drivers/gpu/drm/imx/ipuv3-crtc.c index 4ab841eeb..9b0abd44b 100644 --- a/kernel/drivers/gpu/drm/imx/ipuv3-crtc.c +++ b/kernel/drivers/gpu/drm/imx/ipuv3-crtc.c @@ -369,7 +369,7 @@ static int ipu_crtc_init(struct ipu_crtc *ipu_crtc, ret = imx_drm_add_crtc(drm, &ipu_crtc->base, &ipu_crtc->imx_crtc, &ipu_crtc->plane[0]->base, &ipu_crtc_helper_funcs, - ipu_crtc->dev->of_node); + pdata->of_node); if (ret) { dev_err(ipu_crtc->dev, "adding crtc failed with %d.\n", ret); goto err_put_resources; |