Re: [PATCH] drm/i915: Clamp cursor coordinates to int16_t range

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 21, 2013 at 05:13:43PM +0100, Chris Wilson wrote:
> On Mon, Oct 21, 2013 at 07:01:58PM +0300, ville.syrjala@xxxxxxxxxxxxxxx wrote:
> > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > 
> > 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.
> 
> EINVAL? That would appear to be a nuisance as we don't already tell the
> user off for being silly with the cursor position.
> 
> Bump the internal range? Future proof against tomorrow's 64k
> super-ultra-high definition monitors?
> 
> The valid range for cursor is currently (-64, 8192) and we don't compute
> relative cursor position, so we will be fine for a few years yet with
> int16_t.
>  
> > Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>

Queued for -next, thanks for the patch.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux