Re: [Intel-gfx] [PATCH 2/2] drm/rect: Keep the clipped dst rectangle in place

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

 



On Wed, Nov 20, 2019 at 07:11:38PM +0200, Ville Syrjälä wrote:
> On Wed, Nov 20, 2019 at 05:43:40PM +0100, Daniel Vetter wrote:
> > On Wed, Nov 20, 2019 at 06:25:12PM +0200, Ville Syrjala wrote:
> > > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > > 
> > > Now that we've constrained the clipped source rectangle such
> > > that it can't have negative dimensions doing the same for the
> > > dst rectangle seems appropriate. Should at least result in
> > > the clipped src and dst rectangles being a bit more consistent
> > > with each other.
> > > 
> > > Cc: Benjamin Gaignard <benjamin.gaignard@xxxxxx>
> > > Cc: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > 
> > selftests for this stuff? Looks like the prime example, write testcase
> > proving code is busted, fix it, everyone celebrate?
> 
> Yeah, seems like a good idea. Though I'll have to figure out if it's
> actually broken or not ;)

I *think* the only problem is that the clip can result in a visible
source rectangle when this happens. The dst rectangle will still
be correctly invisible so hopefully not a big deal. But I guess we
might as well fix it, and I can do a selftest which makes sure
both src and dst come out invisible.

> 
> Hmm. Ouch. There's seems to be a div by zero lurking in there if
> dst_w/h == 0. I wonder why nothing has hit that.

Definitely real. I'll fix it and toss in a selftest.

-- 
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux