public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	ville.syrjala@linux.intel.com, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Clamp cursor coordinates to int16_t range
Date: Mon, 28 Oct 2013 18:01:09 +0100	[thread overview]
Message-ID: <20131028170109.GR18189@phenom.ffwll.local> (raw)
In-Reply-To: <20131021161343.GA6083@nuc-i3427.alporthouse.com>

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@linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala@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.
> 
> 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@linux.intel.com>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Queued for -next, thanks for the patch.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

  reply	other threads:[~2013-10-28 17:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-21 16:01 [PATCH] drm/i915: Clamp cursor coordinates to int16_t range ville.syrjala
2013-10-21 16:13 ` Chris Wilson
2013-10-28 17:01   ` Daniel Vetter [this message]
2013-10-21 16:15 ` Daniel Vetter
2013-10-21 16:24   ` Ville Syrjälä

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=20131028170109.GR18189@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox