secboot/gm200: use proper memory target function

Submitted by Alexandre Courbot on March 1, 2016, 8:21 a.m.

Details

Message ID 1456820493-18037-1-git-send-email-acourbot@nvidia.com
State New
Headers show
Series "secboot/gm200: use proper memory target function" ( rev: 1 ) in Nouveau

Not browsing as part of any series.

Commit Message

Alexandre Courbot March 1, 2016, 8:21 a.m.
Use nvkm_memory_target() to know the location of the instance block used
for secure boot, instead of guessing through the presence of a RAM
device.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
---
Ben, feel free to squash this one into the original secboot patch since
it is a really minor fix.

 drm/nouveau/nvkm/subdev/secboot/gm200.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/drm/nouveau/nvkm/subdev/secboot/gm200.c b/drm/nouveau/nvkm/subdev/secboot/gm200.c
index b7ceba59dfb2..137c821213bb 100644
--- a/drm/nouveau/nvkm/subdev/secboot/gm200.c
+++ b/drm/nouveau/nvkm/subdev/secboot/gm200.c
@@ -1148,7 +1148,7 @@  gm200_secboot_setup_falcon(struct gm200_secboot *gsb)
 		  0x4 | 0x2);
 
 	/* Set context */
-	if (device->fb->ram)
+	if (nvkm_memory_target(gsb->inst->memory) == NVKM_MEM_TARGET_VRAM)
 		inst_loc = 0x0; /* FB */
 	else
 		inst_loc = 0x3; /* Non-coherent sysmem */