[PATCH] nvidia/noveau: Fix color mask

2015-11-19 Thread Michael Büsch
The expression (~0 >> x) will always yield all-ones, because the right shift is an arithmetic right shift that will always shift ones in. Accordingly ~(~0 >> x) will always be zero. Hence 'mask' will always be zero in this case. Fix this by forcing a logical right shift instead of an arithmetic ri

[PATCH] nvidia/noveau: Fix color mask

2015-06-18 Thread Michael Büsch
On Wed, 17 Jun 2015 20:47:17 -0400 Ilia Mirkin wrote: > On Wed, Jun 17, 2015 at 1:05 PM, Michael Büsch wrote: > > The expression (~0 >> x) will always yield all-ones, because the right > > shift is an arithmetic right shift that will always shift ones in. > > Accordingly ~(~0 >> x) will always

[PATCH] nvidia/noveau: Fix color mask

2015-06-17 Thread Ilia Mirkin
On Wed, Jun 17, 2015 at 1:05 PM, Michael Büsch wrote: > The expression (~0 >> x) will always yield all-ones, because the right > shift is an arithmetic right shift that will always shift ones in. > Accordingly ~(~0 >> x) will always be zero. > Hence 'mask' will always be zero in this case. > > Fi

[PATCH] nvidia/noveau: Fix color mask

2015-06-17 Thread Michael Büsch
The expression (~0 >> x) will always yield all-ones, because the right shift is an arithmetic right shift that will always shift ones in. Accordingly ~(~0 >> x) will always be zero. Hence 'mask' will always be zero in this case. Fix this by forcing a logical right shift instead of an arithmetic ri