[PATCH 1/1] drm/amdgpu: fix unload driver issue for virtual display
Alex Deucher
alexdeucher at gmail.com
Thu Jan 19 13:54:33 UTC 2017
On Wed, Jan 18, 2017 at 9:03 PM, Xiangliang Yu <Xiangliang.Yu at amd.com> wrote:
> Virtual display doesn't allocate amdgpu_encoder when initializing,
> so will get invaild pointer if try to free amdgpu_encoder when
> unloading driver.
>
> Signed-off-by: Xiangliang Yu <Xiangliang.Yu at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
> index 64dd266..fc12cdf 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
> @@ -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
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
More information about the amd-gfx
mailing list