From 7a6c4af6bf41516cc9e12d83cc8fcebfdd8be01c Mon Sep 17 00:00:00 2001 From: Harry Wentland Date: Mon, 24 Jul 2017 15:30:17 -0400 Subject: drm/amd/display: Roll core_gamma into dc_gamma Signed-off-by: Harry Wentland Acked-by: Harry Wentland Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'drivers/gpu/drm/amd/display/dc/core/dc_surface.c') 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 a8b9515..eded6b7 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; -- cgit v1.1