[PATCH] drm/amdgpu: Plus NULL function pointer check
Christian König
ckoenig.leichtzumerken at gmail.com
Tue Mar 13 07:59:11 UTC 2018
Am 13.03.2018 um 06:07 schrieb Rex Zhu:
> Change-Id: Ifd6553646e7468bc935504075816074373e1d58d
> Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
Reviewed-by: Christian König <christian.koenig at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 56b2245..1875500 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -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);
More information about the amd-gfx
mailing list