aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display/dc/core/dc_surface.c
diff options
context:
space:
mode:
authorHarry Wentland <harry.wentland@amd.com>2017-07-24 15:30:17 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-09-26 18:15:38 -0400
commit7a6c4af6bf41516cc9e12d83cc8fcebfdd8be01c (patch)
tree6ffbb71b300a64ebe47fb08b89e72fded03be310 /drivers/gpu/drm/amd/display/dc/core/dc_surface.c
parentdrm/amd/display: Roll gamma struct into core_gamma (diff)
downloadlinux-dev-7a6c4af6bf41516cc9e12d83cc8fcebfdd8be01c.tar.xz
linux-dev-7a6c4af6bf41516cc9e12d83cc8fcebfdd8be01c.zip
drm/amd/display: Roll core_gamma into dc_gamma
Signed-off-by: Harry Wentland <harry.wentland@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.c22
1 files changed, 9 insertions, 13 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 a8b9515fd367..eded6b7da97d 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_surface.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_surface.c
@@ -137,37 +137,33 @@ void dc_surface_release(struct dc_surface *surface)
}
}
-void dc_gamma_retain(const struct dc_gamma *dc_gamma)
+void dc_gamma_retain(struct dc_gamma *gamma)
{
- struct core_gamma *gamma = DC_GAMMA_TO_CORE(dc_gamma);
-
ASSERT(gamma->ref_count > 0);
++gamma->ref_count;
}
-void dc_gamma_release(const struct dc_gamma **dc_gamma)
+void dc_gamma_release(struct dc_gamma **gamma)
{
- struct core_gamma *gamma = DC_GAMMA_TO_CORE(*dc_gamma);
-
- ASSERT(gamma->ref_count > 0);
- --gamma->ref_count;
+ ASSERT((*gamma)->ref_count > 0);
+ --(*gamma)->ref_count;
- if (gamma->ref_count == 0)
- dm_free(gamma);
+ if ((*gamma)->ref_count == 0)
+ dm_free((*gamma));
- *dc_gamma = NULL;
+ *gamma = NULL;
}
struct dc_gamma *dc_create_gamma()
{
- struct core_gamma *gamma = dm_alloc(sizeof(*gamma));
+ struct dc_gamma *gamma = dm_alloc(sizeof(*gamma));
if (gamma == NULL)
goto alloc_fail;
++gamma->ref_count;
- return &gamma->public;
+ return gamma;
alloc_fail:
return NULL;