drm/imx: switch to universal planes
Use drm_universal_plane_init to create the planes, create the primary plane first and use drm_crtc_init_with_planes to associate it with the crtc. This gets rid of the unused fallback primary plane previously created by drm_crtc_init and fixes a NULL pointer dereference issue that can be triggered by a modeset from userspace when fbdev helpers are enabled [1]. [1] https://lkml.org/lkml/2015/11/4/107 Reported-by: Liu Ying <Ying.Liu@freescale.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Liu Ying <Ying.Liu@freescale.com>
This commit is contained in:
@@ -9,6 +9,7 @@ struct drm_display_mode;
|
||||
struct drm_encoder;
|
||||
struct drm_fbdev_cma;
|
||||
struct drm_framebuffer;
|
||||
struct drm_plane;
|
||||
struct imx_drm_crtc;
|
||||
struct platform_device;
|
||||
|
||||
@@ -24,7 +25,7 @@ struct imx_drm_crtc_helper_funcs {
|
||||
};
|
||||
|
||||
int imx_drm_add_crtc(struct drm_device *drm, struct drm_crtc *crtc,
|
||||
struct imx_drm_crtc **new_crtc,
|
||||
struct imx_drm_crtc **new_crtc, struct drm_plane *primary_plane,
|
||||
const struct imx_drm_crtc_helper_funcs *imx_helper_funcs,
|
||||
struct device_node *port);
|
||||
int imx_drm_remove_crtc(struct imx_drm_crtc *);
|
||||
|
Reference in New Issue
Block a user