diff options
author | Yongqiang Sun <yongqiang.sun@amd.com> | 2016-12-21 11:13:48 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-09-26 17:06:58 -0400 |
commit | 80bd20967261d9438dc814f3e6e904aea053163b (patch) | |
tree | 5566ea8386d0354d6a8de623b7efb0e6231ae74c /drivers/gpu/drm/amd/display/dc/core/dc_surface.c | |
parent | 0f4e66cd7dac538adca4b1cac8f36b90db1709e6 (diff) | |
download | op-kernel-dev-80bd20967261d9438dc814f3e6e904aea053163b.zip op-kernel-dev-80bd20967261d9438dc814f3e6e904aea053163b.tar.gz |
drm/amd/display: reset transfer_func to NULL on release
Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/core/dc_surface.c')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_surface.c b/drivers/gpu/drm/amd/display/dc/core/dc_surface.c index 3ec1f36..cf8fb9a 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_surface.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_surface.c @@ -71,11 +71,15 @@ static bool construct(struct dc_context *ctx, struct surface *surface) static void destruct(struct surface *surface) { - if (surface->protected.public.gamma_correction != NULL) + if (surface->protected.public.gamma_correction != NULL) { dc_gamma_release(surface->protected.public.gamma_correction); - if (surface->protected.public.in_transfer_func != NULL) + surface->protected.public.gamma_correction = NULL; + } + if (surface->protected.public.in_transfer_func != NULL) { dc_transfer_func_release( surface->protected.public.in_transfer_func); + surface->protected.public.in_transfer_func = NULL; + } } /******************************************************************************* |