aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2012-02-23 17:53:47 -0500
committerDave Airlie <airlied@redhat.com>2012-02-29 05:15:06 -0500
commitc79a49ca000ebcf4adf5448366284c5c1f25aa20 (patch)
treeaeac4745e74f3600a8589739bae785ce74325803 /drivers/gpu/drm
parentc5b3b8504f17003ff9cd94ff4b385a6144410b25 (diff)
drm/radeon/kms: reorganize display callbacks
tidy up the radeon_asic struct. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König<christian.koenig@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/radeon/radeon.h19
-rw-r--r--drivers/gpu/drm/radeon/radeon_asic.c137
2 files changed, 98 insertions, 58 deletions
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index 206e400dc872..a8b65d018bb3 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -1156,7 +1156,14 @@ struct radeon_asic {
1156 int (*process)(struct radeon_device *rdev); 1156 int (*process)(struct radeon_device *rdev);
1157 } irq; 1157 } irq;
1158 1158
1159 u32 (*get_vblank_counter)(struct radeon_device *rdev, int crtc); 1159 struct {
1160 /* display watermarks */
1161 void (*bandwidth_update)(struct radeon_device *rdev);
1162 /* get frame count */
1163 u32 (*get_vblank_counter)(struct radeon_device *rdev, int crtc);
1164 /* wait for vblank */
1165 void (*wait_for_vblank)(struct radeon_device *rdev, int crtc);
1166 } display;
1160 1167
1161 struct { 1168 struct {
1162 int (*blit)(struct radeon_device *rdev, 1169 int (*blit)(struct radeon_device *rdev,
@@ -1192,7 +1199,6 @@ struct radeon_asic {
1192 uint32_t tiling_flags, uint32_t pitch, 1199 uint32_t tiling_flags, uint32_t pitch,
1193 uint32_t offset, uint32_t obj_size); 1200 uint32_t offset, uint32_t obj_size);
1194 void (*clear_surface_reg)(struct radeon_device *rdev, int reg); 1201 void (*clear_surface_reg)(struct radeon_device *rdev, int reg);
1195 void (*bandwidth_update)(struct radeon_device *rdev);
1196 1202
1197 struct { 1203 struct {
1198 void (*init)(struct radeon_device *rdev); 1204 void (*init)(struct radeon_device *rdev);
@@ -1224,8 +1230,7 @@ struct radeon_asic {
1224 u32 (*page_flip)(struct radeon_device *rdev, int crtc, u64 crtc_base); 1230 u32 (*page_flip)(struct radeon_device *rdev, int crtc, u64 crtc_base);
1225 void (*post_page_flip)(struct radeon_device *rdev, int crtc); 1231 void (*post_page_flip)(struct radeon_device *rdev, int crtc);
1226 } pflip; 1232 } pflip;
1227 /* wait for vblank */ 1233
1228 void (*wait_for_vblank)(struct radeon_device *rdev, int crtc);
1229 /* wait for mc_idle */ 1234 /* wait for mc_idle */
1230 int (*mc_wait_for_idle)(struct radeon_device *rdev); 1235 int (*mc_wait_for_idle)(struct radeon_device *rdev);
1231}; 1236};
@@ -1686,7 +1691,7 @@ void radeon_ring_write(struct radeon_ring *ring, uint32_t v);
1686#define radeon_ring_ib_parse(rdev, r, ib) (rdev)->asic->ring[(r)].ib_parse((rdev), (ib)) 1691#define radeon_ring_ib_parse(rdev, r, ib) (rdev)->asic->ring[(r)].ib_parse((rdev), (ib))
1687#define radeon_irq_set(rdev) (rdev)->asic->irq.set((rdev)) 1692#define radeon_irq_set(rdev) (rdev)->asic->irq.set((rdev))
1688#define radeon_irq_process(rdev) (rdev)->asic->irq.process((rdev)) 1693#define radeon_irq_process(rdev) (rdev)->asic->irq.process((rdev))
1689#define radeon_get_vblank_counter(rdev, crtc) (rdev)->asic->get_vblank_counter((rdev), (crtc)) 1694#define radeon_get_vblank_counter(rdev, crtc) (rdev)->asic->display.get_vblank_counter((rdev), (crtc))
1690#define radeon_fence_ring_emit(rdev, r, fence) (rdev)->asic->ring[(r)].emit_fence((rdev), (fence)) 1695#define radeon_fence_ring_emit(rdev, r, fence) (rdev)->asic->ring[(r)].emit_fence((rdev), (fence))
1691#define radeon_semaphore_ring_emit(rdev, r, cp, semaphore, emit_wait) (rdev)->asic->ring[(r)].emit_semaphore((rdev), (cp), (semaphore), (emit_wait)) 1696#define radeon_semaphore_ring_emit(rdev, r, cp, semaphore, emit_wait) (rdev)->asic->ring[(r)].emit_semaphore((rdev), (cp), (semaphore), (emit_wait))
1692#define radeon_copy_blit(rdev, s, d, np, f) (rdev)->asic->copy.blit((rdev), (s), (d), (np), (f)) 1697#define radeon_copy_blit(rdev, s, d, np, f) (rdev)->asic->copy.blit((rdev), (s), (d), (np), (f))
@@ -1704,7 +1709,7 @@ void radeon_ring_write(struct radeon_ring *ring, uint32_t v);
1704#define radeon_set_clock_gating(rdev, e) (rdev)->asic->set_clock_gating((rdev), (e)) 1709#define radeon_set_clock_gating(rdev, e) (rdev)->asic->set_clock_gating((rdev), (e))
1705#define radeon_set_surface_reg(rdev, r, f, p, o, s) ((rdev)->asic->set_surface_reg((rdev), (r), (f), (p), (o), (s))) 1710#define radeon_set_surface_reg(rdev, r, f, p, o, s) ((rdev)->asic->set_surface_reg((rdev), (r), (f), (p), (o), (s)))
1706#define radeon_clear_surface_reg(rdev, r) ((rdev)->asic->clear_surface_reg((rdev), (r))) 1711#define radeon_clear_surface_reg(rdev, r) ((rdev)->asic->clear_surface_reg((rdev), (r)))
1707#define radeon_bandwidth_update(rdev) (rdev)->asic->bandwidth_update((rdev)) 1712#define radeon_bandwidth_update(rdev) (rdev)->asic->display.bandwidth_update((rdev))
1708#define radeon_hpd_init(rdev) (rdev)->asic->hpd.init((rdev)) 1713#define radeon_hpd_init(rdev) (rdev)->asic->hpd.init((rdev))
1709#define radeon_hpd_fini(rdev) (rdev)->asic->hpd.fini((rdev)) 1714#define radeon_hpd_fini(rdev) (rdev)->asic->hpd.fini((rdev))
1710#define radeon_hpd_sense(rdev, h) (rdev)->asic->hpd.sense((rdev), (h)) 1715#define radeon_hpd_sense(rdev, h) (rdev)->asic->hpd.sense((rdev), (h))
@@ -1718,7 +1723,7 @@ void radeon_ring_write(struct radeon_ring *ring, uint32_t v);
1718#define radeon_pre_page_flip(rdev, crtc) rdev->asic->pflip.pre_page_flip((rdev), (crtc)) 1723#define radeon_pre_page_flip(rdev, crtc) rdev->asic->pflip.pre_page_flip((rdev), (crtc))
1719#define radeon_page_flip(rdev, crtc, base) rdev->asic->pflip.page_flip((rdev), (crtc), (base)) 1724#define radeon_page_flip(rdev, crtc, base) rdev->asic->pflip.page_flip((rdev), (crtc), (base))
1720#define radeon_post_page_flip(rdev, crtc) rdev->asic->pflip.post_page_flip((rdev), (crtc)) 1725#define radeon_post_page_flip(rdev, crtc) rdev->asic->pflip.post_page_flip((rdev), (crtc))
1721#define radeon_wait_for_vblank(rdev, crtc) rdev->asic->wait_for_vblank((rdev), (crtc)) 1726#define radeon_wait_for_vblank(rdev, crtc) rdev->asic->display.wait_for_vblank((rdev), (crtc))
1722#define radeon_mc_wait_for_idle(rdev) rdev->asic->mc_wait_for_idle((rdev)) 1727#define radeon_mc_wait_for_idle(rdev) rdev->asic->mc_wait_for_idle((rdev))
1723 1728
1724/* Common functions */ 1729/* Common functions */
diff --git a/drivers/gpu/drm/radeon/radeon_asic.c b/drivers/gpu/drm/radeon/radeon_asic.c
index 1fd6e56cafe9..01ea642e04b1 100644
--- a/drivers/gpu/drm/radeon/radeon_asic.c
+++ b/drivers/gpu/drm/radeon/radeon_asic.c
@@ -155,7 +155,11 @@ static struct radeon_asic r100_asic = {
155 .set = &r100_irq_set, 155 .set = &r100_irq_set,
156 .process = &r100_irq_process, 156 .process = &r100_irq_process,
157 }, 157 },
158 .get_vblank_counter = &r100_get_vblank_counter, 158 .display = {
159 .bandwidth_update = &r100_bandwidth_update,
160 .get_vblank_counter = &r100_get_vblank_counter,
161 .wait_for_vblank = &r100_wait_for_vblank,
162 },
159 .copy = { 163 .copy = {
160 .blit = &r100_copy_blit, 164 .blit = &r100_copy_blit,
161 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, 165 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
@@ -173,7 +177,6 @@ static struct radeon_asic r100_asic = {
173 .set_clock_gating = &radeon_legacy_set_clock_gating, 177 .set_clock_gating = &radeon_legacy_set_clock_gating,
174 .set_surface_reg = r100_set_surface_reg, 178 .set_surface_reg = r100_set_surface_reg,
175 .clear_surface_reg = r100_clear_surface_reg, 179 .clear_surface_reg = r100_clear_surface_reg,
176 .bandwidth_update = &r100_bandwidth_update,
177 .hpd = { 180 .hpd = {
178 .init = &r100_hpd_init, 181 .init = &r100_hpd_init,
179 .fini = &r100_hpd_fini, 182 .fini = &r100_hpd_fini,
@@ -194,7 +197,6 @@ static struct radeon_asic r100_asic = {
194 .page_flip = &r100_page_flip, 197 .page_flip = &r100_page_flip,
195 .post_page_flip = &r100_post_page_flip, 198 .post_page_flip = &r100_post_page_flip,
196 }, 199 },
197 .wait_for_vblank = &r100_wait_for_vblank,
198 .mc_wait_for_idle = &r100_mc_wait_for_idle, 200 .mc_wait_for_idle = &r100_mc_wait_for_idle,
199}; 201};
200 202
@@ -225,7 +227,11 @@ static struct radeon_asic r200_asic = {
225 .set = &r100_irq_set, 227 .set = &r100_irq_set,
226 .process = &r100_irq_process, 228 .process = &r100_irq_process,
227 }, 229 },
228 .get_vblank_counter = &r100_get_vblank_counter, 230 .display = {
231 .bandwidth_update = &r100_bandwidth_update,
232 .get_vblank_counter = &r100_get_vblank_counter,
233 .wait_for_vblank = &r100_wait_for_vblank,
234 },
229 .copy = { 235 .copy = {
230 .blit = &r100_copy_blit, 236 .blit = &r100_copy_blit,
231 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, 237 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
@@ -242,7 +248,6 @@ static struct radeon_asic r200_asic = {
242 .set_clock_gating = &radeon_legacy_set_clock_gating, 248 .set_clock_gating = &radeon_legacy_set_clock_gating,
243 .set_surface_reg = r100_set_surface_reg, 249 .set_surface_reg = r100_set_surface_reg,
244 .clear_surface_reg = r100_clear_surface_reg, 250 .clear_surface_reg = r100_clear_surface_reg,
245 .bandwidth_update = &r100_bandwidth_update,
246 .hpd = { 251 .hpd = {
247 .init = &r100_hpd_init, 252 .init = &r100_hpd_init,
248 .fini = &r100_hpd_fini, 253 .fini = &r100_hpd_fini,
@@ -263,7 +268,6 @@ static struct radeon_asic r200_asic = {
263 .page_flip = &r100_page_flip, 268 .page_flip = &r100_page_flip,
264 .post_page_flip = &r100_post_page_flip, 269 .post_page_flip = &r100_post_page_flip,
265 }, 270 },
266 .wait_for_vblank = &r100_wait_for_vblank,
267 .mc_wait_for_idle = &r100_mc_wait_for_idle, 271 .mc_wait_for_idle = &r100_mc_wait_for_idle,
268}; 272};
269 273
@@ -294,7 +298,11 @@ static struct radeon_asic r300_asic = {
294 .set = &r100_irq_set, 298 .set = &r100_irq_set,
295 .process = &r100_irq_process, 299 .process = &r100_irq_process,
296 }, 300 },
297 .get_vblank_counter = &r100_get_vblank_counter, 301 .display = {
302 .bandwidth_update = &r100_bandwidth_update,
303 .get_vblank_counter = &r100_get_vblank_counter,
304 .wait_for_vblank = &r100_wait_for_vblank,
305 },
298 .copy = { 306 .copy = {
299 .blit = &r100_copy_blit, 307 .blit = &r100_copy_blit,
300 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, 308 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
@@ -312,7 +320,6 @@ static struct radeon_asic r300_asic = {
312 .set_clock_gating = &radeon_legacy_set_clock_gating, 320 .set_clock_gating = &radeon_legacy_set_clock_gating,
313 .set_surface_reg = r100_set_surface_reg, 321 .set_surface_reg = r100_set_surface_reg,
314 .clear_surface_reg = r100_clear_surface_reg, 322 .clear_surface_reg = r100_clear_surface_reg,
315 .bandwidth_update = &r100_bandwidth_update,
316 .hpd = { 323 .hpd = {
317 .init = &r100_hpd_init, 324 .init = &r100_hpd_init,
318 .fini = &r100_hpd_fini, 325 .fini = &r100_hpd_fini,
@@ -333,7 +340,6 @@ static struct radeon_asic r300_asic = {
333 .page_flip = &r100_page_flip, 340 .page_flip = &r100_page_flip,
334 .post_page_flip = &r100_post_page_flip, 341 .post_page_flip = &r100_post_page_flip,
335 }, 342 },
336 .wait_for_vblank = &r100_wait_for_vblank,
337 .mc_wait_for_idle = &r300_mc_wait_for_idle, 343 .mc_wait_for_idle = &r300_mc_wait_for_idle,
338}; 344};
339 345
@@ -364,7 +370,11 @@ static struct radeon_asic r300_asic_pcie = {
364 .set = &r100_irq_set, 370 .set = &r100_irq_set,
365 .process = &r100_irq_process, 371 .process = &r100_irq_process,
366 }, 372 },
367 .get_vblank_counter = &r100_get_vblank_counter, 373 .display = {
374 .bandwidth_update = &r100_bandwidth_update,
375 .get_vblank_counter = &r100_get_vblank_counter,
376 .wait_for_vblank = &r100_wait_for_vblank,
377 },
368 .copy = { 378 .copy = {
369 .blit = &r100_copy_blit, 379 .blit = &r100_copy_blit,
370 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, 380 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
@@ -381,7 +391,6 @@ static struct radeon_asic r300_asic_pcie = {
381 .set_clock_gating = &radeon_legacy_set_clock_gating, 391 .set_clock_gating = &radeon_legacy_set_clock_gating,
382 .set_surface_reg = r100_set_surface_reg, 392 .set_surface_reg = r100_set_surface_reg,
383 .clear_surface_reg = r100_clear_surface_reg, 393 .clear_surface_reg = r100_clear_surface_reg,
384 .bandwidth_update = &r100_bandwidth_update,
385 .hpd = { 394 .hpd = {
386 .init = &r100_hpd_init, 395 .init = &r100_hpd_init,
387 .fini = &r100_hpd_fini, 396 .fini = &r100_hpd_fini,
@@ -402,7 +411,6 @@ static struct radeon_asic r300_asic_pcie = {
402 .page_flip = &r100_page_flip, 411 .page_flip = &r100_page_flip,
403 .post_page_flip = &r100_post_page_flip, 412 .post_page_flip = &r100_post_page_flip,
404 }, 413 },
405 .wait_for_vblank = &r100_wait_for_vblank,
406 .mc_wait_for_idle = &r300_mc_wait_for_idle, 414 .mc_wait_for_idle = &r300_mc_wait_for_idle,
407}; 415};
408 416
@@ -433,7 +441,11 @@ static struct radeon_asic r420_asic = {
433 .set = &r100_irq_set, 441 .set = &r100_irq_set,
434 .process = &r100_irq_process, 442 .process = &r100_irq_process,
435 }, 443 },
436 .get_vblank_counter = &r100_get_vblank_counter, 444 .display = {
445 .bandwidth_update = &r100_bandwidth_update,
446 .get_vblank_counter = &r100_get_vblank_counter,
447 .wait_for_vblank = &r100_wait_for_vblank,
448 },
437 .copy = { 449 .copy = {
438 .blit = &r100_copy_blit, 450 .blit = &r100_copy_blit,
439 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, 451 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
@@ -451,7 +463,7 @@ static struct radeon_asic r420_asic = {
451 .set_clock_gating = &radeon_atom_set_clock_gating, 463 .set_clock_gating = &radeon_atom_set_clock_gating,
452 .set_surface_reg = r100_set_surface_reg, 464 .set_surface_reg = r100_set_surface_reg,
453 .clear_surface_reg = r100_clear_surface_reg, 465 .clear_surface_reg = r100_clear_surface_reg,
454 .bandwidth_update = &r100_bandwidth_update, 466
455 .hpd = { 467 .hpd = {
456 .init = &r100_hpd_init, 468 .init = &r100_hpd_init,
457 .fini = &r100_hpd_fini, 469 .fini = &r100_hpd_fini,
@@ -472,7 +484,6 @@ static struct radeon_asic r420_asic = {
472 .page_flip = &r100_page_flip, 484 .page_flip = &r100_page_flip,
473 .post_page_flip = &r100_post_page_flip, 485 .post_page_flip = &r100_post_page_flip,
474 }, 486 },
475 .wait_for_vblank = &r100_wait_for_vblank,
476 .mc_wait_for_idle = &r300_mc_wait_for_idle, 487 .mc_wait_for_idle = &r300_mc_wait_for_idle,
477}; 488};
478 489
@@ -503,7 +514,11 @@ static struct radeon_asic rs400_asic = {
503 .set = &r100_irq_set, 514 .set = &r100_irq_set,
504 .process = &r100_irq_process, 515 .process = &r100_irq_process,
505 }, 516 },
506 .get_vblank_counter = &r100_get_vblank_counter, 517 .display = {
518 .bandwidth_update = &r100_bandwidth_update,
519 .get_vblank_counter = &r100_get_vblank_counter,
520 .wait_for_vblank = &r100_wait_for_vblank,
521 },
507 .copy = { 522 .copy = {
508 .blit = &r100_copy_blit, 523 .blit = &r100_copy_blit,
509 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, 524 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
@@ -521,7 +536,6 @@ static struct radeon_asic rs400_asic = {
521 .set_clock_gating = &radeon_legacy_set_clock_gating, 536 .set_clock_gating = &radeon_legacy_set_clock_gating,
522 .set_surface_reg = r100_set_surface_reg, 537 .set_surface_reg = r100_set_surface_reg,
523 .clear_surface_reg = r100_clear_surface_reg, 538 .clear_surface_reg = r100_clear_surface_reg,
524 .bandwidth_update = &r100_bandwidth_update,
525 .hpd = { 539 .hpd = {
526 .init = &r100_hpd_init, 540 .init = &r100_hpd_init,
527 .fini = &r100_hpd_fini, 541 .fini = &r100_hpd_fini,
@@ -542,7 +556,6 @@ static struct radeon_asic rs400_asic = {
542 .page_flip = &r100_page_flip, 556 .page_flip = &r100_page_flip,
543 .post_page_flip = &r100_post_page_flip, 557 .post_page_flip = &r100_post_page_flip,
544 }, 558 },
545 .wait_for_vblank = &r100_wait_for_vblank,
546 .mc_wait_for_idle = &rs400_mc_wait_for_idle, 559 .mc_wait_for_idle = &rs400_mc_wait_for_idle,
547}; 560};
548 561
@@ -573,7 +586,11 @@ static struct radeon_asic rs600_asic = {
573 .set = &rs600_irq_set, 586 .set = &rs600_irq_set,
574 .process = &rs600_irq_process, 587 .process = &rs600_irq_process,
575 }, 588 },
576 .get_vblank_counter = &rs600_get_vblank_counter, 589 .display = {
590 .bandwidth_update = &rs600_bandwidth_update,
591 .get_vblank_counter = &rs600_get_vblank_counter,
592 .wait_for_vblank = &avivo_wait_for_vblank,
593 },
577 .copy = { 594 .copy = {
578 .blit = &r100_copy_blit, 595 .blit = &r100_copy_blit,
579 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, 596 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
@@ -591,7 +608,6 @@ static struct radeon_asic rs600_asic = {
591 .set_clock_gating = &radeon_atom_set_clock_gating, 608 .set_clock_gating = &radeon_atom_set_clock_gating,
592 .set_surface_reg = r100_set_surface_reg, 609 .set_surface_reg = r100_set_surface_reg,
593 .clear_surface_reg = r100_clear_surface_reg, 610 .clear_surface_reg = r100_clear_surface_reg,
594 .bandwidth_update = &rs600_bandwidth_update,
595 .hpd = { 611 .hpd = {
596 .init = &rs600_hpd_init, 612 .init = &rs600_hpd_init,
597 .fini = &rs600_hpd_fini, 613 .fini = &rs600_hpd_fini,
@@ -612,7 +628,6 @@ static struct radeon_asic rs600_asic = {
612 .page_flip = &rs600_page_flip, 628 .page_flip = &rs600_page_flip,
613 .post_page_flip = &rs600_post_page_flip, 629 .post_page_flip = &rs600_post_page_flip,
614 }, 630 },
615 .wait_for_vblank = &avivo_wait_for_vblank,
616 .mc_wait_for_idle = &rs600_mc_wait_for_idle, 631 .mc_wait_for_idle = &rs600_mc_wait_for_idle,
617}; 632};
618 633
@@ -643,7 +658,11 @@ static struct radeon_asic rs690_asic = {
643 .set = &rs600_irq_set, 658 .set = &rs600_irq_set,
644 .process = &rs600_irq_process, 659 .process = &rs600_irq_process,
645 }, 660 },
646 .get_vblank_counter = &rs600_get_vblank_counter, 661 .display = {
662 .get_vblank_counter = &rs600_get_vblank_counter,
663 .bandwidth_update = &rs690_bandwidth_update,
664 .wait_for_vblank = &avivo_wait_for_vblank,
665 },
647 .copy = { 666 .copy = {
648 .blit = &r100_copy_blit, 667 .blit = &r100_copy_blit,
649 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, 668 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
@@ -661,7 +680,6 @@ static struct radeon_asic rs690_asic = {
661 .set_clock_gating = &radeon_atom_set_clock_gating, 680 .set_clock_gating = &radeon_atom_set_clock_gating,
662 .set_surface_reg = r100_set_surface_reg, 681 .set_surface_reg = r100_set_surface_reg,
663 .clear_surface_reg = r100_clear_surface_reg, 682 .clear_surface_reg = r100_clear_surface_reg,
664 .bandwidth_update = &rs690_bandwidth_update,
665 .hpd = { 683 .hpd = {
666 .init = &rs600_hpd_init, 684 .init = &rs600_hpd_init,
667 .fini = &rs600_hpd_fini, 685 .fini = &rs600_hpd_fini,
@@ -682,7 +700,6 @@ static struct radeon_asic rs690_asic = {
682 .page_flip = &rs600_page_flip, 700 .page_flip = &rs600_page_flip,
683 .post_page_flip = &rs600_post_page_flip, 701 .post_page_flip = &rs600_post_page_flip,
684 }, 702 },
685 .wait_for_vblank = &avivo_wait_for_vblank,
686 .mc_wait_for_idle = &rs690_mc_wait_for_idle, 703 .mc_wait_for_idle = &rs690_mc_wait_for_idle,
687}; 704};
688 705
@@ -713,7 +730,11 @@ static struct radeon_asic rv515_asic = {
713 .set = &rs600_irq_set, 730 .set = &rs600_irq_set,
714 .process = &rs600_irq_process, 731 .process = &rs600_irq_process,
715 }, 732 },
716 .get_vblank_counter = &rs600_get_vblank_counter, 733 .display = {
734 .get_vblank_counter = &rs600_get_vblank_counter,
735 .bandwidth_update = &rv515_bandwidth_update,
736 .wait_for_vblank = &avivo_wait_for_vblank,
737 },
717 .copy = { 738 .copy = {
718 .blit = &r100_copy_blit, 739 .blit = &r100_copy_blit,
719 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, 740 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
@@ -731,7 +752,6 @@ static struct radeon_asic rv515_asic = {
731 .set_clock_gating = &radeon_atom_set_clock_gating, 752 .set_clock_gating = &radeon_atom_set_clock_gating,
732 .set_surface_reg = r100_set_surface_reg, 753 .set_surface_reg = r100_set_surface_reg,
733 .clear_surface_reg = r100_clear_surface_reg, 754 .clear_surface_reg = r100_clear_surface_reg,
734 .bandwidth_update = &rv515_bandwidth_update,
735 .hpd = { 755 .hpd = {
736 .init = &rs600_hpd_init, 756 .init = &rs600_hpd_init,
737 .fini = &rs600_hpd_fini, 757 .fini = &rs600_hpd_fini,
@@ -752,7 +772,6 @@ static struct radeon_asic rv515_asic = {
752 .page_flip = &rs600_page_flip, 772 .page_flip = &rs600_page_flip,
753 .post_page_flip = &rs600_post_page_flip, 773 .post_page_flip = &rs600_post_page_flip,
754 }, 774 },
755 .wait_for_vblank = &avivo_wait_for_vblank,
756 .mc_wait_for_idle = &rv515_mc_wait_for_idle, 775 .mc_wait_for_idle = &rv515_mc_wait_for_idle,
757}; 776};
758 777
@@ -783,7 +802,11 @@ static struct radeon_asic r520_asic = {
783 .set = &rs600_irq_set, 802 .set = &rs600_irq_set,
784 .process = &rs600_irq_process, 803 .process = &rs600_irq_process,
785 }, 804 },
786 .get_vblank_counter = &rs600_get_vblank_counter, 805 .display = {
806 .bandwidth_update = &rv515_bandwidth_update,
807 .get_vblank_counter = &rs600_get_vblank_counter,
808 .wait_for_vblank = &avivo_wait_for_vblank,
809 },
787 .copy = { 810 .copy = {
788 .blit = &r100_copy_blit, 811 .blit = &r100_copy_blit,
789 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, 812 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
@@ -801,7 +824,6 @@ static struct radeon_asic r520_asic = {
801 .set_clock_gating = &radeon_atom_set_clock_gating, 824 .set_clock_gating = &radeon_atom_set_clock_gating,
802 .set_surface_reg = r100_set_surface_reg, 825 .set_surface_reg = r100_set_surface_reg,
803 .clear_surface_reg = r100_clear_surface_reg, 826 .clear_surface_reg = r100_clear_surface_reg,
804 .bandwidth_update = &rv515_bandwidth_update,
805 .hpd = { 827 .hpd = {
806 .init = &rs600_hpd_init, 828 .init = &rs600_hpd_init,
807 .fini = &rs600_hpd_fini, 829 .fini = &rs600_hpd_fini,
@@ -822,7 +844,6 @@ static struct radeon_asic r520_asic = {
822 .page_flip = &rs600_page_flip, 844 .page_flip = &rs600_page_flip,
823 .post_page_flip = &rs600_post_page_flip, 845 .post_page_flip = &rs600_post_page_flip,
824 }, 846 },
825 .wait_for_vblank = &avivo_wait_for_vblank,
826 .mc_wait_for_idle = &r520_mc_wait_for_idle, 847 .mc_wait_for_idle = &r520_mc_wait_for_idle,
827}; 848};
828 849
@@ -852,7 +873,11 @@ static struct radeon_asic r600_asic = {
852 .set = &r600_irq_set, 873 .set = &r600_irq_set,
853 .process = &r600_irq_process, 874 .process = &r600_irq_process,
854 }, 875 },
855 .get_vblank_counter = &rs600_get_vblank_counter, 876 .display = {
877 .bandwidth_update = &rv515_bandwidth_update,
878 .get_vblank_counter = &rs600_get_vblank_counter,
879 .wait_for_vblank = &avivo_wait_for_vblank,
880 },
856 .copy = { 881 .copy = {
857 .blit = &r600_copy_blit, 882 .blit = &r600_copy_blit,
858 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, 883 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
@@ -870,7 +895,6 @@ static struct radeon_asic r600_asic = {
870 .set_clock_gating = NULL, 895 .set_clock_gating = NULL,
871 .set_surface_reg = r600_set_surface_reg, 896 .set_surface_reg = r600_set_surface_reg,
872 .clear_surface_reg = r600_clear_surface_reg, 897 .clear_surface_reg = r600_clear_surface_reg,
873 .bandwidth_update = &rv515_bandwidth_update,
874 .hpd = { 898 .hpd = {
875 .init = &r600_hpd_init, 899 .init = &r600_hpd_init,
876 .fini = &r600_hpd_fini, 900 .fini = &r600_hpd_fini,
@@ -891,7 +915,6 @@ static struct radeon_asic r600_asic = {
891 .page_flip = &rs600_page_flip, 915 .page_flip = &rs600_page_flip,
892 .post_page_flip = &rs600_post_page_flip, 916 .post_page_flip = &rs600_post_page_flip,
893 }, 917 },
894 .wait_for_vblank = &avivo_wait_for_vblank,
895 .mc_wait_for_idle = &r600_mc_wait_for_idle, 918 .mc_wait_for_idle = &r600_mc_wait_for_idle,
896}; 919};
897 920
@@ -921,7 +944,11 @@ static struct radeon_asic rs780_asic = {
921 .set = &r600_irq_set, 944 .set = &r600_irq_set,
922 .process = &r600_irq_process, 945 .process = &r600_irq_process,
923 }, 946 },
924 .get_vblank_counter = &rs600_get_vblank_counter, 947 .display = {
948 .bandwidth_update = &rs690_bandwidth_update,
949 .get_vblank_counter = &rs600_get_vblank_counter,
950 .wait_for_vblank = &avivo_wait_for_vblank,
951 },
925 .copy = { 952 .copy = {
926 .blit = &r600_copy_blit, 953 .blit = &r600_copy_blit,
927 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, 954 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
@@ -939,7 +966,6 @@ static struct radeon_asic rs780_asic = {
939 .set_clock_gating = NULL, 966 .set_clock_gating = NULL,
940 .set_surface_reg = r600_set_surface_reg, 967 .set_surface_reg = r600_set_surface_reg,
941 .clear_surface_reg = r600_clear_surface_reg, 968 .clear_surface_reg = r600_clear_surface_reg,
942 .bandwidth_update = &rs690_bandwidth_update,
943 .hpd = { 969 .hpd = {
944 .init = &r600_hpd_init, 970 .init = &r600_hpd_init,
945 .fini = &r600_hpd_fini, 971 .fini = &r600_hpd_fini,
@@ -960,7 +986,6 @@ static struct radeon_asic rs780_asic = {
960 .page_flip = &rs600_page_flip, 986 .page_flip = &rs600_page_flip,
961 .post_page_flip = &rs600_post_page_flip, 987 .post_page_flip = &rs600_post_page_flip,
962 }, 988 },
963 .wait_for_vblank = &avivo_wait_for_vblank,
964 .mc_wait_for_idle = &r600_mc_wait_for_idle, 989 .mc_wait_for_idle = &r600_mc_wait_for_idle,
965}; 990};
966 991
@@ -990,7 +1015,11 @@ static struct radeon_asic rv770_asic = {
990 .set = &r600_irq_set, 1015 .set = &r600_irq_set,
991 .process = &r600_irq_process, 1016 .process = &r600_irq_process,
992 }, 1017 },
993 .get_vblank_counter = &rs600_get_vblank_counter, 1018 .display = {
1019 .bandwidth_update = &rv515_bandwidth_update,
1020 .get_vblank_counter = &rs600_get_vblank_counter,
1021 .wait_for_vblank = &avivo_wait_for_vblank,
1022 },
994 .copy = { 1023 .copy = {
995 .blit = &r600_copy_blit, 1024 .blit = &r600_copy_blit,
996 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, 1025 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
@@ -1008,7 +1037,6 @@ static struct radeon_asic rv770_asic = {
1008 .set_clock_gating = &radeon_atom_set_clock_gating, 1037 .set_clock_gating = &radeon_atom_set_clock_gating,
1009 .set_surface_reg = r600_set_surface_reg, 1038 .set_surface_reg = r600_set_surface_reg,
1010 .clear_surface_reg = r600_clear_surface_reg, 1039 .clear_surface_reg = r600_clear_surface_reg,
1011 .bandwidth_update = &rv515_bandwidth_update,
1012 .hpd = { 1040 .hpd = {
1013 .init = &r600_hpd_init, 1041 .init = &r600_hpd_init,
1014 .fini = &r600_hpd_fini, 1042 .fini = &r600_hpd_fini,
@@ -1029,7 +1057,6 @@ static struct radeon_asic rv770_asic = {
1029 .page_flip = &rv770_page_flip, 1057 .page_flip = &rv770_page_flip,
1030 .post_page_flip = &rs600_post_page_flip, 1058 .post_page_flip = &rs600_post_page_flip,
1031 }, 1059 },
1032 .wait_for_vblank = &avivo_wait_for_vblank,
1033 .mc_wait_for_idle = &r600_mc_wait_for_idle, 1060 .mc_wait_for_idle = &r600_mc_wait_for_idle,
1034}; 1061};
1035 1062
@@ -1059,7 +1086,11 @@ static struct radeon_asic evergreen_asic = {
1059 .set = &evergreen_irq_set, 1086 .set = &evergreen_irq_set,
1060 .process = &evergreen_irq_process, 1087 .process = &evergreen_irq_process,
1061 }, 1088 },
1062 .get_vblank_counter = &evergreen_get_vblank_counter, 1089 .display = {
1090 .bandwidth_update = &evergreen_bandwidth_update,
1091 .get_vblank_counter = &evergreen_get_vblank_counter,
1092 .wait_for_vblank = &dce4_wait_for_vblank,
1093 },
1063 .copy = { 1094 .copy = {
1064 .blit = &r600_copy_blit, 1095 .blit = &r600_copy_blit,
1065 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, 1096 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
@@ -1077,7 +1108,6 @@ static struct radeon_asic evergreen_asic = {
1077 .set_clock_gating = NULL, 1108 .set_clock_gating = NULL,
1078 .set_surface_reg = r600_set_surface_reg, 1109 .set_surface_reg = r600_set_surface_reg,
1079 .clear_surface_reg = r600_clear_surface_reg, 1110 .clear_surface_reg = r600_clear_surface_reg,
1080 .bandwidth_update = &evergreen_bandwidth_update,
1081 .hpd = { 1111 .hpd = {
1082 .init = &evergreen_hpd_init, 1112 .init = &evergreen_hpd_init,
1083 .fini = &evergreen_hpd_fini, 1113 .fini = &evergreen_hpd_fini,
@@ -1098,7 +1128,6 @@ static struct radeon_asic evergreen_asic = {
1098 .page_flip = &evergreen_page_flip, 1128 .page_flip = &evergreen_page_flip,
1099 .post_page_flip = &evergreen_post_page_flip, 1129 .post_page_flip = &evergreen_post_page_flip,
1100 }, 1130 },
1101 .wait_for_vblank = &dce4_wait_for_vblank,
1102 .mc_wait_for_idle = &evergreen_mc_wait_for_idle, 1131 .mc_wait_for_idle = &evergreen_mc_wait_for_idle,
1103}; 1132};
1104 1133
@@ -1128,7 +1157,11 @@ static struct radeon_asic sumo_asic = {
1128 .set = &evergreen_irq_set, 1157 .set = &evergreen_irq_set,
1129 .process = &evergreen_irq_process, 1158 .process = &evergreen_irq_process,
1130 }, 1159 },
1131 .get_vblank_counter = &evergreen_get_vblank_counter, 1160 .display = {
1161 .bandwidth_update = &evergreen_bandwidth_update,
1162 .get_vblank_counter = &evergreen_get_vblank_counter,
1163 .wait_for_vblank = &dce4_wait_for_vblank,
1164 },
1132 .copy = { 1165 .copy = {
1133 .blit = &r600_copy_blit, 1166 .blit = &r600_copy_blit,
1134 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, 1167 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
@@ -1146,7 +1179,6 @@ static struct radeon_asic sumo_asic = {
1146 .set_clock_gating = NULL, 1179 .set_clock_gating = NULL,
1147 .set_surface_reg = r600_set_surface_reg, 1180 .set_surface_reg = r600_set_surface_reg,
1148 .clear_surface_reg = r600_clear_surface_reg, 1181 .clear_surface_reg = r600_clear_surface_reg,
1149 .bandwidth_update = &evergreen_bandwidth_update,
1150 .hpd = { 1182 .hpd = {
1151 .init = &evergreen_hpd_init, 1183 .init = &evergreen_hpd_init,
1152 .fini = &evergreen_hpd_fini, 1184 .fini = &evergreen_hpd_fini,
@@ -1167,7 +1199,6 @@ static struct radeon_asic sumo_asic = {
1167 .page_flip = &evergreen_page_flip, 1199 .page_flip = &evergreen_page_flip,
1168 .post_page_flip = &evergreen_post_page_flip, 1200 .post_page_flip = &evergreen_post_page_flip,
1169 }, 1201 },
1170 .wait_for_vblank = &dce4_wait_for_vblank,
1171 .mc_wait_for_idle = &evergreen_mc_wait_for_idle, 1202 .mc_wait_for_idle = &evergreen_mc_wait_for_idle,
1172}; 1203};
1173 1204
@@ -1197,7 +1228,11 @@ static struct radeon_asic btc_asic = {
1197 .set = &evergreen_irq_set, 1228 .set = &evergreen_irq_set,
1198 .process = &evergreen_irq_process, 1229 .process = &evergreen_irq_process,
1199 }, 1230 },
1200 .get_vblank_counter = &evergreen_get_vblank_counter, 1231 .display = {
1232 .bandwidth_update = &evergreen_bandwidth_update,
1233 .get_vblank_counter = &evergreen_get_vblank_counter,
1234 .wait_for_vblank = &dce4_wait_for_vblank,
1235 },
1201 .copy = { 1236 .copy = {
1202 .blit = &r600_copy_blit, 1237 .blit = &r600_copy_blit,
1203 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, 1238 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
@@ -1215,7 +1250,6 @@ static struct radeon_asic btc_asic = {
1215 .set_clock_gating = NULL, 1250 .set_clock_gating = NULL,
1216 .set_surface_reg = r600_set_surface_reg, 1251 .set_surface_reg = r600_set_surface_reg,
1217 .clear_surface_reg = r600_clear_surface_reg, 1252 .clear_surface_reg = r600_clear_surface_reg,
1218 .bandwidth_update = &evergreen_bandwidth_update,
1219 .hpd = { 1253 .hpd = {
1220 .init = &evergreen_hpd_init, 1254 .init = &evergreen_hpd_init,
1221 .fini = &evergreen_hpd_fini, 1255 .fini = &evergreen_hpd_fini,
@@ -1236,7 +1270,6 @@ static struct radeon_asic btc_asic = {
1236 .page_flip = &evergreen_page_flip, 1270 .page_flip = &evergreen_page_flip,
1237 .post_page_flip = &evergreen_post_page_flip, 1271 .post_page_flip = &evergreen_post_page_flip,
1238 }, 1272 },
1239 .wait_for_vblank = &dce4_wait_for_vblank,
1240 .mc_wait_for_idle = &evergreen_mc_wait_for_idle, 1273 .mc_wait_for_idle = &evergreen_mc_wait_for_idle,
1241}; 1274};
1242 1275
@@ -1295,7 +1328,11 @@ static struct radeon_asic cayman_asic = {
1295 .set = &evergreen_irq_set, 1328 .set = &evergreen_irq_set,
1296 .process = &evergreen_irq_process, 1329 .process = &evergreen_irq_process,
1297 }, 1330 },
1298 .get_vblank_counter = &evergreen_get_vblank_counter, 1331 .display = {
1332 .bandwidth_update = &evergreen_bandwidth_update,
1333 .get_vblank_counter = &evergreen_get_vblank_counter,
1334 .wait_for_vblank = &dce4_wait_for_vblank,
1335 },
1299 .copy = { 1336 .copy = {
1300 .blit = &r600_copy_blit, 1337 .blit = &r600_copy_blit,
1301 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX, 1338 .blit_ring_index = RADEON_RING_TYPE_GFX_INDEX,
@@ -1313,7 +1350,6 @@ static struct radeon_asic cayman_asic = {
1313 .set_clock_gating = NULL, 1350 .set_clock_gating = NULL,
1314 .set_surface_reg = r600_set_surface_reg, 1351 .set_surface_reg = r600_set_surface_reg,
1315 .clear_surface_reg = r600_clear_surface_reg, 1352 .clear_surface_reg = r600_clear_surface_reg,
1316 .bandwidth_update = &evergreen_bandwidth_update,
1317 .hpd = { 1353 .hpd = {
1318 .init = &evergreen_hpd_init, 1354 .init = &evergreen_hpd_init,
1319 .fini = &evergreen_hpd_fini, 1355 .fini = &evergreen_hpd_fini,
@@ -1334,7 +1370,6 @@ static struct radeon_asic cayman_asic = {
1334 .page_flip = &evergreen_page_flip, 1370 .page_flip = &evergreen_page_flip,
1335 .post_page_flip = &evergreen_post_page_flip, 1371 .post_page_flip = &evergreen_post_page_flip,
1336 }, 1372 },
1337 .wait_for_vblank = &dce4_wait_for_vblank,
1338 .mc_wait_for_idle = &evergreen_mc_wait_for_idle, 1373 .mc_wait_for_idle = &evergreen_mc_wait_for_idle,
1339}; 1374};
1340 1375