Skip to contentSkip to conversation

drm/amdgpu: Delete dead code when early init

PATCH In review Rex Zhu 2 participants 2 messages Mar 16, 2018 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Rex Zhu

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Delete dead code when early init

Change-Id I4648ad6885f3884688d8bb90ea33be7f6ad69810
---
 drivers/gpu/drm/amd/amdgpu/soc15.c | 5 -----
 drivers/gpu/drm/amd/amdgpu/vi.c    | 5 -----
 2 files changed, 10 deletions(-)
drivers/gpu/drm/amd/amdgpu/soc15.c +0 -5
index c6e8573..242c30b 100644
@@ -608,7 +608,6 @@ static void soc15_invalidate_hdp(struct amdgpu_device *adev,
 
 static int soc15_common_early_init(void *handle)
 {
-	bool psp_enabled = false;
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
 	adev->smc_rreg = NULL;
@@ -626,10 +625,6 @@ static int soc15_common_early_init(void *handle)
 
 	adev->asic_funcs = &soc15_asic_funcs;
 
-	if (amdgpu_device_ip_get_ip_block(adev, AMD_IP_BLOCK_TYPE_PSP) &&
-	    (amdgpu_ip_block_mask & (1 << AMD_IP_BLOCK_TYPE_PSP)))
-		psp_enabled = true;
-
 	adev->rev_id = soc15_get_rev_id(adev);
 	adev->external_rev_id = 0xFF;
 	switch (adev->asic_type) {
drivers/gpu/drm/amd/amdgpu/vi.c +0 -5
index e7fb165..126f127 100644
@@ -896,7 +896,6 @@ static void vi_invalidate_hdp(struct amdgpu_device *adev,
 
 static int vi_common_early_init(void *handle)
 {
-	bool smc_enabled = false;
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
 	if (adev->flags & AMD_IS_APU) {
@@ -917,10 +916,6 @@ static int vi_common_early_init(void *handle)
 
 	adev->asic_funcs = &vi_asic_funcs;
 
-	if (amdgpu_device_ip_get_ip_block(adev, AMD_IP_BLOCK_TYPE_SMC) &&
-	    (amdgpu_ip_block_mask & (1 << AMD_IP_BLOCK_TYPE_SMC)))
-		smc_enabled = true;
-
 	adev->rev_id = vi_get_rev_id(adev);
 	adev->external_rev_id = 0xFF;
 	switch (adev->asic_type) {
Signature · 6 lines
1.9.1

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

A message that is not in the archive (sent off-list or not yet received): 1521175750-13146-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org

Reviewed-by Evan Quan
#2 lore raw

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Rex Zhu
Sent: Friday, March 16, 2018 12:49 PM
To: [email protected]
Cc: Zhu, Rex <[email protected]>
Subject: [PATCH] drm/amdgpu: Delete dead code when early init

Change-Id I4648ad6885f3884688d8bb90ea33be7f6ad69810
---
 drivers/gpu/drm/amd/amdgpu/soc15.c | 5 -----
 drivers/gpu/drm/amd/amdgpu/vi.c    | 5 -----
 2 files changed, 10 deletions(-)
drivers/gpu/drm/amd/amdgpu/soc15.c +0 -5
index c6e8573..242c30b 100644
@@ -608,7 +608,6 @@ static void soc15_invalidate_hdp(struct amdgpu_device *adev,
 
 static int soc15_common_early_init(void *handle)  {
-	bool psp_enabled = false;
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
 	adev->smc_rreg = NULL;
@@ -626,10 +625,6 @@ static int soc15_common_early_init(void *handle)
 
 	adev->asic_funcs = &soc15_asic_funcs;
 
-	if (amdgpu_device_ip_get_ip_block(adev, AMD_IP_BLOCK_TYPE_PSP) &&
-	    (amdgpu_ip_block_mask & (1 << AMD_IP_BLOCK_TYPE_PSP)))
-		psp_enabled = true;
-
 	adev->rev_id = soc15_get_rev_id(adev);
 	adev->external_rev_id = 0xFF;
 	switch (adev->asic_type) {
drivers/gpu/drm/amd/amdgpu/vi.c +0 -5
@@ -896,7 +896,6 @@ static void vi_invalidate_hdp(struct amdgpu_device *adev,
 
 static int vi_common_early_init(void *handle)  {
-	bool smc_enabled = false;
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
 	if (adev->flags & AMD_IS_APU) {
@@ -917,10 +916,6 @@ static int vi_common_early_init(void *handle)
 
 	adev->asic_funcs = &vi_asic_funcs;
 
-	if (amdgpu_device_ip_get_ip_block(adev, AMD_IP_BLOCK_TYPE_SMC) &&
-	    (amdgpu_ip_block_mask & (1 << AMD_IP_BLOCK_TYPE_SMC)))
-		smc_enabled = true;
-
 	adev->rev_id = vi_get_rev_id(adev);
 	adev->external_rev_id = 0xFF;
 	switch (adev->asic_type) {

--
1.9.1

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