Skip to contentSkip to conversation

drm/radeon: don't allow RADEON_GEM_DOMAIN_CPU for command submission

PATCH In review Marek Olšák 2 participants 3 messages May 27, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/radeon: don't allow RADEON_GEM_DOMAIN_CPU for command submission

From: Marek Olšák <[email protected]>

It hangs the hardware.

---
 drivers/gpu/drm/radeon/radeon_cs.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/radeon/radeon_cs.c +6 -0
index 2b6e0eb..2b78191 100644
@@ -152,6 +152,12 @@ static int radeon_cs_parser_relocs(struct radeon_cs_parser *p)
 			uint32_t domain = r->write_domain ?
 				r->write_domain : r->read_domains;
 
+			if (domain & RADEON_GEM_DOMAIN_CPU) {
+				DRM_ERROR("RADEON_GEM_DOMAIN_CPU is not valid "
+					  "for command submission\n");
+				return -EINVAL;
+			}
+
 			p->relocs[i].domain = domain;
 			if (domain == RADEON_GEM_DOMAIN_VRAM)
 				domain |= RADEON_GEM_DOMAIN_GTT;
Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/1
#1 lore raw

Am 27.05.2014 02:56, schrieb Marek Olšák:

Quoted 5 lines

From: Marek Olšák <[email protected]>

It hangs the hardware.

Maybe CC stable as well? Anyway going to add it to my 3.15 queue.

Christian.

Quoted 11 lines
---
  drivers/gpu/drm/radeon/radeon_cs.c | 6 ++++++
  1 file changed, 6 insertions(+)
drivers/gpu/drm/radeon/radeon_cs.c +0 -0
index 2b6e0eb..2b78191 100644
@@ -152,6 +152,12 @@ static int radeon_cs_parser_relocs(struct radeon_cs_parser *p)
  			uint32_t domain = r->write_domain ?
  				r->write_domain : r->read_domains;

drivers/gpu/drm/radeon/radeon_cs.c static int radeon_cs_parser_relocs(struct radeon_cs_parser *p) · line 163

Quoted 10 lines
drivers/gpu/drm/radeon/radeon_cs.c +6 -0
 
+			if (domain & RADEON_GEM_DOMAIN_CPU) {
+				DRM_ERROR("RADEON_GEM_DOMAIN_CPU is not valid "
+					  "for command submission\n");
+				return -EINVAL;
+			}
+
  			p->relocs[i].domain = domain;
  			if (domain == RADEON_GEM_DOMAIN_VRAM)
  				domain |= RADEON_GEM_DOMAIN_GTT;

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw

Yeah, feel free to add the Cc: stable tag.

Marek

Quoted 31 lines · Christian König

Am 27.05.2014 02:56, schrieb Marek Olšák:

Quoted 5 lines

From: Marek Olšák <[email protected]>

It hangs the hardware.

Maybe CC stable as well? Anyway going to add it to my 3.15 queue.

Christian.

Quoted 15 lines
---
  drivers/gpu/drm/radeon/radeon_cs.c | 6 ++++++
  1 file changed, 6 insertions(+)
drivers/gpu/drm/radeon/radeon_cs.c +1 -0
index 2b6e0eb..2b78191 100644
@@ -152,6 +152,12 @@ static int radeon_cs_parser_relocs(struct
 radeon_cs_parser *p)
                        uint32_t domain = r->write_domain ?
                                r->write_domain : r->read_domains;
  +                     if (domain & RADEON_GEM_DOMAIN_CPU) {
+                               DRM_ERROR("RADEON_GEM_DOMAIN_CPU is not
Quoted 10 lines

drivers/gpu/drm/radeon/radeon_cs.c static int radeon_cs_parser_relocs(struct radeon_cs_parser *p) · line 163

Quoted 8 lines

valid "

drivers/gpu/drm/radeon/radeon_cs.c +4 -0
+                                         "for command submission\n");
+                               return -EINVAL;
+                       }
+
                        p->relocs[i].domain = domain;
                        if (domain == RADEON_GEM_DOMAIN_VRAM)
                                domain |= RADEON_GEM_DOMAIN_GTT;

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel