Skip to contentSkip to conversation

drm/radeon: fix VCE fence command

PATCH In review Christoph Jaeger 3 participants 3 messages Apr 14, 2014 – Apr 15, 2014

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

PATCH 1/1 drm/radeon: fix VCE fence command

Due to a type mismatch that causes an implicit type conversion, the upper 32 bits of the GPU address have been zeroed out when adding to the command buffer.

Picked up by Coverity - CID 1198624.

---
 drivers/gpu/drm/radeon/radeon_vce.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/radeon/radeon_vce.c +1 -1
index 76e9904..ced53dd 100644
@@ -613,7 +613,7 @@ void radeon_vce_fence_emit(struct radeon_device *rdev,
 			   struct radeon_fence *fence)
 {
 	struct radeon_ring *ring = &rdev->ring[fence->ring];
-	uint32_t addr = rdev->fence_drv[fence->ring].gpu_addr;
+	uint64_t addr = rdev->fence_drv[fence->ring].gpu_addr;
 
 	radeon_ring_write(ring, VCE_CMD_FENCE);
 	radeon_ring_write(ring, addr);
Signature · 1 line
1.9.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines

-----Original Message-----
From: Christoph Jaeger [mailto:[email protected]]
Sent: Monday, April 14, 2014 6:10 PM
To: Deucher, Alexander; Koenig, Christian; [email protected]
Cc: [email protected]; [email protected]; Christoph Jaeger
Subject: [PATCH] drm/radeon: fix VCE fence command

Quoted 7 lines

Due to a type mismatch that causes an implicit type conversion, the upper 32 bits of the GPU address have been zeroed out when adding to the command buffer.

Picked up by Coverity - CID 1198624.

Good catch!

Quoted 21 lines
---
 drivers/gpu/drm/radeon/radeon_vce.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/radeon/radeon_vce.c +1 -1
index 76e9904..ced53dd 100644
@@ -613,7 +613,7 @@ void radeon_vce_fence_emit(struct radeon_device
 *rdev,
 			   struct radeon_fence *fence)
 {
 	struct radeon_ring *ring = &rdev->ring[fence->ring];
-	uint32_t addr = rdev->fence_drv[fence->ring].gpu_addr;
+	uint64_t addr = rdev->fence_drv[fence->ring].gpu_addr;
 
 	radeon_ring_write(ring, VCE_CMD_FENCE);

radeon_ring_write(ring, addr);
--
1.9.0

maintainer
#2 lore raw

Am 15.04.2014 00:13, schrieb Deucher, Alexander:

Quoted 8 lines
Quoted 8 lines

-----Original Message-----
From: Christoph Jaeger [mailto:[email protected]]
Sent: Monday, April 14, 2014 6:10 PM
To: Deucher, Alexander; Koenig, Christian; [email protected]
Cc: [email protected]; [email protected]; Christoph Jaeger
Subject: [PATCH] drm/radeon: fix VCE fence command

Quoted 8 lines
Quoted 7 lines

Due to a type mismatch that causes an implicit type conversion, the upper 32 bits of the GPU address have been zeroed out when adding to the command buffer.

Picked up by Coverity - CID 1198624.

Good catch!

Indeed.

Quoted 2 lines

Added to my 3.15 fixes queue.

Thanks,
Christian.

Quoted 22 lines
Quoted 22 lines
---
  drivers/gpu/drm/radeon/radeon_vce.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/radeon/radeon_vce.c +1 -1
index 76e9904..ced53dd 100644
@@ -613,7 +613,7 @@ void radeon_vce_fence_emit(struct radeon_device
 *rdev,
  			   struct radeon_fence *fence)
  {
  	struct radeon_ring *ring = &rdev->ring[fence->ring];
-	uint32_t addr = rdev->fence_drv[fence->ring].gpu_addr;
+	uint64_t addr = rdev->fence_drv[fence->ring].gpu_addr;
 
  	radeon_ring_write(ring, VCE_CMD_FENCE);

radeon_ring_write(ring, addr);
--
1.9.0