[Intel-gfx] [PATCH] drm/fb: Proper support of boundary conditions in bitmasks.
Arkadiusz Hiler
arkadiusz.hiler at intel.com
Fri Feb 17 12:45:29 UTC 2017
On Fri, Feb 17, 2017 at 11:17:45AM +0100, Tomasz Lis wrote:
> The recently introduced patch changed behavior of masks when
> the bit number is negative. Instead of no bits set, the new way
> makes all bits set. Problematic patch:
> drm/i915: Avoid BIT(max) - 1 and use GENMASK(max - 1, 0)
>
> This behaviour was not considered when making changes, and boundary
> value of count (=0) is now resulting in a mask with all bits on, since
> the value is directly decreased and therefore negative. Checking if
> all bits are set leads to infinite loop.
>
> This patch introduces an additional check to avoid empty masks. It
> reverts the control flow to the exact same way it worked before
> the problematic patch.
>
> Signed-off-by: Tomasz Lis <tomasz.lis at intel.com>
Change commit tile to "drm/i915/fbdev: Proper support of boundary".
Other than that:
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler at intel.com>
--
Cheers,
Arek
More information about the Intel-gfx
mailing list