Skip to contentSkip to conversation

drm/radeon: always dump the ring content if it's available

PATCH Applied Christian König 2 participants 3 messages Mar 23, 2015

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

PATCH 1/2 drm/radeon: always dump the ring content if it's available

From: Christian König <[email protected]>

Dumping is still possible if a ring isn't ready, only when it isn't allocated at all we need to abort here.

---
 drivers/gpu/drm/radeon/radeon_ring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/radeon/radeon_ring.c +1 -1
index 2456f69..8c78723 100644
@@ -495,7 +495,7 @@ static int radeon_debugfs_ring_info(struct seq_file *m, void *data)
 	seq_printf(m, "%u free dwords in ring\n", ring->ring_free_dw);
 	seq_printf(m, "%u dwords in ring\n", count);
 
-	if (!ring->ready)
+	if (!ring->ring)
 		return 0;
 
 	/* print 8 dw before current rptr as often it's the last executed
Signature · 6 lines
1.9.1

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

PATCH 2/2 drm/radeon: programm the VCE fw BAR as well

From: Christian König <[email protected]>

Otherwise the VCE firmware needs to be in the first 256MB of VRAM.

---
 drivers/gpu/drm/radeon/cikd.h     | 1 +
 drivers/gpu/drm/radeon/vce_v2_0.c | 3 +++
 2 files changed, 4 insertions(+)
drivers/gpu/drm/radeon/cikd.h +1 -0
index c648e19..243a36c 100644
@@ -2129,6 +2129,7 @@
 #define VCE_UENC_REG_CLOCK_GATING	0x207c0
 #define VCE_SYS_INT_EN			0x21300
 #	define VCE_SYS_INT_TRAP_INTERRUPT_EN	(1 << 3)
+#define VCE_LMI_VCPU_CACHE_40BIT_BAR	0x2145c
 #define VCE_LMI_CTRL2			0x21474
 #define VCE_LMI_CTRL			0x21498
 #define VCE_LMI_VM_CTRL			0x214a0
drivers/gpu/drm/radeon/vce_v2_0.c +3 -0
index 1ac7bb8..fbbe78f 100644
@@ -156,6 +156,9 @@ int vce_v2_0_resume(struct radeon_device *rdev)
 	WREG32(VCE_LMI_SWAP_CNTL1, 0);
 	WREG32(VCE_LMI_VM_CTRL, 0);
 
+	WREG32(VCE_LMI_VCPU_CACHE_40BIT_BAR, addr >> 8);
+
+	addr &= 0xff;
 	size = RADEON_GPU_PAGE_ALIGN(rdev->vce_fw->size);
 	WREG32(VCE_VCPU_CACHE_OFFSET0, addr & 0x7fffffff);
 	WREG32(VCE_VCPU_CACHE_SIZE0, size);
Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Applied
#2 lore raw
In reply to Christian König
Quoted 6 lines · Christian König

From: Christian König <[email protected]>

Dumping is still possible if a ring isn't ready, only when it isn't allocated at all we need to abort here.

Applied the series. thanks!

Alex

Quoted 18 lines
---
 drivers/gpu/drm/radeon/radeon_ring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/radeon/radeon_ring.c +1 -2
index 2456f69..8c78723 100644
@@ -495,7 +495,7 @@ static int radeon_debugfs_ring_info(struct seq_file *m, void *data)
        seq_printf(m, "%u free dwords in ring\n", ring->ring_free_dw);
        seq_printf(m, "%u dwords in ring\n", count);
 
-       if (!ring->ready)
+       if (!ring->ring)
                return 0;
 
        /* print 8 dw before current rptr as often it's the last executed
--
Quoted 2 lines

1.9.1

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