[PATCH 23/26] drm/radeon: add missing locking to fence debugfs function
Christian König
deathsimple at vodafone.de
Wed Apr 25 05:46:40 PDT 2012
Signed-off-by: Christian König <deathsimple at vodafone.de>
---
drivers/gpu/drm/radeon/radeon_fence.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c
index 66e6ee0..09e13e3 100644
--- a/drivers/gpu/drm/radeon/radeon_fence.c
+++ b/drivers/gpu/drm/radeon/radeon_fence.c
@@ -492,8 +492,10 @@ static int radeon_debugfs_fence_info(struct seq_file *m, void *data)
struct drm_device *dev = node->minor->dev;
struct radeon_device *rdev = dev->dev_private;
struct radeon_fence *fence;
+ unsigned long irq_flags;
int i;
+ read_lock_irqsave(&rdev->fence_lock, irq_flags);
for (i = 0; i < RADEON_NUM_RINGS; ++i) {
if (!rdev->fence_drv[i].initialized)
continue;
@@ -508,6 +510,7 @@ static int radeon_debugfs_fence_info(struct seq_file *m, void *data)
fence, fence->seq);
}
}
+ read_unlock_irqrestore(&rdev->fence_lock, irq_flags);
return 0;
}
--
1.7.5.4
More information about the dri-devel
mailing list