[Intel-gfx] [PATCH 9/9] drm/i915: Tidy watermark computation local types

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Mon Oct 10 08:06:28 UTC 2016


On pe, 2016-10-07 at 18:16 +0300, Ville Syrjälä wrote:
> On Fri, Oct 07, 2016 at 03:51:50PM +0100, Tvrtko Ursulin wrote:
> >
> > I tried to be careful, but it is of course possible I've missed 
> > something. Could you give me a more precise pointer on where exactly to 
> > look? In this particular patch?
> 
> I don't have specifics in mind right now. But in general I've become a
> bit wary of unsigned in my older days on account of integer promotions
> and arithmetic conversions. It's far too easy to end up with an unsigned
> value where signed was needed.

Yes, if one is not paying attention to the maximum expected values. And
looking back a few months, paying attention is what our watermark code
needs badly. By quick look, some types are random and there're quite a
few casts. Try "git grep max_wm" for example.

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation


More information about the Intel-gfx mailing list