drm/amdgpu: Plus NULL function pointer check
Subsystems (2)
PATCH 1/1 drm/amdgpu: Plus NULL function pointer check
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -1
@@ -1413,7 +1413,8 @@ static int amdgpu_device_ip_late_set_cg_state(struct amdgpu_device *adev)continue ;/* skip CG for VCE/UVD, it's handled specially */ if (adev->ip_blocks[i].version->type !=AMD_IP_BLOCK_TYPE_UVD && - adev->ip_blocks[i].version->type !=AMD_IP_BLOCK_TYPE_VCE ) { + adev->ip_blocks[i].version->type !=AMD_IP_BLOCK_TYPE_VCE && + adev->ip_blocks[i].version->funcs->set_clockgating_state) {/* enable clockgating to save power */ r = adev->ip_blocks[i].version->funcs->set_clockgating_state ((void *)adev,AMD_CG_STATE_GATE );
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): 1520917649-7995-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org
Christian König
Reviewed-byAm 13.03.2018 um 06:07 schrieb Rex Zhu:
Quoted 2 lines
Change-Id Ifd6553646e7468bc935504075816074373e1d58dSigned-off-by Rex Zhu <[email protected]>
Quoted 9 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static int amdgpu_device_ip_late_set_cg_state(struct amdgpu_device *adev) · line 1420
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2
-1@@ -1413,7 +1413,8 @@ static int amdgpu_device_ip_late_set_cg_state(struct amdgpu_device *adev)continue ;/* skip CG for VCE/UVD, it's handled specially */ if (adev->ip_blocks[i].version->type !=AMD_IP_BLOCK_TYPE_UVD && - adev->ip_blocks[i].version->type !=AMD_IP_BLOCK_TYPE_VCE ) { + adev->ip_blocks[i].version->type !=AMD_IP_BLOCK_TYPE_VCE && + adev->ip_blocks[i].version->funcs->set_clockgating_state) {/* enable clockgating to save power */ r = adev->ip_blocks[i].version->funcs->set_clockgating_state ((void *)adev,AMD_CG_STATE_GATE );
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Deucher, Alexander
Reviewed-by________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Rex Zhu <[email protected]>
Sent: Tuesday, March 13, 2018 1:07:29 AM
To: [email protected]
Cc: Zhu, Rex
Subject: [PATCH] drm/amdgpu: Plus NULL function pointer check
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -1
@@ -1413,7 +1413,8 @@ static int amdgpu_device_ip_late_set_cg_state(struct amdgpu_device *adev)continue ;/* skip CG for VCE/UVD, it's handled specially */ if (adev->ip_blocks[i].version->type !=AMD_IP_BLOCK_TYPE_UVD && - adev->ip_blocks[i].version->type !=AMD_IP_BLOCK_TYPE_VCE ) { + adev->ip_blocks[i].version->type !=AMD_IP_BLOCK_TYPE_VCE && + adev->ip_blocks[i].version->funcs->set_clockgating_state) {/* enable clockgating to save power */ r = adev->ip_blocks[i].version->funcs->set_clockgating_state ((void *)adev,AMD_CG_STATE_GATE );
--
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