diff options
Diffstat (limited to 'common/recipes-kernel/linux/files/0191-drm-amdgpu-handle-uvd-pg-flags-properly.patch')
-rw-r--r-- | common/recipes-kernel/linux/files/0191-drm-amdgpu-handle-uvd-pg-flags-properly.patch | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/files/0191-drm-amdgpu-handle-uvd-pg-flags-properly.patch b/common/recipes-kernel/linux/files/0191-drm-amdgpu-handle-uvd-pg-flags-properly.patch new file mode 100644 index 00000000..1ea6f8c4 --- /dev/null +++ b/common/recipes-kernel/linux/files/0191-drm-amdgpu-handle-uvd-pg-flags-properly.patch @@ -0,0 +1,62 @@ +From 5555b7546ad656ee9e895d65a79adf963fe8c615 Mon Sep 17 00:00:00 2001 +From: Alex Deucher <alexander.deucher@amd.com> +Date: Thu, 4 Feb 2016 23:26:56 -0500 +Subject: [PATCH 0191/1110] drm/amdgpu: handle uvd pg flags properly + +Don't attempt to start/stop the uvd block if pg is disabled. + +Reviewed-by: Eric Huang <JinHuiEric.Huang@amd.com> +Signed-off-by: Alex Deucher <alexander.deucher@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 5 ++++- + drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 3 +++ + drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 3 +++ + 3 files changed, 10 insertions(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c +index 5e9f73a..9cb5287 100644 +--- a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c ++++ b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c +@@ -848,7 +848,10 @@ static int uvd_v4_2_set_powergating_state(void *handle, + * revisit this when there is a cleaner line between + * the smc and the hw blocks + */ +- struct amdgpu_device *adev = (struct amdgpu_device *)handle; ++ struct amdgpu_device *adev = (struct amdgpu_device *)handle; ++ ++ if (!(adev->pg_flags & AMDGPU_PG_SUPPORT_UVD)) ++ return 0; + + if (state == AMD_PG_STATE_GATE) { + uvd_v4_2_stop(adev); +diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c +index 38864f5..b4623de 100644 +--- a/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c ++++ b/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c +@@ -789,6 +789,9 @@ static int uvd_v5_0_set_powergating_state(void *handle, + */ + struct amdgpu_device *adev = (struct amdgpu_device *)handle; + ++ if (!(adev->pg_flags & AMDGPU_PG_SUPPORT_UVD)) ++ return 0; ++ + if (state == AMD_PG_STATE_GATE) { + uvd_v5_0_stop(adev); + return 0; +diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +index 3d59139..c41eda7 100644 +--- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c ++++ b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +@@ -1030,6 +1030,9 @@ static int uvd_v6_0_set_powergating_state(void *handle, + */ + struct amdgpu_device *adev = (struct amdgpu_device *)handle; + ++ if (!(adev->pg_flags & AMDGPU_PG_SUPPORT_UVD)) ++ return 0; ++ + if (state == AMD_PG_STATE_GATE) { + uvd_v6_0_stop(adev); + return 0; +-- +2.7.4 + |