diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2015-01-06 01:42:25 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-01-08 15:36:50 +0100 |
commit | cbfc35b90f3b4853d1eb9fcb82e99531d6a1c629 (patch) | |
tree | 91a7356e4aa8a6b5cf006ae1b49d00324e804d2e /drivers/gpu/drm/radeon/nid.h | |
parent | Merge tag 'amdkfd-fixes-2015-01-06' of git://people.freedesktop.org/~gabbayo/... (diff) | |
download | linux-cbfc35b90f3b4853d1eb9fcb82e99531d6a1c629.tar.xz linux-cbfc35b90f3b4853d1eb9fcb82e99531d6a1c629.zip |
drm/radeon: fix VM flush on cayman/aruba (v3)
We need to wait for the GPUVM flush to complete. There
was some confusion as to how this mechanism was supposed
to work. The operation is not atomic. For GPU initiated
invalidations you need to read back a VM register to
introduce enough latency for the update to complete.
v2: drop gart changes
v3: just read back rather than polling
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/gpu/drm/radeon/nid.h')
-rw-r--r-- | drivers/gpu/drm/radeon/nid.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/nid.h b/drivers/gpu/drm/radeon/nid.h index 2e12e4d69253..ad7125486894 100644 --- a/drivers/gpu/drm/radeon/nid.h +++ b/drivers/gpu/drm/radeon/nid.h @@ -1133,6 +1133,23 @@ #define PACKET3_MEM_SEMAPHORE 0x39 #define PACKET3_MPEG_INDEX 0x3A #define PACKET3_WAIT_REG_MEM 0x3C +#define WAIT_REG_MEM_FUNCTION(x) ((x) << 0) + /* 0 - always + * 1 - < + * 2 - <= + * 3 - == + * 4 - != + * 5 - >= + * 6 - > + */ +#define WAIT_REG_MEM_MEM_SPACE(x) ((x) << 4) + /* 0 - reg + * 1 - mem + */ +#define WAIT_REG_MEM_ENGINE(x) ((x) << 8) + /* 0 - me + * 1 - pfp + */ #define PACKET3_MEM_WRITE 0x3D #define PACKET3_PFP_SYNC_ME 0x42 #define PACKET3_SURFACE_SYNC 0x43 @@ -1272,6 +1289,13 @@ (1 << 21) | \ (((n) & 0xFFFFF) << 0)) +#define DMA_SRBM_POLL_PACKET ((9 << 28) | \ + (1 << 27) | \ + (1 << 26)) + +#define DMA_SRBM_READ_PACKET ((9 << 28) | \ + (1 << 27)) + /* async DMA Packet types */ #define DMA_PACKET_WRITE 0x2 #define DMA_PACKET_COPY 0x3 |