drm/amdgpu: fix unload driver issue for virtual display
Subsystems (2)
PATCH 1/1 drm/amdgpu: fix unload driver issue for virtual display
Virtual display doesn't allocate amdgpu_encoder when initializing, so will get invaild pointer if try to free amdgpu_encoder when unloading driver.
--- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +1 -4
@@ -634,11 +634,8 @@ static const struct drm_encoder_helper_funcs dce_virtual_encoder_helper_funcs =static void dce_virtual_encoder_destroy (struct drm_encoder *encoder) { -struct amdgpu_encoder *amdgpu_encoder =to_amdgpu_encoder (encoder); - -kfree (amdgpu_encoder->enc_priv);drm_encoder_cleanup (encoder); -kfree (amdgpu_encoder); +kfree (encoder); }static const struct drm_encoder_funcs dce_virtual_encoder_funcs = {
Signature · 6 lines
2.7.4 _______________________________________________ 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): 1484791420-7341-1-git-send-email-Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org
Christian König
Acked-byAm 19.01.2017 um 03:03 schrieb Xiangliang Yu:
Quoted 5 lines
Virtual display doesn't allocate
amdgpu_encoderwhen initializing, so will get invaild pointer if try to freeamdgpu_encoderwhen unloading driver.Signed-off-by Xiangliang Yu <[email protected]>
Quoted 11 lines
--- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)drivers/gpu/drm/amd/amdgpu/dce_virtual.c +0
-0@@ -634,11 +634,8 @@ static const struct drm_encoder_helper_funcs dce_virtual_encoder_helper_funcs =static void dce_virtual_encoder_destroy (struct drm_encoder *encoder)
drivers/gpu/drm/amd/amdgpu/dce_virtual.c static const struct drm_encoder_helper_funcs dce_virtual_encoder_helper_funcs = · line 641
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +1
-4{ -struct amdgpu_encoder *amdgpu_encoder =to_amdgpu_encoder (encoder); - -kfree (amdgpu_encoder->enc_priv);drm_encoder_cleanup (encoder); -kfree (amdgpu_encoder); +kfree (encoder); }static const struct drm_encoder_funcs dce_virtual_encoder_funcs = {
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Alex Deucher
Reviewed-byQuoted 5 lines · Xiangliang Yu
Virtual display doesn't allocate
amdgpu_encoderwhen initializing, so will get invaild pointer if try to freeamdgpu_encoderwhen unloading driver.Signed-off-by Xiangliang Yu <[email protected]>
Quoted 24 lines
--- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)drivers/gpu/drm/amd/amdgpu/dce_virtual.c +1
-5@@ -634,11 +634,8 @@ static const struct drm_encoder_helper_funcs dce_virtual_encoder_helper_funcs =static void dce_virtual_encoder_destroy (struct drm_encoder *encoder) { -struct amdgpu_encoder *amdgpu_encoder =to_amdgpu_encoder (encoder); - -kfree (amdgpu_encoder->enc_priv);drm_encoder_cleanup (encoder); -kfree (amdgpu_encoder); +kfree (encoder); }static const struct drm_encoder_funcs dce_virtual_encoder_funcs = { --2.7.4
Quoted 4 lines
_______________________________________________
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