Skip to contentSkip to conversation

drm/radeon: don't reset dma on NI/SI init

PATCH In review Alex Deucher 2 participants 6 messages Sep 18, 2014

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

PATCH 1/3 drm/radeon: don't reset dma on NI/SI init

Otherwise we may lose the DMA golden settings which can lead to hangs, etc.

bug:
https://www.libreoffice.org/bugzilla/show_bug.cgi?id=83500

---
 drivers/gpu/drm/radeon/ni_dma.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/gpu/drm/radeon/ni_dma.c +0 -6
index 8a3e622..f26f0a9 100644
@@ -191,12 +191,6 @@ int cayman_dma_resume(struct radeon_device *rdev)
 	u32 reg_offset, wb_offset;
 	int i, r;
 
-	/* Reset dma */
-	WREG32(SRBM_SOFT_RESET, SOFT_RESET_DMA | SOFT_RESET_DMA1);
-	RREG32(SRBM_SOFT_RESET);
-	udelay(50);
-	WREG32(SRBM_SOFT_RESET, 0);
-
 	for (i = 0; i < 2; i++) {
 		if (i == 0) {
 			ring = &rdev->ring[R600_RING_TYPE_DMA_INDEX];
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 2/3 drm/radeon: don't reset sdma on CIK init

Otherwise we may lose the DMA golden settings which can lead to hangs, etc.

---
 drivers/gpu/drm/radeon/cik_sdma.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/gpu/drm/radeon/cik_sdma.c +0 -7
index 192278b..c4ffa54 100644
@@ -489,13 +489,6 @@ int cik_sdma_resume(struct radeon_device *rdev)
 {
 	int r;
 
-	/* Reset dma */
-	WREG32(SRBM_SOFT_RESET, SOFT_RESET_SDMA | SOFT_RESET_SDMA1);
-	RREG32(SRBM_SOFT_RESET);
-	udelay(50);
-	WREG32(SRBM_SOFT_RESET, 0);
-	RREG32(SRBM_SOFT_RESET);
-
 	r = cik_sdma_load_microcode(rdev);
 	if (r)
 		return r;
Signature · 1 line
1.8.3.1
#2 lore raw

PATCH 3/3 drm/radeon: don't reset dma on r6xx-evergreen init

In reply to Alex Deucher

Otherwise we may lose the DMA golden settings which can lead to hangs, etc.

---
 drivers/gpu/drm/radeon/r600_dma.c | 9 ---------
 1 file changed, 9 deletions(-)
drivers/gpu/drm/radeon/r600_dma.c +0 -9
index 51fd985..a908daa 100644
@@ -124,15 +124,6 @@ int r600_dma_resume(struct radeon_device *rdev)
 	u32 rb_bufsz;
 	int r;
 
-	/* Reset dma */
-	if (rdev->family >= CHIP_RV770)
-		WREG32(SRBM_SOFT_RESET, RV770_SOFT_RESET_DMA);
-	else
-		WREG32(SRBM_SOFT_RESET, SOFT_RESET_DMA);
-	RREG32(SRBM_SOFT_RESET);
-	udelay(50);
-	WREG32(SRBM_SOFT_RESET, 0);
-
 	WREG32(DMA_SEM_INCOMPLETE_TIMER_CNTL, 0);
 	WREG32(DMA_SEM_WAIT_FAIL_TIMER_CNTL, 0);
 
Signature · 1 line
1.8.3.1
#3 lore raw
In reply to Alex Deucher

Am 18.09.2014 um 19:26 schrieb Alex Deucher:

Quoted 2 lines

Otherwise we may lose the DMA golden settings which can lead to hangs, etc.

Don't we still want the soft reset at some point, e.g. when the engine hangs?

I would rather move that to another function and call it before loading the golden values.

Christian.

Quoted 27 lines

bug:
https://www.libreoffice.org/bugzilla/show_bug.cgi?id=83500

---
  drivers/gpu/drm/radeon/ni_dma.c | 6 ------
  1 file changed, 6 deletions(-)
drivers/gpu/drm/radeon/ni_dma.c +0 -6
index 8a3e622..f26f0a9 100644
@@ -191,12 +191,6 @@ int cayman_dma_resume(struct radeon_device *rdev)
  	u32 reg_offset, wb_offset;
  	int i, r;
 
-	/* Reset dma */
-	WREG32(SRBM_SOFT_RESET, SOFT_RESET_DMA | SOFT_RESET_DMA1);
-	RREG32(SRBM_SOFT_RESET);
-	udelay(50);
-	WREG32(SRBM_SOFT_RESET, 0);
-
  	for (i = 0; i < 2; i++) {
  		if (i == 0) {
  			ring = &rdev->ring[R600_RING_TYPE_DMA_INDEX];
#4 lore raw
Quoted 11 lines · Christian König

Am 18.09.2014 um 19:26 schrieb Alex Deucher:

Quoted 3 lines

Otherwise we may lose the DMA golden settings which can lead to hangs, etc.

Don't we still want the soft reset at some point, e.g. when the engine hangs?

I would rather move that to another function and call it before loading the golden values.

We have separate soft reset code for dma already. This is just a one-off soft reset in the dma init code. The golden registers are reloaded after a GPU reset so we should be fine.

Alex

Quoted 33 lines

Christian.

Quoted 27 lines

bug:
https://www.libreoffice.org/bugzilla/show_bug.cgi?id=83500

---
  drivers/gpu/drm/radeon/ni_dma.c | 6 ------
  1 file changed, 6 deletions(-)
drivers/gpu/drm/radeon/ni_dma.c +0 -5
index 8a3e622..f26f0a9 100644
@@ -191,12 +191,6 @@ int cayman_dma_resume(struct radeon_device *rdev)
        u32 reg_offset, wb_offset;
        int i, r;
  -     /* Reset dma */
-       WREG32(SRBM_SOFT_RESET, SOFT_RESET_DMA | SOFT_RESET_DMA1);
-       RREG32(SRBM_SOFT_RESET);
-       udelay(50);
-       WREG32(SRBM_SOFT_RESET, 0);
-
        for (i = 0; i < 2; i++) {
                if (i == 0) {
                        ring = &rdev->ring[R600_RING_TYPE_DMA_INDEX];
#5 lore raw

Am 18.09.2014 um 20:01 schrieb Alex Deucher:

Quoted 6 lines
Quoted 4 lines · Christian König

Am 18.09.2014 um 19:26 schrieb Alex Deucher:

Quoted 2 lines

Otherwise we may lose the DMA golden settings which can lead to hangs, etc.

Quoted 8 lines
Quoted 5 lines

Don't we still want the soft reset at some point, e.g. when the engine hangs?

I would rather move that to another function and call it before loading the golden values.

We have separate soft reset code for dma already. This is just a one-off soft reset in the dma init code. The golden registers are reloaded after a GPU reset so we should be fine.

Of course!

In this case the patches are Reviewed-by: Christian König <[email protected]>

Quoted 33 lines

Alex

Quoted 30 lines

Christian.

Quoted 26 lines

bug:
https://www.libreoffice.org/bugzilla/show_bug.cgi?id=83500

---
   drivers/gpu/drm/radeon/ni_dma.c | 6 ------
   1 file changed, 6 deletions(-)
drivers/gpu/drm/radeon/ni_dma.c +0 -5
index 8a3e622..f26f0a9 100644
@@ -191,12 +191,6 @@ int cayman_dma_resume(struct radeon_device *rdev)
         u32 reg_offset, wb_offset;
         int i, r;
   -     /* Reset dma */
-       WREG32(SRBM_SOFT_RESET, SOFT_RESET_DMA | SOFT_RESET_DMA1);
-       RREG32(SRBM_SOFT_RESET);
-       udelay(50);
-       WREG32(SRBM_SOFT_RESET, 0);
-
         for (i = 0; i < 2; i++) {
                 if (i == 0) {
                         ring = &rdev->ring[R600_RING_TYPE_DMA_INDEX];

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