summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2017-10-03 12:39:02 +1000
committerAlex Deucher <alexander.deucher@amd.com>2017-10-06 13:10:25 -0400
commit8ee5702afdd48b5864c46418ad310d6a23c8e9ab (patch)
tree2886f82300588766615d0618573604d58fd877a3 /drivers/gpu/drm/amd/display/dc/core/dc_resource.c
parentcb56aceabd36ef42bc7e081c43dc55ef57efba7a (diff)
amdgpu/dc: use kref for dc_state.
I'm not a huge fan of those copying around refcounts bits, might want to consider alternates, but this should work for now. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-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.c4
1 files changed, 2 insertions, 2 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 99a4d19f582d..77b3474a7c9e 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
@@ -2432,7 +2432,7 @@ void dc_resource_state_copy_construct(
struct dc_state *dst_ctx)
{
int i, j;
- atomic_t ref_count = dst_ctx->ref_count;
+ struct kref refcount = dst_ctx->refcount;
*dst_ctx = *src_ctx;
@@ -2455,7 +2455,7 @@ void dc_resource_state_copy_construct(
}
/* context refcount should not be overridden */
- dst_ctx->ref_count = ref_count;
+ dst_ctx->refcount = refcount;
}