diff options
author | Harry Wentland <harry.wentland@amd.com> | 2017-07-24 15:30:17 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-09-26 18:15:38 -0400 |
commit | 7a6c4af6bf41516cc9e12d83cc8fcebfdd8be01c (patch) | |
tree | 6ffbb71b300a64ebe47fb08b89e72fded03be310 /drivers/gpu/drm/amd/display/dc/core/dc_surface.c | |
parent | 0b0aab86d51ee63d521f0d96ff4dfe1d6252f9b2 (diff) | |
download | op-kernel-dev-7a6c4af6bf41516cc9e12d83cc8fcebfdd8be01c.zip op-kernel-dev-7a6c4af6bf41516cc9e12d83cc8fcebfdd8be01c.tar.gz |
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.c | 22 |
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 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; |