aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2014-08-15 05:52:53 -0400
committerAlex Deucher <alexander.deucher@amd.com>2014-08-18 17:09:43 -0400
commit701e1e789142042144c8cc10b8f6d1554e960144 (patch)
tree709116dc7a7c3c34b038dd232abebcc81cc257f1
parentc39502c5508fb0106167f80a037c444701faa65f (diff)
drm/radeon: properly document reloc priority mask
Instead of hard coding the value properly document that this is an userspace interface. No intended functional change. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
-rw-r--r--drivers/gpu/drm/radeon/radeon_cs.c3
-rw-r--r--include/uapi/drm/radeon_drm.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
index ee712c199b25..cb12df784d83 100644
--- a/drivers/gpu/drm/radeon/radeon_cs.c
+++ b/drivers/gpu/drm/radeon/radeon_cs.c
@@ -132,7 +132,8 @@ static int radeon_cs_parser_relocs(struct radeon_cs_parser *p)
132 * the buffers used for read only, which doubles the range 132 * the buffers used for read only, which doubles the range
133 * to 0 to 31. 32 is reserved for the kernel driver. 133 * to 0 to 31. 32 is reserved for the kernel driver.
134 */ 134 */
135 priority = (r->flags & 0xf) * 2 + !!r->write_domain; 135 priority = (r->flags & RADEON_RELOC_PRIO_MASK) * 2
136 + !!r->write_domain;
136 137
137 /* the first reloc of an UVD job is the msg and that must be in 138 /* the first reloc of an UVD job is the msg and that must be in
138 VRAM, also but everything into VRAM on AGP cards to avoid 139 VRAM, also but everything into VRAM on AGP cards to avoid
diff --git a/include/uapi/drm/radeon_drm.h b/include/uapi/drm/radeon_drm.h
index 509b2d7a41b7..fea6099608ef 100644
--- a/include/uapi/drm/radeon_drm.h
+++ b/include/uapi/drm/radeon_drm.h
@@ -944,6 +944,7 @@ struct drm_radeon_cs_chunk {
944}; 944};
945 945
946/* drm_radeon_cs_reloc.flags */ 946/* drm_radeon_cs_reloc.flags */
947#define RADEON_RELOC_PRIO_MASK (0xf << 0)
947 948
948struct drm_radeon_cs_reloc { 949struct drm_radeon_cs_reloc {
949 uint32_t handle; 950 uint32_t handle;