Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm: rcar-du: Make sure the VSP is initialized on platforms that need it

On Gen3 platforms planes are managed by the external VSP compositor on
behalf of DRM/KMS. If VSP compositor support is not enabled in the DU
driver, the VSP initialization stub routine is called. Return an error
from that stub to fail explicitly, otherwise the device won't be usable
and the driver will crash.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
[Clarified commit message]
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

authored by

Jacopo Mondi and committed by
Laurent Pinchart
31153455 a8fd1223

+1 -1
+1 -1
drivers/gpu/drm/rcar-du/rcar_du_vsp.h
··· 68 68 void rcar_du_vsp_atomic_begin(struct rcar_du_crtc *crtc); 69 69 void rcar_du_vsp_atomic_flush(struct rcar_du_crtc *crtc); 70 70 #else 71 - static inline int rcar_du_vsp_init(struct rcar_du_vsp *vsp) { return 0; }; 71 + static inline int rcar_du_vsp_init(struct rcar_du_vsp *vsp) { return -ENXIO; }; 72 72 static inline void rcar_du_vsp_enable(struct rcar_du_crtc *crtc) { }; 73 73 static inline void rcar_du_vsp_disable(struct rcar_du_crtc *crtc) { }; 74 74 static inline void rcar_du_vsp_atomic_begin(struct rcar_du_crtc *crtc) { };