From 4c2d42225b5024ad88f736608f44b51f702bd4e4 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Fri, 10 Aug 2012 15:10:34 +1000 Subject: drm/nouveau/core: have fifo store a unique context identifier at attach time This value will match something that's easily available from the engine IRQ handlers, and used to lookup the relevant context. Since the changes in how this is done on each generation match when the major PFIFO changes happened, fifo is responsible for calculating the correct value to avoid duplicating the same code among many engine modules. Signed-off-by: Ben Skeggs --- drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c') diff --git a/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c b/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c index c3f4955..042afad 100644 --- a/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c +++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c @@ -147,6 +147,8 @@ nve0_fifo_context_attach(struct nouveau_object *parent, NV_MEM_ACCESS_RW, &ectx->vma); if (ret) return ret; + + nv_engctx(ectx)->addr = nv_gpuobj(base)->addr >> 12; } nv_wo32(base, addr + 0x00, lower_32_bits(ectx->vma.offset) | 4); -- cgit v1.1