[Nouveau] [PATCH] drm/nouveau/bios: fix a bit shift error introduced by 457e77b

Emil Velikov emil.l.velikov at gmail.com
Sat Apr 19 13:14:59 PDT 2014


On 15/04/14 22:49, Sergei Antonov wrote:
> On 15 April 2014 23:18, Sergei Antonov <saproj at gmail.com> wrote:
>> Commit 457e77b26428ab4a24998eecfb99f27fa4195397 added two checks applied to a
>> value received from nv_rd32(bios, 0x619f04). But after this new piece of code
>> is executed, the addr local variable does not hold the same value it used to
>> hold before the commit. Here is what is was assigned in the original code:
>>         (u64)(nv_rd32(bios, 0x619f04) & 0xffffff00) << 8
>> in the committed code it ends up with this value:
>>         (u64)(nv_rd32(bios, 0x619f04) >> 8) << 8
>> These expressions are obviously not equivalent.
>>
>> My Nvidia video card does not show anything on the display when I boot a
>> kernel containing this commit.
>>
>> The patch fixes the code so that the new checks are still done, but the
>> side effect of an incorrect addr value is gone.
>>
Hi Sergei

A similar patch [1] has been sent a few days prior to yours, and I'm assuming
it will be queued/merged shortly. Just letting you know.

Cheers
-Emil

[1] http://lists.freedesktop.org/archives/dri-devel/2014-April/057318.html



More information about the Nouveau mailing list