From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH] drm/i915: Clamp cursor coordinates to int16_t range Date: Mon, 21 Oct 2013 19:24:39 +0300 Message-ID: <20131021162439.GA13047@intel.com> References: <1382371318-9250-1-git-send-email-ville.syrjala@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 219EBE72AD for ; Mon, 21 Oct 2013 09:25:01 -0700 (PDT) Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Daniel Vetter Cc: intel-gfx List-Id: intel-gfx@lists.freedesktop.org On Mon, Oct 21, 2013 at 06:15:06PM +0200, Daniel Vetter wrote: > On Mon, Oct 21, 2013 at 6:01 PM, wrote: > > From: Ville Syrj=E4l=E4 > > > > 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=E4l=E4 > = > = > 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=E4l=E4 Intel OTC