Upgrade to 4.4.50-rt62
[kvmfornfv.git] / kernel / drivers / gpu / drm / imx / imx-drm-core.c
index 7b990b4..5378bdc 100644 (file)
@@ -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);