From: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
To: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
dri-devel@lists.freedesktop.org
Cc: linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH 2/3] drm: rcar-du: Reject planes located fully off-screen
Date: Wed, 27 Sep 2017 19:58:42 +0100 [thread overview]
Message-ID: <b2179a21-51aa-e973-73de-fd657ecfedb5@ideasonboard.com> (raw)
In-Reply-To: <20170815230338.14913-3-laurent.pinchart+renesas@ideasonboard.com>
Hi Laurent,
Thankyou for the patch,
This looks good, and passes the tests.
On 16/08/17 00:03, Laurent Pinchart wrote:
> There is no point in accepting fully off-screen planes as they won't be
> displayed. Reject them in the atomic check.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> ---
> drivers/gpu/drm/rcar-du/rcar_du_plane.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_plane.c b/drivers/gpu/drm/rcar-du/rcar_du_plane.c
> index 4f076c364f25..714e02960635 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_plane.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_plane.c
> @@ -569,6 +569,8 @@ int __rcar_du_plane_atomic_check(struct drm_plane *plane,
> struct drm_plane_state *state,
> const struct rcar_du_format_info **format)
> {
> + const struct drm_display_mode *mode;
> + struct drm_crtc_state *crtc_state;
> struct drm_device *dev = plane->dev;
>
> if (!state->fb || !state->crtc) {
> @@ -582,6 +584,20 @@ int __rcar_du_plane_atomic_check(struct drm_plane *plane,
> return -EINVAL;
> }
>
> + crtc_state = drm_atomic_get_crtc_state(state->state, state->crtc);
> + if (IS_ERR(crtc_state))
> + return PTR_ERR(crtc_state);
> +
> + mode = &crtc_state->adjusted_mode;
> + if (state->crtc_x >= mode->hdisplay ||
> + state->crtc_y >= mode->vdisplay ||
> + state->crtc_x + (int)state->crtc_w <= 0 ||
> + state->crtc_y + (int)state->crtc_h <= 0) {
> + dev_dbg(dev->dev, "%s: plane can't be fully off-screen\n",
> + __func__);
> + return -EINVAL;
> + }
> +
> *format = rcar_du_format_info(state->fb->format->format);
> if (*format == NULL) {
> dev_dbg(dev->dev, "%s: unsupported format %08x\n", __func__,
>
next prev parent reply other threads:[~2017-09-27 18:58 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-15 23:03 [PATCH 0/3] R-Car DU: Clip planes to screen boundaries Laurent Pinchart
2017-08-15 23:03 ` [PATCH 1/3] drm: rcar-du: Share plane atomic check code between Gen2 and Gen3 Laurent Pinchart
2017-09-25 17:32 ` Kieran Bingham
2017-09-25 17:37 ` Kieran Bingham
2017-09-25 17:39 ` Kieran Bingham
2017-08-15 23:03 ` [PATCH 2/3] drm: rcar-du: Reject planes located fully off-screen Laurent Pinchart
2017-09-27 18:58 ` Kieran Bingham [this message]
2017-09-28 7:10 ` Daniel Vetter
2017-09-28 7:10 ` Daniel Vetter
2017-09-28 9:16 ` Laurent Pinchart
2017-09-28 9:27 ` Daniel Vetter
2017-09-28 9:27 ` Daniel Vetter
2017-08-15 23:03 ` [PATCH 3/3] drm: rcar-du: Clip planes to screen boundaries Laurent Pinchart
2017-08-15 23:03 ` Laurent Pinchart
2017-09-27 18:58 ` Kieran Bingham
2017-09-27 18:58 ` Kieran Bingham
2017-09-25 17:27 ` [PATCH 0/3] R-Car DU: " Kieran Bingham
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b2179a21-51aa-e973-73de-fd657ecfedb5@ideasonboard.com \
--to=kieran.bingham+renesas@ideasonboard.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kieran.bingham@ideasonboard.com \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-renesas-soc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.