Re: [PATCH v3 1/8] drm/i915: Make sure fb gtt offsets stay within 32bits

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

 



Quoting Ville Syrjälä (2018-09-26 10:27:40)
> On Tue, Sep 25, 2018 at 09:29:44PM +0100, Chris Wilson wrote:
> > Quoting Ville Syrjala (2018-09-25 20:37:07)
> > > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > > +       /* Catch potential overflows early */
> > > +       if (add_overflows(mul_u32_u32(height, fb->pitches[color_plane]),
> > > +                         fb->offsets[color_plane], (u32)0)) {
> > 
> > Should we just pass type? Atm we aren't using the value for anything.
> > Then it would be add_overflows_t(a, b, T) with the obvious wrapping for
> > add_overflows(a, b). Although to be consistent with min_t, perhaps
> > add_overflows_t(T, a, b).
> 
> Indeed, that does seem a bit more consistent with existing stuff.

To further upset the apple cart, I spotted there is now a
include/linux/overflows.h which does everything completely different.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux