From: Matt Roper <matthew.d.roper@intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 2/6] drm: Refactor setplane to allow internal use (v3)
Date: Thu, 22 May 2014 15:57:31 -0700 [thread overview]
Message-ID: <20140522225731.GS31484@intel.com> (raw)
In-Reply-To: <20140522225129.GQ14357@phenom.ffwll.local>
On Fri, May 23, 2014 at 12:51:29AM +0200, Daniel Vetter wrote:
> On Thu, May 22, 2014 at 03:48:16PM -0700, Matt Roper wrote:
> > On Fri, May 23, 2014 at 12:37:52AM +0200, Daniel Vetter wrote:
> > > On Thu, May 22, 2014 at 6:33 PM, Matt Roper <matthew.d.roper@intel.com> wrote:
> > > > v3:
> > > > - Move integer overflow checking from setplane_internal to setplane
> > > > ioctl. The upcoming legacy cursor support via universal planes needs
> > > > to maintain current cursor ioctl semantics and not return error for
> > > > these extreme values (found via intel-gpu-tools kms_cursor_crc test).
> > >
> > > Imo that's just the test being silly. I think it's valid to reject
> > > such nonsense with -EINVAL and limit the random-walk range of our
> > > testcase a bit. The igt testcases are just guidelines for what our ABI
> > > is, but not the hard rules. And clarifying the ABI in such cases is
> > > imo the right approach.
> > >
> > > That random-walk testcase just was meant to test correctly clamping.
> > > E.g. on hardware with just 12bit for the cursor placement we'd wrap
> > > around and show a cursor again that should be off. So as long as you
> > > still test that you can restrict the range of the test a bit.
> > > -Daniel
> >
> > I was a bit torn on this. Since we accept offscreen plane positions,
> > I'm not sure it makes sense to really treat "offscreen" differently than
> > "really, really offscreen." The legacy cursor ioctls have never cared
> > about this in the past so I didn't want to add in artificial range
> > limiting just because the setplane ioctl has had it for a while.
> >
> > There's actually an i-g-t test that specifically tries to program
> > specifically at INT_MAX (not just the random walk test that might get
> > lucky and go out of bounds), so I figured the best course was just to
> > preserve the current behavior; I can't really see any downsides to not
> > range-limiting the cursors.
>
> Ok, if you think this won't create an unnecessary fuss in the code then
> I'm ok with this, too. After all most hw has limited offset fields, so
> drivers must clamp anyway. So dunno really how much sense that limit check
> makes in set_plane. But we have it, so doesn't hurt too much really.
>
> A different consideration though is that with the igt_kms library the plan
> is to just switch to atomic modeset eventually, which also means using
> universal planes for cursors and primary planes. Which means as soon as we
> do that we'll likely hit that restriction again.
>
> Not sure what to do now here.
> -Daniel
When we switch to atomic modeset in i-g-t, everything will be coming in
via the propertyset interface, right? Since the range limiting check is
in the setplane ioctl code now, I'd expect us to bypass it completely.
Matt
--
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
next prev parent reply other threads:[~2014-05-22 22:56 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-19 23:58 [PATCH 0/6] Cursor support with universal planes (v3) Matt Roper
2014-05-19 23:58 ` [PATCH 1/6] drm: Refactor framebuffer creation to allow internal use (v2) Matt Roper
2014-05-19 23:58 ` [PATCH 2/6] drm: Refactor setplane " Matt Roper
2014-05-22 16:33 ` [PATCH 2/6] drm: Refactor setplane to allow internal use (v3) Matt Roper
2014-05-22 22:37 ` Daniel Vetter
2014-05-22 22:48 ` Matt Roper
2014-05-22 22:51 ` Daniel Vetter
2014-05-22 22:57 ` Matt Roper [this message]
2014-05-23 5:40 ` Daniel Vetter
2014-05-19 23:58 ` [PATCH 3/6] drm: Support legacy cursor ioctls via universal planes when possible (v3) Matt Roper
2014-05-20 7:41 ` Daniel Vetter
2014-05-20 15:02 ` [PATCH 3/6] drm: Support legacy cursor ioctls via universal planes when possible (v4) Matt Roper
2014-05-19 23:58 ` [PATCH 4/6] drm: Allow drivers to register cursor planes with crtc Matt Roper
2014-05-19 23:58 ` [PATCH 5/6] drm/i915: Add intel_crtc_cursor_set_obj() to set cursor buffer (v2) Matt Roper
2014-05-19 23:58 ` [PATCH 6/6] drm/i915: Switch to unified plane cursor handling (v2) Matt Roper
2014-05-22 16:34 ` [PATCH 6/6] drm/i915: Switch to unified plane cursor handling (v3) Matt Roper
2014-05-22 21:00 ` [PATCH 6/6] drm/i915: Switch to unified plane cursor handling (v4) Matt Roper
2014-06-04 10:37 ` G, Pallavi
-- strict thread matches above, loose matches on Subject: below --
2014-06-10 15:28 [PATCH 0/6] Cursor support with universal planes (v4) Matt Roper
2014-06-10 15:28 ` [PATCH 2/6] drm: Refactor setplane to allow internal use (v3) Matt Roper
2014-06-12 9:05 ` G, Pallavi
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=20140522225731.GS31484@intel.com \
--to=matthew.d.roper@intel.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.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.