diff options
Diffstat (limited to 'drivers/gpu/drm/arm')
-rw-r--r-- | drivers/gpu/drm/arm/Kconfig | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/arm/hdlcd_drv.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/arm/malidp_drv.c | 19 |
3 files changed, 14 insertions, 9 deletions
diff --git a/drivers/gpu/drm/arm/Kconfig b/drivers/gpu/drm/arm/Kconfig index 1b2906568a48..9a18e1bd57b4 100644 --- a/drivers/gpu/drm/arm/Kconfig +++ b/drivers/gpu/drm/arm/Kconfig @@ -9,7 +9,6 @@ config DRM_HDLCD depends on COMMON_CLK select DRM_ARM select DRM_KMS_HELPER - select DRM_KMS_FB_HELPER select DRM_KMS_CMA_HELPER help Choose this option if you have an ARM High Definition Colour LCD diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c index 74279be20b75..d83b46a30327 100644 --- a/drivers/gpu/drm/arm/hdlcd_drv.c +++ b/drivers/gpu/drm/arm/hdlcd_drv.c @@ -102,8 +102,7 @@ static void hdlcd_fb_output_poll_changed(struct drm_device *drm) { struct hdlcd_drm_private *hdlcd = drm->dev_private; - if (hdlcd->fbdev) - drm_fbdev_cma_hotplug_event(hdlcd->fbdev); + drm_fbdev_cma_hotplug_event(hdlcd->fbdev); } static const struct drm_mode_config_funcs hdlcd_mode_config_funcs = { diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c index e5b44e92f8cf..82171d223f2d 100644 --- a/drivers/gpu/drm/arm/malidp_drv.c +++ b/drivers/gpu/drm/arm/malidp_drv.c @@ -257,6 +257,7 @@ static int malidp_bind(struct device *dev) { struct resource *res; struct drm_device *drm; + struct device_node *ep; struct malidp_drm *malidp; struct malidp_hw_device *hwdev; struct platform_device *pdev = to_platform_device(dev); @@ -284,10 +285,8 @@ static int malidp_bind(struct device *dev) res = platform_get_resource(pdev, IORESOURCE_MEM, 0); hwdev->regs = devm_ioremap_resource(dev, res); - if (IS_ERR(hwdev->regs)) { - DRM_ERROR("Failed to map control registers area\n"); + if (IS_ERR(hwdev->regs)) return PTR_ERR(hwdev->regs); - } hwdev->pclk = devm_clk_get(dev, "pclk"); if (IS_ERR(hwdev->pclk)) @@ -360,11 +359,14 @@ static int malidp_bind(struct device *dev) goto register_fail; /* Set the CRTC's port so that the encoder component can find it */ - malidp->crtc.port = of_graph_get_next_endpoint(dev->of_node, NULL); + ep = of_graph_get_next_endpoint(dev->of_node, NULL); + if (!ep) { + ret = -EINVAL; + goto port_fail; + } + malidp->crtc.port = of_get_next_parent(ep); ret = component_bind_all(dev, drm); - of_node_put(malidp->crtc.port); - if (ret) { DRM_ERROR("Failed to bind all components\n"); goto bind_fail; @@ -402,6 +404,9 @@ vblank_fail: irq_init_fail: component_unbind_all(dev, drm); bind_fail: + of_node_put(malidp->crtc.port); + malidp->crtc.port = NULL; +port_fail: drm_dev_unregister(drm); register_fail: malidp_de_planes_destroy(drm); @@ -435,6 +440,8 @@ static void malidp_unbind(struct device *dev) malidp_de_irq_fini(drm); drm_vblank_cleanup(drm); component_unbind_all(dev, drm); + of_node_put(malidp->crtc.port); + malidp->crtc.port = NULL; drm_dev_unregister(drm); malidp_de_planes_destroy(drm); drm_mode_config_cleanup(drm); |