* [PATCH] drm: rcar-du: Make sure planes are created by VSP
@ 2017-03-03 12:58 Jacopo Mondi
2017-03-03 14:37 ` Laurent Pinchart
0 siblings, 1 reply; 2+ messages in thread
From: Jacopo Mondi @ 2017-03-03 12:58 UTC (permalink / raw)
To: laurent.pinchart; +Cc: dri-devel, linux-renesas-soc
On Gen3 platforms compositing planes are allocated by VSP on behalf of
DRM/KMS.
If VSP support is not compiled in, vsp initialization stub routine is
called. Return an error from that stub to fail explicitly, otherwise
accessing planes leads to invalid memory errors.
Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
---
drivers/gpu/drm/rcar-du/rcar_du_vsp.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.h b/drivers/gpu/drm/rcar-du/rcar_du_vsp.h
index 510dcc9..f1d0f18 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.h
+++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.h
@@ -68,7 +68,7 @@ void rcar_du_vsp_disable(struct rcar_du_crtc *crtc);
void rcar_du_vsp_atomic_begin(struct rcar_du_crtc *crtc);
void rcar_du_vsp_atomic_flush(struct rcar_du_crtc *crtc);
#else
-static inline int rcar_du_vsp_init(struct rcar_du_vsp *vsp) { return 0; };
+static inline int rcar_du_vsp_init(struct rcar_du_vsp *vsp) { return -ENXIO; };
static inline void rcar_du_vsp_enable(struct rcar_du_crtc *crtc) { };
static inline void rcar_du_vsp_disable(struct rcar_du_crtc *crtc) { };
static inline void rcar_du_vsp_atomic_begin(struct rcar_du_crtc *crtc) { };
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] drm: rcar-du: Make sure planes are created by VSP
2017-03-03 12:58 [PATCH] drm: rcar-du: Make sure planes are created by VSP Jacopo Mondi
@ 2017-03-03 14:37 ` Laurent Pinchart
0 siblings, 0 replies; 2+ messages in thread
From: Laurent Pinchart @ 2017-03-03 14:37 UTC (permalink / raw)
To: Jacopo Mondi; +Cc: dri-devel, linux-renesas-soc
Hi Jacopo,
Thank you for the patch.
On Friday 03 Mar 2017 13:58:56 Jacopo Mondi wrote:
> On Gen3 platforms compositing planes are allocated by VSP on behalf of
> DRM/KMS.
> If VSP support is not compiled in, vsp initialization stub routine is
> called. Return an error from that stub to fail explicitly, otherwise
> accessing planes leads to invalid memory errors.
I'll rephrase this to talk about "VSP compositor support in the DU driver", as
"VSP support" is ambiguous and could mean the VSP driver. Apart from that,
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
No need to resubmit, I'll fix the commit message when applying.
> Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
> ---
> drivers/gpu/drm/rcar-du/rcar_du_vsp.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.h
> b/drivers/gpu/drm/rcar-du/rcar_du_vsp.h index 510dcc9..f1d0f18 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.h
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.h
> @@ -68,7 +68,7 @@ void rcar_du_vsp_disable(struct rcar_du_crtc *crtc);
> void rcar_du_vsp_atomic_begin(struct rcar_du_crtc *crtc);
> void rcar_du_vsp_atomic_flush(struct rcar_du_crtc *crtc);
> #else
> -static inline int rcar_du_vsp_init(struct rcar_du_vsp *vsp) { return 0; };
> +static inline int rcar_du_vsp_init(struct rcar_du_vsp *vsp) { return
> -ENXIO; }; static inline void rcar_du_vsp_enable(struct rcar_du_crtc *crtc)
> { }; static inline void rcar_du_vsp_disable(struct rcar_du_crtc *crtc) { };
> static inline void rcar_du_vsp_atomic_begin(struct rcar_du_crtc *crtc) { };
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-03 14:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-03 12:58 [PATCH] drm: rcar-du: Make sure planes are created by VSP Jacopo Mondi
2017-03-03 14:37 ` Laurent Pinchart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox