+ drm-nouveau-bios-fix-a-bit-shift-error-introduced-by-457e77b.patch added to -mm tree

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

 



Subject: + drm-nouveau-bios-fix-a-bit-shift-error-introduced-by-457e77b.patch added to -mm tree
To: saproj@xxxxxxxxx,airlied@xxxxxxxxxx,bskeggs@xxxxxxxxxx
From: akpm@xxxxxxxxxxxxxxxxxxxx
Date: Thu, 17 Apr 2014 12:32:56 -0700


The patch titled
     Subject: drm/nouveau/bios: fix a bit shift error introduced by 457e77b
has been added to the -mm tree.  Its filename is
     drm-nouveau-bios-fix-a-bit-shift-error-introduced-by-457e77b.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/drm-nouveau-bios-fix-a-bit-shift-error-introduced-by-457e77b.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/drm-nouveau-bios-fix-a-bit-shift-error-introduced-by-457e77b.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Sergei Antonov <saproj@xxxxxxxxx>
Subject: drm/nouveau/bios: fix a bit shift error introduced by 457e77b

457e77b26428ab4a24 ("drm/nouveau/bios: add more checks to PRAMIN image
fetching") 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.

Signed-off-by: Sergei Antonov <saproj@xxxxxxxxx>
Cc: Ben Skeggs <bskeggs@xxxxxxxxxx>
Cc: Dave Airlie <airlied@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/gpu/drm/nouveau/core/subdev/bios/base.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/gpu/drm/nouveau/core/subdev/bios/base.c~drm-nouveau-bios-fix-a-bit-shift-error-introduced-by-457e77b drivers/gpu/drm/nouveau/core/subdev/bios/base.c
--- a/drivers/gpu/drm/nouveau/core/subdev/bios/base.c~drm-nouveau-bios-fix-a-bit-shift-error-introduced-by-457e77b
+++ a/drivers/gpu/drm/nouveau/core/subdev/bios/base.c
@@ -109,7 +109,7 @@ nouveau_bios_shadow_pramin(struct nouvea
 			return;
 		}
 
-		addr = (u64)(addr >> 8) << 8;
+		addr = (u64)(addr & 0xffffff00) << 8;
 		if (!addr) {
 			addr  = (u64)nv_rd32(bios, 0x001700) << 16;
 			addr += 0xf0000;
_

Patches currently in -mm which might be from saproj@xxxxxxxxx are

drm-nouveau-bios-fix-a-bit-shift-error-introduced-by-457e77b.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux