All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/amdgpu: drop scratch regs save and restore from S3/S4 handling
@ 2017-12-12 20:27 Alex Deucher
       [not found] ` <20171212202720.6954-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Deucher @ 2017-12-12 20:27 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher

The expectation is that the base driver doesn't mess with these.
Some components interact with these directly so let the components
handle these directly.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 98d62a991b67..ca1cf8a71dda 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2577,7 +2577,6 @@ int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon)
 	 */
 	amdgpu_bo_evict_vram(adev);
 
-	amdgpu_atombios_scratch_regs_save(adev);
 	pci_save_state(dev->pdev);
 	if (suspend) {
 		/* Shut down the device */
@@ -2626,7 +2625,6 @@ int amdgpu_device_resume(struct drm_device *dev, bool resume, bool fbcon)
 		if (r)
 			goto unlock;
 	}
-	amdgpu_atombios_scratch_regs_restore(adev);
 
 	/* post card */
 	if (amdgpu_need_post(adev)) {
-- 
2.13.6

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] drm/amdgpu: drop scratch regs save and restore from GPU reset handling
       [not found] ` <20171212202720.6954-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
@ 2017-12-12 20:27   ` Alex Deucher
  2017-12-12 20:27   ` [PATCH 3/3] drm/amdgpu: drop amdgpu_atombios_scratch_regs_save/restore Alex Deucher
  2017-12-12 23:52   ` [PATCH 1/3] drm/amdgpu: drop scratch regs save and restore from S3/S4 handling Harry Wentland
  2 siblings, 0 replies; 5+ messages in thread
From: Alex Deucher @ 2017-12-12 20:27 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher

The expectation is that the base driver doesn't mess with these.
Some components interact with these directly so let the components
handle these directly.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index ca1cf8a71dda..046b9d5bc14d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2896,9 +2896,7 @@ static int amdgpu_reset(struct amdgpu_device *adev, uint64_t* reset_flags)
 		r = amdgpu_suspend(adev);
 
 retry:
-		amdgpu_atombios_scratch_regs_save(adev);
 		r = amdgpu_asic_reset(adev);
-		amdgpu_atombios_scratch_regs_restore(adev);
 		/* post card */
 		amdgpu_atom_asic_init(adev->mode_info.atom_context);
 
-- 
2.13.6

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] drm/amdgpu: drop amdgpu_atombios_scratch_regs_save/restore
       [not found] ` <20171212202720.6954-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
  2017-12-12 20:27   ` [PATCH 2/3] drm/amdgpu: drop scratch regs save and restore from GPU reset handling Alex Deucher
@ 2017-12-12 20:27   ` Alex Deucher
  2017-12-12 23:52   ` [PATCH 1/3] drm/amdgpu: drop scratch regs save and restore from S3/S4 handling Harry Wentland
  2 siblings, 0 replies; 5+ messages in thread
From: Alex Deucher @ 2017-12-12 20:27 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher

No longer used.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 22 ----------------------
 drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.h |  2 --
 2 files changed, 24 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
index 39f4d0df1ada..ffaf0534e33c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
@@ -1721,28 +1721,6 @@ void amdgpu_atombios_scratch_regs_init(struct amdgpu_device *adev)
 	WREG32(adev->bios_scratch_reg_offset + 6, bios_6_scratch);
 }
 
-void amdgpu_atombios_scratch_regs_save(struct amdgpu_device *adev)
-{
-	int i;
-
-	for (i = 0; i < AMDGPU_BIOS_NUM_SCRATCH; i++)
-		adev->bios_scratch[i] = RREG32(adev->bios_scratch_reg_offset + i);
-}
-
-void amdgpu_atombios_scratch_regs_restore(struct amdgpu_device *adev)
-{
-	int i;
-
-	/*
-	 * VBIOS will check ASIC_INIT_COMPLETE bit to decide if
-	 * execute ASIC_Init posting via driver
-	 */
-	adev->bios_scratch[7] &= ~ATOM_S7_ASIC_INIT_COMPLETE_MASK;
-
-	for (i = 0; i < AMDGPU_BIOS_NUM_SCRATCH; i++)
-		WREG32(adev->bios_scratch_reg_offset + i, adev->bios_scratch[i]);
-}
-
 void amdgpu_atombios_scratch_regs_engine_hung(struct amdgpu_device *adev,
 					      bool hung)
 {
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.h
index b0d5d1d7fdba..58507f9ff856 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.h
@@ -196,8 +196,6 @@ bool amdgpu_atombios_has_gpu_virtualization_table(struct amdgpu_device *adev);
 
 void amdgpu_atombios_scratch_regs_lock(struct amdgpu_device *adev, bool lock);
 void amdgpu_atombios_scratch_regs_init(struct amdgpu_device *adev);
-void amdgpu_atombios_scratch_regs_save(struct amdgpu_device *adev);
-void amdgpu_atombios_scratch_regs_restore(struct amdgpu_device *adev);
 void amdgpu_atombios_scratch_regs_engine_hung(struct amdgpu_device *adev,
 					      bool hung);
 bool amdgpu_atombios_scratch_need_asic_init(struct amdgpu_device *adev);
-- 
2.13.6

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/3] drm/amdgpu: drop scratch regs save and restore from S3/S4 handling
       [not found] ` <20171212202720.6954-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
  2017-12-12 20:27   ` [PATCH 2/3] drm/amdgpu: drop scratch regs save and restore from GPU reset handling Alex Deucher
  2017-12-12 20:27   ` [PATCH 3/3] drm/amdgpu: drop amdgpu_atombios_scratch_regs_save/restore Alex Deucher
@ 2017-12-12 23:52   ` Harry Wentland
       [not found]     ` <b1504171-6807-235a-39f5-e3e3c595e8c4-5C7GfCeVMHo@public.gmane.org>
  2 siblings, 1 reply; 5+ messages in thread
From: Harry Wentland @ 2017-12-12 23:52 UTC (permalink / raw)
  To: Alex Deucher, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher

On 2017-12-12 03:27 PM, Alex Deucher wrote:
> The expectation is that the base driver doesn't mess with these.
> Some components interact with these directly so let the components
> handle these directly.
> 
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

Series is Reviewed-by: Harry Wentland <harry.wentland@amd.com>

Harry

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 98d62a991b67..ca1cf8a71dda 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -2577,7 +2577,6 @@ int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon)
>  	 */
>  	amdgpu_bo_evict_vram(adev);
>  
> -	amdgpu_atombios_scratch_regs_save(adev);
>  	pci_save_state(dev->pdev);
>  	if (suspend) {
>  		/* Shut down the device */
> @@ -2626,7 +2625,6 @@ int amdgpu_device_resume(struct drm_device *dev, bool resume, bool fbcon)
>  		if (r)
>  			goto unlock;
>  	}
> -	amdgpu_atombios_scratch_regs_restore(adev);
>  
>  	/* post card */
>  	if (amdgpu_need_post(adev)) {
> 
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/3] drm/amdgpu: drop scratch regs save and restore from S3/S4 handling
       [not found]     ` <b1504171-6807-235a-39f5-e3e3c595e8c4-5C7GfCeVMHo@public.gmane.org>
@ 2017-12-13 12:23       ` Christian König
  0 siblings, 0 replies; 5+ messages in thread
From: Christian König @ 2017-12-13 12:23 UTC (permalink / raw)
  To: Harry Wentland, Alex Deucher, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: Alex Deucher

Am 13.12.2017 um 00:52 schrieb Harry Wentland:
> On 2017-12-12 03:27 PM, Alex Deucher wrote:
>> The expectation is that the base driver doesn't mess with these.
>> Some components interact with these directly so let the components
>> handle these directly.
>>
>> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> Series is Reviewed-by: Harry Wentland <harry.wentland@amd.com>

Acked-by: Christian König <christian.koenig@amd.com>

Christian.

>
> Harry
>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 --
>>   1 file changed, 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> index 98d62a991b67..ca1cf8a71dda 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> @@ -2577,7 +2577,6 @@ int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon)
>>   	 */
>>   	amdgpu_bo_evict_vram(adev);
>>   
>> -	amdgpu_atombios_scratch_regs_save(adev);
>>   	pci_save_state(dev->pdev);
>>   	if (suspend) {
>>   		/* Shut down the device */
>> @@ -2626,7 +2625,6 @@ int amdgpu_device_resume(struct drm_device *dev, bool resume, bool fbcon)
>>   		if (r)
>>   			goto unlock;
>>   	}
>> -	amdgpu_atombios_scratch_regs_restore(adev);
>>   
>>   	/* post card */
>>   	if (amdgpu_need_post(adev)) {
>>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-12-13 12:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-12 20:27 [PATCH 1/3] drm/amdgpu: drop scratch regs save and restore from S3/S4 handling Alex Deucher
     [not found] ` <20171212202720.6954-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2017-12-12 20:27   ` [PATCH 2/3] drm/amdgpu: drop scratch regs save and restore from GPU reset handling Alex Deucher
2017-12-12 20:27   ` [PATCH 3/3] drm/amdgpu: drop amdgpu_atombios_scratch_regs_save/restore Alex Deucher
2017-12-12 23:52   ` [PATCH 1/3] drm/amdgpu: drop scratch regs save and restore from S3/S4 handling Harry Wentland
     [not found]     ` <b1504171-6807-235a-39f5-e3e3c595e8c4-5C7GfCeVMHo@public.gmane.org>
2017-12-13 12:23       ` Christian König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.