]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/radeon: properly document reloc priority mask
authorChristian König <christian.koenig@amd.com>
Fri, 15 Aug 2014 09:52:53 +0000 (11:52 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 18 Aug 2014 21:09:43 +0000 (17:09 -0400)
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
drivers/gpu/drm/radeon/radeon_cs.c
include/uapi/drm/radeon_drm.h

index ee712c199b2573f5978e1a254094e35f11090af0..cb12df784d83ba9f21ce9a513c4cb625d485f8e4 100644 (file)
@@ -132,7 +132,8 @@ static int radeon_cs_parser_relocs(struct radeon_cs_parser *p)
                 * the buffers used for read only, which doubles the range
                 * to 0 to 31. 32 is reserved for the kernel driver.
                 */
-               priority = (r->flags & 0xf) * 2 + !!r->write_domain;
+               priority = (r->flags & RADEON_RELOC_PRIO_MASK) * 2
+                          + !!r->write_domain;
 
                /* the first reloc of an UVD job is the msg and that must be in
                   VRAM, also but everything into VRAM on AGP cards to avoid
index 509b2d7a41b7ea88e676409a39d483e5a450f029..fea6099608ef2244d2020fbf5dcfac3c7d886d91 100644 (file)
@@ -944,6 +944,7 @@ struct drm_radeon_cs_chunk {
 };
 
 /* drm_radeon_cs_reloc.flags */
+#define RADEON_RELOC_PRIO_MASK         (0xf << 0)
 
 struct drm_radeon_cs_reloc {
        uint32_t                handle;