Skip to contentSkip to conversation

drm/amdgpu: Fix NULL pointer when load kfd driver with PP block is disabled

PATCH In review Shaoyun Liu 2 participants 3 messages May 30, 2018 2 messages not in the archive

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

PATCH 1/1 drm/amdgpu: Fix NULL pointer when load kfd driver with PP block is disabled

Change-Id If34e3517b6cb6f31e898bbe7921485fbddb79fb9
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +2 -2
index 887702c..bc55e9a 100644
@@ -310,7 +310,7 @@ void get_local_mem_info(struct kgd_dev *kgd,
 			mem_info->local_mem_size_public,
 			mem_info->local_mem_size_private);
 
-	if (amdgpu_emu_mode == 1) {
+	if (!adev->powerplay.pp_funcs) {
 		mem_info->mem_clk_max = 100;
 		return;
 	}
@@ -335,7 +335,7 @@ uint32_t get_max_engine_clock_in_mhz(struct kgd_dev *kgd)
 	struct amdgpu_device *adev = (struct amdgpu_device *)kgd;
 
 	/* the sclk is in quantas of 10kHz */
-	if (amdgpu_emu_mode == 1)
+	if (!adev->powerplay.pp_funcs)
 		return 100;
 
 	if (amdgpu_sriov_vf(adev))
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): 1527712191-9838-1-git-send-email-Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw

________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Shaoyun Liu <[email protected]>
Sent: Wednesday, May 30, 2018 4:29:51 PM
To: [email protected]
Cc: Liu, Shaoyun
Subject: [PATCH] drm/amdgpu: Fix NULL pointer when load kfd driver with PP block is disabled

Change-Id If34e3517b6cb6f31e898bbe7921485fbddb79fb9
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +2 -2
index 887702c..bc55e9a 100644
@@ -310,7 +310,7 @@ void get_local_mem_info(struct kgd_dev *kgd,
                         mem_info->local_mem_size_public,
                         mem_info->local_mem_size_private);
 
-       if (amdgpu_emu_mode == 1) {
+       if (!adev->powerplay.pp_funcs) {
                 mem_info->mem_clk_max = 100;
                 return;
         }
@@ -335,7 +335,7 @@ uint32_t get_max_engine_clock_in_mhz(struct kgd_dev *kgd)
         struct amdgpu_device *adev = (struct amdgpu_device *)kgd;
 
         /* the sclk is in quantas of 10kHz */
-       if (amdgpu_emu_mode == 1)
+       if (!adev->powerplay.pp_funcs)
                 return 100;
 
         if (amdgpu_sriov_vf(adev))

--
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

A message that is not in the archive (sent off-list or not yet received): BN6PR12MB18095216ECAFA2E647283A45F76C0-/b2+HYfkarSEx6ez0IUAagdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

Reviewed-by
#4 lore raw

Actually, please include at least a basic patch description.

Alex

________________________________
From: Deucher, Alexander
Sent: Wednesday, May 30, 2018 5:28 PM
To: Liu, Shaoyun; [email protected]
Subject: Re: [PATCH] drm/amdgpu: Fix NULL pointer when load kfd driver with PP block is disabled

________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Shaoyun Liu <[email protected]>
Sent: Wednesday, May 30, 2018 4:29:51 PM
To: [email protected]
Cc: Liu, Shaoyun
Subject: [PATCH] drm/amdgpu: Fix NULL pointer when load kfd driver with PP block is disabled

Change-Id If34e3517b6cb6f31e898bbe7921485fbddb79fb9
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +2 -2
index 887702c..bc55e9a 100644
@@ -310,7 +310,7 @@ void get_local_mem_info(struct kgd_dev *kgd,
                         mem_info->local_mem_size_public,
                         mem_info->local_mem_size_private);
 
-       if (amdgpu_emu_mode == 1) {
+       if (!adev->powerplay.pp_funcs) {
                 mem_info->mem_clk_max = 100;
                 return;
         }
@@ -335,7 +335,7 @@ uint32_t get_max_engine_clock_in_mhz(struct kgd_dev *kgd)
         struct amdgpu_device *adev = (struct amdgpu_device *)kgd;
 
         /* the sclk is in quantas of 10kHz */
-       if (amdgpu_emu_mode == 1)
+       if (!adev->powerplay.pp_funcs)
                 return 100;
 
         if (amdgpu_sriov_vf(adev))

--
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