Skip to contentSkip to conversation

drm/amdgpu: clean up unused variable about ring lru

PATCH In review Kevin Wang 2 participants 3 messages Apr 20, 2020 – Apr 21, 2020

Subsystems (2)
lore
Share & tools
lore

Kevin Wang

author
#0 lore raw

PATCH 1/1 drm/amdgpu: clean up unused variable about ring lru

clean up unused variable:
1. ring_lru_list
2. ring_lru_list_lock

related-commit:
drm/amdgpu: remove ring lru handling

---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h        | 3 ---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ---
 2 files changed, 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +0 -3
index 94dff899248d..e8ab3dde6a66 100644
@@ -953,9 +953,6 @@ struct amdgpu_device {
 	/* link all shadow bo */
 	struct list_head                shadow_list;
 	struct mutex                    shadow_list_lock;
-	/* keep an lru list of rings by HW IP */
-	struct list_head		ring_lru_list;
-	spinlock_t			ring_lru_list_lock;
 
 	/* record hw reset is performed */
 	bool has_hw_reset;
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -3
index 71ea56e220ae..38eb736091d0 100644
@@ -2990,9 +2990,6 @@ int amdgpu_device_init(struct amdgpu_device *adev,
 	INIT_LIST_HEAD(&adev->shadow_list);
 	mutex_init(&adev->shadow_list_lock);
 
-	INIT_LIST_HEAD(&adev->ring_lru_list);
-	spin_lock_init(&adev->ring_lru_list_lock);
-
 	INIT_DELAYED_WORK(&adev->delayed_init_work,
 			  amdgpu_device_delayed_init_work_handler);
 	INIT_DELAYED_WORK(&adev->gfx.gfx_off_delay_work,
Signature · 6 lines
2.26.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by on v1 1/1
#1 lore raw

Am 20.04.20 um 17:27 schrieb Kevin Wang:

Quoted 8 lines

clean up unused variable:
1. ring_lru_list
2. ring_lru_list_lock

related-commit:
drm/amdgpu: remove ring lru handling

Found by accident or used some tool? I'm asking because I'm pretty sure we have more like those.

Thanks,
Christian.

Quoted 24 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu.h        | 3 ---
  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ---
  2 files changed, 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +0 -3
index 94dff899248d..e8ab3dde6a66 100644
@@ -953,9 +953,6 @@ struct amdgpu_device {
  	/* link all shadow bo */
  	struct list_head                shadow_list;
  	struct mutex                    shadow_list_lock;
-	/* keep an lru list of rings by HW IP */
-	struct list_head		ring_lru_list;
-	spinlock_t			ring_lru_list_lock;
 
  	/* record hw reset is performed */
  	bool has_hw_reset;
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
index 71ea56e220ae..38eb736091d0 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c int amdgpu_device_init(struct amdgpu_device *adev, · line 2995

Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -3
@@ -2990,9 +2990,6 @@ int amdgpu_device_init(struct amdgpu_device *adev,
  	INIT_LIST_HEAD(&adev->shadow_list);
  	mutex_init(&adev->shadow_list_lock);
 
-	INIT_LIST_HEAD(&adev->ring_lru_list);
-	spin_lock_init(&adev->ring_lru_list_lock);
-
  	INIT_DELAYED_WORK(&adev->delayed_init_work,
  			  amdgpu_device_delayed_init_work_handler);
  	INIT_DELAYED_WORK(&adev->gfx.gfx_off_delay_work,

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

author Reviewed-by Christian König
#2 lore raw

[AMD Official Use Only - Internal Distribution Only]

________________________________
From: Christian König <[email protected]>
Sent: Monday, April 20, 2020 11:45 PM
To: Wang, Kevin(Yang) <[email protected]>; [email protected] <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: clean up unused variable about ring lru

Am 20.04.20 um 17:27 schrieb Kevin Wang:

Quoted 8 lines

clean up unused variable:
1. ring_lru_list
2. ring_lru_list_lock

related-commit:
drm/amdgpu: remove ring lru handling

Found by accident or used some tool? I'm asking because I'm pretty sure we have more like those.

Thanks,
Christian.

[kevin]:
I found it when I read the driver source code, and then I looked at the git history. no tools to help.

Best Regards,
Kevin

Quoted 24 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu.h        | 3 ---
  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ---
  2 files changed, 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +0 -3
index 94dff899248d..e8ab3dde6a66 100644
@@ -953,9 +953,6 @@ struct amdgpu_device {
       /* link all shadow bo */
       struct list_head                shadow_list;
       struct mutex                    shadow_list_lock;
-     /* keep an lru list of rings by HW IP */
-     struct list_head                ring_lru_list;
-     spinlock_t                      ring_lru_list_lock;
 
       /* record hw reset is performed */
       bool has_hw_reset;
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
index 71ea56e220ae..38eb736091d0 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c int amdgpu_device_init(struct amdgpu_device *adev, · line 2995

Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -3
@@ -2990,9 +2990,6 @@ int amdgpu_device_init(struct amdgpu_device *adev,
       INIT_LIST_HEAD(&adev->shadow_list);
       mutex_init(&adev->shadow_list_lock);
 
-     INIT_LIST_HEAD(&adev->ring_lru_list);
-     spin_lock_init(&adev->ring_lru_list_lock);
-
       INIT_DELAYED_WORK(&adev->delayed_init_work,
                         amdgpu_device_delayed_init_work_handler);
       INIT_DELAYED_WORK(&adev->gfx.gfx_off_delay_work,

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx