All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: Ying Liu <gnuiyl@gmail.com>
Cc: kernel@pengutronix.de, DRI Development <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 10/10] drm/imx: ipuv3-plane: use drm_plane_helper_check_state, clipped coordinates
Date: Fri, 21 Oct 2016 10:18:22 +0200	[thread overview]
Message-ID: <1477037902.2508.5.camel@pengutronix.de> (raw)
In-Reply-To: <CAOcKUNWCgqMt666u6o3ueq+1+nnd0G0hViWh_4J-E2O9RtJLaw@mail.gmail.com>

Am Freitag, den 21.10.2016, 13:45 +0800 schrieb Ying Liu:
> On Thu, Oct 20, 2016 at 9:29 PM, Philipp Zabel <p.zabel@pengutronix.de> wrote:
> > Am Donnerstag, den 20.10.2016, 16:51 +0800 schrieb Ying Liu:
> >> >> Does the clip thing potentially change the user's request by force?
> >> >> For example, the user request an unreasonable big resolution.
> >> >
> >> > The user is allowed to ask for destination coordinates extending outside
> >> > the crtc dimensions. This will chop off the parts that aren't visible,
> >> > and it will chop off the corresponding areas of the source as well.
> >>
> >> How about returning -EINVAL in this case which stands for
> >> an atomic check failure?
> >
> > Say the user requests to display a 640x480+0,0 source framebuffer at
> > destination offset -320,0 on a 320x240 screen, unscaled. The expectation
> > would be to see the upper right quarter of the framebuffer on the
> > screen, at least if the hardware was actually able to position overlays
> > partially offscreen.
> > If we can also fulfill that expectation by clipping the source rectangle
> > to 320,240+320,0 and changing the destination rectangle to 320x240+0,0,
> > why should -EINVAL be returned?
> 
> Well, IIUC, there are two kinds of clipping.
> 1) Clipping a rectangle from a fb according to src_x/y and src_w/h.
> 2) Clipping done by drm_plane_helper_check_state(), which potentially
>     changes src/dst->x1/2 and src/dst->y1/2(in other words, src_x/y,
>     src_w/h and crtc_x/y/w/h, though not directly).
> 
> 1) is fine, no problem.
> I doubt 2) is wrong as the users' original request could be changed.
> That's why I mentioned returning -EINVAL.
> 
> Moreover, before and after applying the patch, I think the
> ->atomic_check behavior consistency is broken. For example,
> negative crtc_x or crtc_y for overlay are changed from unacceptable
> to potentially acceptable just because 2) may change their equivalent
> dst_>x/y1.

I fail to see what's wrong with 2) as long as we can keep the observable
behaviour exactly the same as if the user request was unchanged.

regards
Philipp

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-10-21  8:18 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-19 10:21 [PATCH 01/10] drm/imx: ipuv3-plane: make sure x/y offsets are even in case of chroma subsampling Philipp Zabel
2016-10-19 10:21 ` [PATCH 02/10] drm/imx: ipuv3-plane: disable local alpha for planes without alpha channel Philipp Zabel
2016-10-19 10:21 ` [PATCH 03/10] drm/imx: ipuv3-plane: request modeset if plane offsets changed Philipp Zabel
2016-10-19 10:21 ` [PATCH 04/10] drm/imx: ipuv3-plane: merge ipu_plane_atomic_set_base into atomic_update Philipp Zabel
2016-10-19 10:21 ` [PATCH 05/10] drm/imx: ipuv3-plane: let drm_plane_state_to_ubo/vbo handle chroma subsampling other than 4:2:0 Philipp Zabel
2016-10-20  6:19   ` Ying Liu
2016-10-19 10:21 ` [PATCH 06/10] gpu: ipu-cpmem: remove unused ipu_cpmem_set_yuv_planar function Philipp Zabel
2016-10-20  6:20   ` Ying Liu
2016-10-19 10:21 ` [PATCH 07/10] gpu: ipu-v3: add YUV 4:4:4 support Philipp Zabel
2016-10-19 10:21 ` [PATCH 08/10] drm/imx: ipuv3-plane: add support for YUV 4:2:2 and 4:4:4, NV12, and NV16 formats Philipp Zabel
2016-10-20  6:21   ` Ying Liu
2016-10-19 10:21 ` [PATCH 09/10] gpu: ipu-v3: initially clear all interrupts Philipp Zabel
2016-10-19 10:21 ` [PATCH 10/10] drm/imx: ipuv3-plane: use drm_plane_helper_check_state, clipped coordinates Philipp Zabel
2016-10-19 10:31   ` Ville Syrjälä
2016-10-19 10:46     ` Philipp Zabel
2016-10-20  7:53   ` Ying Liu
2016-10-20  8:41     ` Ville Syrjälä
2016-10-20  8:51       ` Ying Liu
2016-10-20 13:20         ` Ville Syrjälä
2016-10-20 13:29         ` Philipp Zabel
2016-10-21  5:45           ` Ying Liu
2016-10-21  8:18             ` Philipp Zabel [this message]
2016-10-21  8:49               ` Ying Liu
2016-10-24 11:50                 ` Philipp Zabel
2016-10-25  2:59                   ` Ying Liu
2016-10-20  6:18 ` [PATCH 01/10] drm/imx: ipuv3-plane: make sure x/y offsets are even in case of chroma subsampling Ying Liu

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=1477037902.2508.5.camel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gnuiyl@gmail.com \
    --cc=kernel@pengutronix.de \
    /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.