[Intel-gfx] [PATCH] drm/i915: Clamp cursor coordinates to int16_t range
Ville Syrjälä
ville.syrjala at linux.intel.com
Mon Oct 21 18:24:39 CEST 2013
On Mon, Oct 21, 2013 at 06:15:06PM +0200, Daniel Vetter wrote:
> On Mon, Oct 21, 2013 at 6:01 PM, <ville.syrjala at linux.intel.com> wrote:
> > From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> >
> > We store cursor_x/y as int16_t internally, but the user provided
> > coordinates are int32_t. Clamp the coordinates so that they don't
> > overflow the int16_t. Since the cursor is only 64x64 in size, the
> > clamping can't cause any visual changes.
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
>
> For shits&giggles: You've bothered with a subtest for this in your crc
> cursor test? Should be a one-liner and would neatly test whether QA
> catches it ...
Yeah it's there. Actually I added the test before I knew the bug
existed. The test is what found the bug for me.
It's not a specific subtest though, but part of all the bigger
cursor-offscreen subtests. The subtest split I'm using there isn't
very fine grained. Maybe I should change that actually. It would
help in pinpointing the failing cases more accurately.
--
Ville Syrjälä
Intel OTC
More information about the Intel-gfx
mailing list