summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
diff options
context:
space:
mode:
authorHarry Wentland <harry.wentland@amd.com>2017-09-05 15:50:48 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-09-26 18:17:36 -0400
commit21e67d4d52ca8688feb8c4f6e6d29b2d16d578ad (patch)
tree443a216be2ae1d2374bafd03b4612001e20f234e /drivers/gpu/drm/amd/display/dc/core/dc_resource.c
parente74c6972f85d48de4d2fe797ddd0fbc8bd899f0e (diff)
drm/amd/display: No need to keep track of unreffed clk sources
This simplifies clock source reprogramming a bit. Signed-off-by: Harry Wentland <harry.wentland@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_resource.c')
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc_resource.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
index 9aa0da743174..15b627548cd2 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
@@ -261,13 +261,12 @@ bool resource_construct(
}
-bool resource_unreference_clock_source(
+void resource_unreference_clock_source(
struct resource_context *res_ctx,
const struct resource_pool *pool,
struct clock_source *clock_source)
{
int i;
- bool need_reset = false;
for (i = 0; i < pool->clk_src_count; i++) {
if (pool->clock_sources[i] != clock_source)
@@ -275,24 +274,11 @@ bool resource_unreference_clock_source(
res_ctx->clock_source_ref_count[i]--;
- if (res_ctx->clock_source_ref_count[i] == 0) {
- res_ctx->clock_source_changed[i] = true;
- need_reset = true;
- }
-
break;
}
- if (pool->dp_clock_source == clock_source) {
+ if (pool->dp_clock_source == clock_source)
res_ctx->dp_clock_source_ref_count--;
-
- if (res_ctx->dp_clock_source_ref_count == 0) {
- res_ctx->dp_clock_source_changed = true;
- need_reset = true;
- }
- }
-
- return need_reset;
}
void resource_reference_clock_source(