diff mbox

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

Message ID 1411061204-721-1-git-send-email-alexander.deucher@amd.com (mailing list archive)
State New, archived
Headers show

Commit Message

Alex Deucher Sept. 18, 2014, 5:26 p.m. UTC
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

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
---
 drivers/gpu/drm/radeon/ni_dma.c | 6 ------
 1 file changed, 6 deletions(-)

Comments

Christian König Sept. 18, 2014, 5:51 p.m. UTC | #1
Am 18.09.2014 um 19:26 schrieb Alex Deucher:
> 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.

>
> bug:
> https://www.libreoffice.org/bugzilla/show_bug.cgi?id=83500
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> Cc: stable@vger.kernel.org
> ---
>   drivers/gpu/drm/radeon/ni_dma.c | 6 ------
>   1 file changed, 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/ni_dma.c b/drivers/gpu/drm/radeon/ni_dma.c
> index 8a3e622..f26f0a9 100644
> --- a/drivers/gpu/drm/radeon/ni_dma.c
> +++ b/drivers/gpu/drm/radeon/ni_dma.c
> @@ -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];
Alex Deucher Sept. 18, 2014, 6:01 p.m. UTC | #2
On Thu, Sep 18, 2014 at 1:51 PM, Christian König
<deathsimple@vodafone.de> wrote:
> Am 18.09.2014 um 19:26 schrieb Alex Deucher:
>>
>> 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

>
> Christian.
>
>
>>
>> bug:
>> https://www.libreoffice.org/bugzilla/show_bug.cgi?id=83500
>>
>> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
>> Cc: stable@vger.kernel.org
>> ---
>>   drivers/gpu/drm/radeon/ni_dma.c | 6 ------
>>   1 file changed, 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/radeon/ni_dma.c
>> b/drivers/gpu/drm/radeon/ni_dma.c
>> index 8a3e622..f26f0a9 100644
>> --- a/drivers/gpu/drm/radeon/ni_dma.c
>> +++ b/drivers/gpu/drm/radeon/ni_dma.c
>> @@ -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];
>
>
Christian König Sept. 18, 2014, 6:03 p.m. UTC | #3
Am 18.09.2014 um 20:01 schrieb Alex Deucher:
> On Thu, Sep 18, 2014 at 1:51 PM, Christian König
> <deathsimple@vodafone.de> wrote:
>> Am 18.09.2014 um 19:26 schrieb Alex Deucher:
>>> 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.

Of course!

In this case the patches are Reviewed-by: Christian König 
<christian.koenig@amd.com>

>
> Alex
>
>> Christian.
>>
>>
>>> bug:
>>> https://www.libreoffice.org/bugzilla/show_bug.cgi?id=83500
>>>
>>> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
>>> Cc: stable@vger.kernel.org
>>> ---
>>>    drivers/gpu/drm/radeon/ni_dma.c | 6 ------
>>>    1 file changed, 6 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/radeon/ni_dma.c
>>> b/drivers/gpu/drm/radeon/ni_dma.c
>>> index 8a3e622..f26f0a9 100644
>>> --- a/drivers/gpu/drm/radeon/ni_dma.c
>>> +++ b/drivers/gpu/drm/radeon/ni_dma.c
>>> @@ -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];
>>
diff mbox

Patch

diff --git a/drivers/gpu/drm/radeon/ni_dma.c b/drivers/gpu/drm/radeon/ni_dma.c
index 8a3e622..f26f0a9 100644
--- a/drivers/gpu/drm/radeon/ni_dma.c
+++ b/drivers/gpu/drm/radeon/ni_dma.c
@@ -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];