Commit 7465280c authored by Alex Deucher's avatar Alex Deucher Committed by Dave Airlie

drm/radeon/kms: add support for multiple fence queues v2

For supporting multiple CP ring buffers, async DMA
engines and UVD.  We still need a way to synchronize
between engines.

v2 initialize unused fence driver ring to avoid issue in
   suspend/unload
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarChristian König <deathsimple@vodafone.de>
Reviewed-by: default avatarJerome Glisse <jglisse@redhat.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 851a6bd9
...@@ -3018,11 +3018,11 @@ int evergreen_irq_process(struct radeon_device *rdev) ...@@ -3018,11 +3018,11 @@ int evergreen_irq_process(struct radeon_device *rdev)
case 177: /* CP_INT in IB1 */ case 177: /* CP_INT in IB1 */
case 178: /* CP_INT in IB2 */ case 178: /* CP_INT in IB2 */
DRM_DEBUG("IH: CP int: 0x%08x\n", src_data); DRM_DEBUG("IH: CP int: 0x%08x\n", src_data);
radeon_fence_process(rdev); radeon_fence_process(rdev, RADEON_RING_TYPE_GFX_INDEX);
break; break;
case 181: /* CP EOP event */ case 181: /* CP EOP event */
DRM_DEBUG("IH: CP EOP\n"); DRM_DEBUG("IH: CP EOP\n");
radeon_fence_process(rdev); radeon_fence_process(rdev, RADEON_RING_TYPE_GFX_INDEX);
break; break;
case 233: /* GUI IDLE */ case 233: /* GUI IDLE */
DRM_DEBUG("IH: GUI idle\n"); DRM_DEBUG("IH: GUI idle\n");
...@@ -3221,7 +3221,7 @@ int evergreen_init(struct radeon_device *rdev) ...@@ -3221,7 +3221,7 @@ int evergreen_init(struct radeon_device *rdev)
/* Initialize clocks */ /* Initialize clocks */
radeon_get_clock_info(rdev->ddev); radeon_get_clock_info(rdev->ddev);
/* Fence driver */ /* Fence driver */
r = radeon_fence_driver_init(rdev); r = radeon_fence_driver_init(rdev, 1);
if (r) if (r)
return r; return r;
/* initialize AGP */ /* initialize AGP */
......
...@@ -1484,7 +1484,7 @@ int cayman_init(struct radeon_device *rdev) ...@@ -1484,7 +1484,7 @@ int cayman_init(struct radeon_device *rdev)
/* Initialize clocks */ /* Initialize clocks */
radeon_get_clock_info(rdev->ddev); radeon_get_clock_info(rdev->ddev);
/* Fence driver */ /* Fence driver */
r = radeon_fence_driver_init(rdev); r = radeon_fence_driver_init(rdev, 3);
if (r) if (r)
return r; return r;
/* initialize memory controller */ /* initialize memory controller */
......
...@@ -739,7 +739,7 @@ int r100_irq_process(struct radeon_device *rdev) ...@@ -739,7 +739,7 @@ int r100_irq_process(struct radeon_device *rdev)
while (status) { while (status) {
/* SW interrupt */ /* SW interrupt */
if (status & RADEON_SW_INT_TEST) { if (status & RADEON_SW_INT_TEST) {
radeon_fence_process(rdev); radeon_fence_process(rdev, RADEON_RING_TYPE_GFX_INDEX);
} }
/* gui idle interrupt */ /* gui idle interrupt */
if (status & RADEON_GUI_IDLE_STAT) { if (status & RADEON_GUI_IDLE_STAT) {
...@@ -826,7 +826,7 @@ void r100_fence_ring_emit(struct radeon_device *rdev, ...@@ -826,7 +826,7 @@ void r100_fence_ring_emit(struct radeon_device *rdev,
radeon_ring_write(rdev, PACKET0(RADEON_HOST_PATH_CNTL, 0)); radeon_ring_write(rdev, PACKET0(RADEON_HOST_PATH_CNTL, 0));
radeon_ring_write(rdev, rdev->config.r100.hdp_cntl); radeon_ring_write(rdev, rdev->config.r100.hdp_cntl);
/* Emit fence sequence & fire IRQ */ /* Emit fence sequence & fire IRQ */
radeon_ring_write(rdev, PACKET0(rdev->fence_drv.scratch_reg, 0)); radeon_ring_write(rdev, PACKET0(rdev->fence_drv[fence->ring].scratch_reg, 0));
radeon_ring_write(rdev, fence->seq); radeon_ring_write(rdev, fence->seq);
radeon_ring_write(rdev, PACKET0(RADEON_GEN_INT_STATUS, 0)); radeon_ring_write(rdev, PACKET0(RADEON_GEN_INT_STATUS, 0));
radeon_ring_write(rdev, RADEON_SW_INT_FIRE); radeon_ring_write(rdev, RADEON_SW_INT_FIRE);
...@@ -4048,7 +4048,7 @@ int r100_init(struct radeon_device *rdev) ...@@ -4048,7 +4048,7 @@ int r100_init(struct radeon_device *rdev)
/* initialize VRAM */ /* initialize VRAM */
r100_mc_init(rdev); r100_mc_init(rdev);
/* Fence driver */ /* Fence driver */
r = radeon_fence_driver_init(rdev); r = radeon_fence_driver_init(rdev, 1);
if (r) if (r)
return r; return r;
r = radeon_irq_kms_init(rdev); r = radeon_irq_kms_init(rdev);
......
...@@ -198,7 +198,7 @@ void r300_fence_ring_emit(struct radeon_device *rdev, ...@@ -198,7 +198,7 @@ void r300_fence_ring_emit(struct radeon_device *rdev,
radeon_ring_write(rdev, PACKET0(RADEON_HOST_PATH_CNTL, 0)); radeon_ring_write(rdev, PACKET0(RADEON_HOST_PATH_CNTL, 0));
radeon_ring_write(rdev, rdev->config.r300.hdp_cntl); radeon_ring_write(rdev, rdev->config.r300.hdp_cntl);
/* Emit fence sequence & fire IRQ */ /* Emit fence sequence & fire IRQ */
radeon_ring_write(rdev, PACKET0(rdev->fence_drv.scratch_reg, 0)); radeon_ring_write(rdev, PACKET0(rdev->fence_drv[fence->ring].scratch_reg, 0));
radeon_ring_write(rdev, fence->seq); radeon_ring_write(rdev, fence->seq);
radeon_ring_write(rdev, PACKET0(RADEON_GEN_INT_STATUS, 0)); radeon_ring_write(rdev, PACKET0(RADEON_GEN_INT_STATUS, 0));
radeon_ring_write(rdev, RADEON_SW_INT_FIRE); radeon_ring_write(rdev, RADEON_SW_INT_FIRE);
...@@ -1518,7 +1518,7 @@ int r300_init(struct radeon_device *rdev) ...@@ -1518,7 +1518,7 @@ int r300_init(struct radeon_device *rdev)
/* initialize memory controller */ /* initialize memory controller */
r300_mc_init(rdev); r300_mc_init(rdev);
/* Fence driver */ /* Fence driver */
r = radeon_fence_driver_init(rdev); r = radeon_fence_driver_init(rdev, 1);
if (r) if (r)
return r; return r;
r = radeon_irq_kms_init(rdev); r = radeon_irq_kms_init(rdev);
......
...@@ -387,7 +387,7 @@ int r420_init(struct radeon_device *rdev) ...@@ -387,7 +387,7 @@ int r420_init(struct radeon_device *rdev)
r300_mc_init(rdev); r300_mc_init(rdev);
r420_debugfs(rdev); r420_debugfs(rdev);
/* Fence driver */ /* Fence driver */
r = radeon_fence_driver_init(rdev); r = radeon_fence_driver_init(rdev, 1);
if (r) { if (r) {
return r; return r;
} }
......
...@@ -278,7 +278,7 @@ int r520_init(struct radeon_device *rdev) ...@@ -278,7 +278,7 @@ int r520_init(struct radeon_device *rdev)
r520_mc_init(rdev); r520_mc_init(rdev);
rv515_debugfs(rdev); rv515_debugfs(rdev);
/* Fence driver */ /* Fence driver */
r = radeon_fence_driver_init(rdev); r = radeon_fence_driver_init(rdev, 1);
if (r) if (r)
return r; return r;
r = radeon_irq_kms_init(rdev); r = radeon_irq_kms_init(rdev);
......
...@@ -2316,7 +2316,7 @@ void r600_fence_ring_emit(struct radeon_device *rdev, ...@@ -2316,7 +2316,7 @@ void r600_fence_ring_emit(struct radeon_device *rdev,
{ {
if (rdev->wb.use_event) { if (rdev->wb.use_event) {
u64 addr = rdev->wb.gpu_addr + R600_WB_EVENT_OFFSET + u64 addr = rdev->wb.gpu_addr + R600_WB_EVENT_OFFSET +
(u64)(rdev->fence_drv.scratch_reg - rdev->scratch.reg_base); (u64)(rdev->fence_drv[fence->ring].scratch_reg - rdev->scratch.reg_base);
/* flush read cache over gart */ /* flush read cache over gart */
radeon_ring_write(rdev, PACKET3(PACKET3_SURFACE_SYNC, 3)); radeon_ring_write(rdev, PACKET3(PACKET3_SURFACE_SYNC, 3));
radeon_ring_write(rdev, PACKET3_TC_ACTION_ENA | radeon_ring_write(rdev, PACKET3_TC_ACTION_ENA |
...@@ -2349,7 +2349,7 @@ void r600_fence_ring_emit(struct radeon_device *rdev, ...@@ -2349,7 +2349,7 @@ void r600_fence_ring_emit(struct radeon_device *rdev,
radeon_ring_write(rdev, WAIT_3D_IDLE_bit | WAIT_3D_IDLECLEAN_bit); radeon_ring_write(rdev, WAIT_3D_IDLE_bit | WAIT_3D_IDLECLEAN_bit);
/* Emit fence sequence & fire IRQ */ /* Emit fence sequence & fire IRQ */
radeon_ring_write(rdev, PACKET3(PACKET3_SET_CONFIG_REG, 1)); radeon_ring_write(rdev, PACKET3(PACKET3_SET_CONFIG_REG, 1));
radeon_ring_write(rdev, ((rdev->fence_drv.scratch_reg - PACKET3_SET_CONFIG_REG_OFFSET) >> 2)); radeon_ring_write(rdev, ((rdev->fence_drv[fence->ring].scratch_reg - PACKET3_SET_CONFIG_REG_OFFSET) >> 2));
radeon_ring_write(rdev, fence->seq); radeon_ring_write(rdev, fence->seq);
/* CP_INTERRUPT packet 3 no longer exists, use packet 0 */ /* CP_INTERRUPT packet 3 no longer exists, use packet 0 */
radeon_ring_write(rdev, PACKET0(CP_INT_STATUS, 0)); radeon_ring_write(rdev, PACKET0(CP_INT_STATUS, 0));
...@@ -2575,7 +2575,7 @@ int r600_init(struct radeon_device *rdev) ...@@ -2575,7 +2575,7 @@ int r600_init(struct radeon_device *rdev)
/* Initialize clocks */ /* Initialize clocks */
radeon_get_clock_info(rdev->ddev); radeon_get_clock_info(rdev->ddev);
/* Fence driver */ /* Fence driver */
r = radeon_fence_driver_init(rdev); r = radeon_fence_driver_init(rdev, 1);
if (r) if (r)
return r; return r;
if (rdev->flags & RADEON_IS_AGP) { if (rdev->flags & RADEON_IS_AGP) {
...@@ -3459,11 +3459,11 @@ int r600_irq_process(struct radeon_device *rdev) ...@@ -3459,11 +3459,11 @@ int r600_irq_process(struct radeon_device *rdev)
case 177: /* CP_INT in IB1 */ case 177: /* CP_INT in IB1 */
case 178: /* CP_INT in IB2 */ case 178: /* CP_INT in IB2 */
DRM_DEBUG("IH: CP int: 0x%08x\n", src_data); DRM_DEBUG("IH: CP int: 0x%08x\n", src_data);
radeon_fence_process(rdev); radeon_fence_process(rdev, RADEON_RING_TYPE_GFX_INDEX);
break; break;
case 181: /* CP EOP event */ case 181: /* CP EOP event */
DRM_DEBUG("IH: CP EOP\n"); DRM_DEBUG("IH: CP EOP\n");
radeon_fence_process(rdev); radeon_fence_process(rdev, RADEON_RING_TYPE_GFX_INDEX);
break; break;
case 233: /* GUI IDLE */ case 233: /* GUI IDLE */
DRM_DEBUG("IH: GUI idle\n"); DRM_DEBUG("IH: GUI idle\n");
......
...@@ -197,7 +197,6 @@ struct radeon_fence_driver { ...@@ -197,7 +197,6 @@ struct radeon_fence_driver {
unsigned long last_jiffies; unsigned long last_jiffies;
unsigned long last_timeout; unsigned long last_timeout;
wait_queue_head_t queue; wait_queue_head_t queue;
rwlock_t lock;
struct list_head created; struct list_head created;
struct list_head emitted; struct list_head emitted;
struct list_head signaled; struct list_head signaled;
...@@ -212,17 +211,19 @@ struct radeon_fence { ...@@ -212,17 +211,19 @@ struct radeon_fence {
uint32_t seq; uint32_t seq;
bool emitted; bool emitted;
bool signaled; bool signaled;
/* RB, DMA, etc. */
int ring;
}; };
int radeon_fence_driver_init(struct radeon_device *rdev); int radeon_fence_driver_init(struct radeon_device *rdev, int num_rings);
void radeon_fence_driver_fini(struct radeon_device *rdev); void radeon_fence_driver_fini(struct radeon_device *rdev);
int radeon_fence_create(struct radeon_device *rdev, struct radeon_fence **fence); int radeon_fence_create(struct radeon_device *rdev, struct radeon_fence **fence, int ring);
int radeon_fence_emit(struct radeon_device *rdev, struct radeon_fence *fence); int radeon_fence_emit(struct radeon_device *rdev, struct radeon_fence *fence);
void radeon_fence_process(struct radeon_device *rdev); void radeon_fence_process(struct radeon_device *rdev, int ring);
bool radeon_fence_signaled(struct radeon_fence *fence); bool radeon_fence_signaled(struct radeon_fence *fence);
int radeon_fence_wait(struct radeon_fence *fence, bool interruptible); int radeon_fence_wait(struct radeon_fence *fence, bool interruptible);
int radeon_fence_wait_next(struct radeon_device *rdev); int radeon_fence_wait_next(struct radeon_device *rdev, int ring);
int radeon_fence_wait_last(struct radeon_device *rdev); int radeon_fence_wait_last(struct radeon_device *rdev, int ring);
struct radeon_fence *radeon_fence_ref(struct radeon_fence *fence); struct radeon_fence *radeon_fence_ref(struct radeon_fence *fence);
void radeon_fence_unref(struct radeon_fence **fence); void radeon_fence_unref(struct radeon_fence **fence);
...@@ -459,6 +460,18 @@ void radeon_irq_kms_pflip_irq_put(struct radeon_device *rdev, int crtc); ...@@ -459,6 +460,18 @@ void radeon_irq_kms_pflip_irq_put(struct radeon_device *rdev, int crtc);
/* /*
* CP & ring. * CP & ring.
*/ */
/* max number of rings */
#define RADEON_NUM_RINGS 3
/* internal ring indices */
/* r1xx+ has gfx CP ring */
#define RADEON_RING_TYPE_GFX_INDEX 0
/* cayman has 2 compute CP rings */
#define CAYMAN_RING_TYPE_CP1_INDEX 1
#define CAYMAN_RING_TYPE_CP2_INDEX 2
struct radeon_ib { struct radeon_ib {
struct list_head list; struct list_head list;
unsigned idx; unsigned idx;
...@@ -1235,7 +1248,8 @@ struct radeon_device { ...@@ -1235,7 +1248,8 @@ struct radeon_device {
struct radeon_mode_info mode_info; struct radeon_mode_info mode_info;
struct radeon_scratch scratch; struct radeon_scratch scratch;
struct radeon_mman mman; struct radeon_mman mman;
struct radeon_fence_driver fence_drv; rwlock_t fence_lock;
struct radeon_fence_driver fence_drv[RADEON_NUM_RINGS];
struct radeon_cp cp; struct radeon_cp cp;
/* cayman compute rings */ /* cayman compute rings */
struct radeon_cp cp1; struct radeon_cp cp1;
......
...@@ -43,7 +43,7 @@ static int radeon_benchmark_do_move(struct radeon_device *rdev, unsigned size, ...@@ -43,7 +43,7 @@ static int radeon_benchmark_do_move(struct radeon_device *rdev, unsigned size,
start_jiffies = jiffies; start_jiffies = jiffies;
for (i = 0; i < n; i++) { for (i = 0; i < n; i++) {
r = radeon_fence_create(rdev, &fence); r = radeon_fence_create(rdev, &fence, RADEON_RING_TYPE_GFX_INDEX);
if (r) if (r)
return r; return r;
......
...@@ -725,7 +725,7 @@ int radeon_device_init(struct radeon_device *rdev, ...@@ -725,7 +725,7 @@ int radeon_device_init(struct radeon_device *rdev,
mutex_init(&rdev->gem.mutex); mutex_init(&rdev->gem.mutex);
mutex_init(&rdev->pm.mutex); mutex_init(&rdev->pm.mutex);
mutex_init(&rdev->vram_mutex); mutex_init(&rdev->vram_mutex);
rwlock_init(&rdev->fence_drv.lock); rwlock_init(&rdev->fence_lock);
INIT_LIST_HEAD(&rdev->gem.objects); INIT_LIST_HEAD(&rdev->gem.objects);
init_waitqueue_head(&rdev->irq.vblank_queue); init_waitqueue_head(&rdev->irq.vblank_queue);
init_waitqueue_head(&rdev->irq.idle_queue); init_waitqueue_head(&rdev->irq.idle_queue);
...@@ -857,7 +857,7 @@ int radeon_suspend_kms(struct drm_device *dev, pm_message_t state) ...@@ -857,7 +857,7 @@ int radeon_suspend_kms(struct drm_device *dev, pm_message_t state)
struct radeon_device *rdev; struct radeon_device *rdev;
struct drm_crtc *crtc; struct drm_crtc *crtc;
struct drm_connector *connector; struct drm_connector *connector;
int r; int i, r;
if (dev == NULL || dev->dev_private == NULL) { if (dev == NULL || dev->dev_private == NULL) {
return -ENODEV; return -ENODEV;
...@@ -896,7 +896,8 @@ int radeon_suspend_kms(struct drm_device *dev, pm_message_t state) ...@@ -896,7 +896,8 @@ int radeon_suspend_kms(struct drm_device *dev, pm_message_t state)
/* evict vram memory */ /* evict vram memory */
radeon_bo_evict_vram(rdev); radeon_bo_evict_vram(rdev);
/* wait for gpu to finish processing current batch */ /* wait for gpu to finish processing current batch */
radeon_fence_wait_last(rdev); for (i = 0; i < RADEON_NUM_RINGS; i++)
radeon_fence_wait_last(rdev, i);
radeon_save_bios_scratch_regs(rdev); radeon_save_bios_scratch_regs(rdev);
......
This diff is collapsed.
...@@ -271,7 +271,7 @@ static void radeon_pm_set_clocks(struct radeon_device *rdev) ...@@ -271,7 +271,7 @@ static void radeon_pm_set_clocks(struct radeon_device *rdev)
if (rdev->cp.ready) { if (rdev->cp.ready) {
struct radeon_fence *fence; struct radeon_fence *fence;
radeon_ring_alloc(rdev, 64); radeon_ring_alloc(rdev, 64);
radeon_fence_create(rdev, &fence); radeon_fence_create(rdev, &fence, RADEON_RING_TYPE_GFX_INDEX);
radeon_fence_emit(rdev, fence); radeon_fence_emit(rdev, fence);
radeon_ring_commit(rdev); radeon_ring_commit(rdev);
radeon_fence_wait(fence, false); radeon_fence_wait(fence, false);
...@@ -797,17 +797,25 @@ static void radeon_dynpm_idle_work_handler(struct work_struct *work) ...@@ -797,17 +797,25 @@ static void radeon_dynpm_idle_work_handler(struct work_struct *work)
if (rdev->pm.dynpm_state == DYNPM_STATE_ACTIVE) { if (rdev->pm.dynpm_state == DYNPM_STATE_ACTIVE) {
unsigned long irq_flags; unsigned long irq_flags;
int not_processed = 0; int not_processed = 0;
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;
read_lock_irqsave(&rdev->fence_drv.lock, irq_flags); if (!list_empty(&rdev->fence_drv[i].emitted)) {
if (!list_empty(&rdev->fence_drv.emitted)) {
struct list_head *ptr; struct list_head *ptr;
list_for_each(ptr, &rdev->fence_drv.emitted) { list_for_each(ptr, &rdev->fence_drv[i].emitted) {
/* count up to 3, that's enought info */ /* count up to 3, that's enought info */
if (++not_processed >= 3) if (++not_processed >= 3)
break; break;
} }
} }
read_unlock_irqrestore(&rdev->fence_drv.lock, irq_flags); if (not_processed >= 3)
break;
}
read_unlock_irqrestore(&rdev->fence_lock, irq_flags);
if (not_processed >= 3) { /* should upclock */ if (not_processed >= 3) { /* should upclock */
if (rdev->pm.dynpm_planned_action == DYNPM_ACTION_DOWNCLOCK) { if (rdev->pm.dynpm_planned_action == DYNPM_ACTION_DOWNCLOCK) {
......
...@@ -113,7 +113,7 @@ int radeon_ib_get(struct radeon_device *rdev, struct radeon_ib **ib) ...@@ -113,7 +113,7 @@ int radeon_ib_get(struct radeon_device *rdev, struct radeon_ib **ib)
int r = 0, i, c; int r = 0, i, c;
*ib = NULL; *ib = NULL;
r = radeon_fence_create(rdev, &fence); r = radeon_fence_create(rdev, &fence, RADEON_RING_TYPE_GFX_INDEX);
if (r) { if (r) {
dev_err(rdev->dev, "failed to create fence for new IB\n"); dev_err(rdev->dev, "failed to create fence for new IB\n");
return r; return r;
...@@ -314,7 +314,7 @@ int radeon_ring_alloc(struct radeon_device *rdev, unsigned ndw) ...@@ -314,7 +314,7 @@ int radeon_ring_alloc(struct radeon_device *rdev, unsigned ndw)
if (ndw < rdev->cp.ring_free_dw) { if (ndw < rdev->cp.ring_free_dw) {
break; break;
} }
r = radeon_fence_wait_next(rdev); r = radeon_fence_wait_next(rdev, RADEON_RING_TYPE_GFX_INDEX);
if (r) if (r)
return r; return r;
} }
......
...@@ -104,7 +104,7 @@ void radeon_test_moves(struct radeon_device *rdev) ...@@ -104,7 +104,7 @@ void radeon_test_moves(struct radeon_device *rdev)
radeon_bo_kunmap(gtt_obj[i]); radeon_bo_kunmap(gtt_obj[i]);
r = radeon_fence_create(rdev, &fence); r = radeon_fence_create(rdev, &fence, RADEON_RING_TYPE_GFX_INDEX);
if (r) { if (r) {
DRM_ERROR("Failed to create GTT->VRAM fence %d\n", i); DRM_ERROR("Failed to create GTT->VRAM fence %d\n", i);
goto out_cleanup; goto out_cleanup;
...@@ -153,7 +153,7 @@ void radeon_test_moves(struct radeon_device *rdev) ...@@ -153,7 +153,7 @@ void radeon_test_moves(struct radeon_device *rdev)
radeon_bo_kunmap(vram_obj); radeon_bo_kunmap(vram_obj);
r = radeon_fence_create(rdev, &fence); r = radeon_fence_create(rdev, &fence, RADEON_RING_TYPE_GFX_INDEX);
if (r) { if (r) {
DRM_ERROR("Failed to create VRAM->GTT fence %d\n", i); DRM_ERROR("Failed to create VRAM->GTT fence %d\n", i);
goto out_cleanup; goto out_cleanup;
......
...@@ -226,7 +226,7 @@ static int radeon_move_blit(struct ttm_buffer_object *bo, ...@@ -226,7 +226,7 @@ static int radeon_move_blit(struct ttm_buffer_object *bo,
int r; int r;
rdev = radeon_get_rdev(bo->bdev); rdev = radeon_get_rdev(bo->bdev);
r = radeon_fence_create(rdev, &fence); r = radeon_fence_create(rdev, &fence, RADEON_RING_TYPE_GFX_INDEX);
if (unlikely(r)) { if (unlikely(r)) {
return r; return r;
} }
......
...@@ -516,7 +516,7 @@ int rs400_init(struct radeon_device *rdev) ...@@ -516,7 +516,7 @@ int rs400_init(struct radeon_device *rdev)
/* initialize memory controller */ /* initialize memory controller */
rs400_mc_init(rdev); rs400_mc_init(rdev);
/* Fence driver */ /* Fence driver */
r = radeon_fence_driver_init(rdev); r = radeon_fence_driver_init(rdev, 1);
if (r) if (r)
return r; return r;
r = radeon_irq_kms_init(rdev); r = radeon_irq_kms_init(rdev);
......
...@@ -642,7 +642,7 @@ int rs600_irq_process(struct radeon_device *rdev) ...@@ -642,7 +642,7 @@ int rs600_irq_process(struct radeon_device *rdev)
while (status || rdev->irq.stat_regs.r500.disp_int) { while (status || rdev->irq.stat_regs.r500.disp_int) {
/* SW interrupt */ /* SW interrupt */
if (G_000044_SW_INT(status)) { if (G_000044_SW_INT(status)) {
radeon_fence_process(rdev); radeon_fence_process(rdev, RADEON_RING_TYPE_GFX_INDEX);
} }
/* GUI idle */ /* GUI idle */
if (G_000040_GUI_IDLE(status)) { if (G_000040_GUI_IDLE(status)) {
...@@ -962,7 +962,7 @@ int rs600_init(struct radeon_device *rdev) ...@@ -962,7 +962,7 @@ int rs600_init(struct radeon_device *rdev)
rs600_mc_init(rdev); rs600_mc_init(rdev);
rs600_debugfs(rdev); rs600_debugfs(rdev);
/* Fence driver */ /* Fence driver */
r = radeon_fence_driver_init(rdev); r = radeon_fence_driver_init(rdev, 1);
if (r) if (r)
return r; return r;
r = radeon_irq_kms_init(rdev); r = radeon_irq_kms_init(rdev);
......
...@@ -735,7 +735,7 @@ int rs690_init(struct radeon_device *rdev) ...@@ -735,7 +735,7 @@ int rs690_init(struct radeon_device *rdev)
rs690_mc_init(rdev); rs690_mc_init(rdev);
rv515_debugfs(rdev); rv515_debugfs(rdev);
/* Fence driver */ /* Fence driver */
r = radeon_fence_driver_init(rdev); r = radeon_fence_driver_init(rdev, 1);
if (r) if (r)
return r; return r;
r = radeon_irq_kms_init(rdev); r = radeon_irq_kms_init(rdev);
......
...@@ -510,7 +510,7 @@ int rv515_init(struct radeon_device *rdev) ...@@ -510,7 +510,7 @@ int rv515_init(struct radeon_device *rdev)
rv515_mc_init(rdev); rv515_mc_init(rdev);
rv515_debugfs(rdev); rv515_debugfs(rdev);
/* Fence driver */ /* Fence driver */
r = radeon_fence_driver_init(rdev); r = radeon_fence_driver_init(rdev, 1);
if (r) if (r)
return r; return r;
r = radeon_irq_kms_init(rdev); r = radeon_irq_kms_init(rdev);
......
...@@ -1194,7 +1194,7 @@ int rv770_init(struct radeon_device *rdev) ...@@ -1194,7 +1194,7 @@ int rv770_init(struct radeon_device *rdev)
/* Initialize clocks */ /* Initialize clocks */
radeon_get_clock_info(rdev->ddev); radeon_get_clock_info(rdev->ddev);
/* Fence driver */ /* Fence driver */
r = radeon_fence_driver_init(rdev); r = radeon_fence_driver_init(rdev, 1);
if (r) if (r)
return r; return r;
/* initialize AGP */ /* initialize AGP */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment