aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_asic.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2010-04-22 12:39:58 -0400
committerDave Airlie <airlied@redhat.com>2010-05-18 04:20:47 -0400
commitdef9ba9cf6a8266ee1ffd72556db002c3a2663db (patch)
tree4fff0f90b886dcfd96f11853cf4c605b2d3b759f /drivers/gpu/drm/radeon/radeon_asic.c
parent1d42bbc8f7f9ce4d852692ef7aa336b133b0830a (diff)
drm/radeon/kms: add gui_idle callback
Check to see if the GUI engine and related blocks (2D, 3D, CP, etc) are idle or not. There are a number of cases when we need to know if the drawing engine is busy. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_asic.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_asic.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_asic.c b/drivers/gpu/drm/radeon/radeon_asic.c
index f835333c1b69..42708462fd4b 100644
--- a/drivers/gpu/drm/radeon/radeon_asic.c
+++ b/drivers/gpu/drm/radeon/radeon_asic.c
@@ -165,6 +165,7 @@ static struct radeon_asic r100_asic = {
165 .hpd_sense = &r100_hpd_sense, 165 .hpd_sense = &r100_hpd_sense,
166 .hpd_set_polarity = &r100_hpd_set_polarity, 166 .hpd_set_polarity = &r100_hpd_set_polarity,
167 .ioctl_wait_idle = NULL, 167 .ioctl_wait_idle = NULL,
168 .gui_idle = &r100_gui_idle,
168}; 169};
169 170
170static struct radeon_asic r200_asic = { 171static struct radeon_asic r200_asic = {
@@ -203,6 +204,7 @@ static struct radeon_asic r200_asic = {
203 .hpd_sense = &r100_hpd_sense, 204 .hpd_sense = &r100_hpd_sense,
204 .hpd_set_polarity = &r100_hpd_set_polarity, 205 .hpd_set_polarity = &r100_hpd_set_polarity,
205 .ioctl_wait_idle = NULL, 206 .ioctl_wait_idle = NULL,
207 .gui_idle = &r100_gui_idle,
206}; 208};
207 209
208static struct radeon_asic r300_asic = { 210static struct radeon_asic r300_asic = {
@@ -242,6 +244,7 @@ static struct radeon_asic r300_asic = {
242 .hpd_sense = &r100_hpd_sense, 244 .hpd_sense = &r100_hpd_sense,
243 .hpd_set_polarity = &r100_hpd_set_polarity, 245 .hpd_set_polarity = &r100_hpd_set_polarity,
244 .ioctl_wait_idle = NULL, 246 .ioctl_wait_idle = NULL,
247 .gui_idle = &r100_gui_idle,
245}; 248};
246 249
247static struct radeon_asic r300_asic_pcie = { 250static struct radeon_asic r300_asic_pcie = {
@@ -280,6 +283,7 @@ static struct radeon_asic r300_asic_pcie = {
280 .hpd_sense = &r100_hpd_sense, 283 .hpd_sense = &r100_hpd_sense,
281 .hpd_set_polarity = &r100_hpd_set_polarity, 284 .hpd_set_polarity = &r100_hpd_set_polarity,
282 .ioctl_wait_idle = NULL, 285 .ioctl_wait_idle = NULL,
286 .gui_idle = &r100_gui_idle,
283}; 287};
284 288
285static struct radeon_asic r420_asic = { 289static struct radeon_asic r420_asic = {
@@ -319,6 +323,7 @@ static struct radeon_asic r420_asic = {
319 .hpd_sense = &r100_hpd_sense, 323 .hpd_sense = &r100_hpd_sense,
320 .hpd_set_polarity = &r100_hpd_set_polarity, 324 .hpd_set_polarity = &r100_hpd_set_polarity,
321 .ioctl_wait_idle = NULL, 325 .ioctl_wait_idle = NULL,
326 .gui_idle = &r100_gui_idle,
322}; 327};
323 328
324static struct radeon_asic rs400_asic = { 329static struct radeon_asic rs400_asic = {
@@ -358,6 +363,7 @@ static struct radeon_asic rs400_asic = {
358 .hpd_sense = &r100_hpd_sense, 363 .hpd_sense = &r100_hpd_sense,
359 .hpd_set_polarity = &r100_hpd_set_polarity, 364 .hpd_set_polarity = &r100_hpd_set_polarity,
360 .ioctl_wait_idle = NULL, 365 .ioctl_wait_idle = NULL,
366 .gui_idle = &r100_gui_idle,
361}; 367};
362 368
363static struct radeon_asic rs600_asic = { 369static struct radeon_asic rs600_asic = {
@@ -397,6 +403,7 @@ static struct radeon_asic rs600_asic = {
397 .hpd_sense = &rs600_hpd_sense, 403 .hpd_sense = &rs600_hpd_sense,
398 .hpd_set_polarity = &rs600_hpd_set_polarity, 404 .hpd_set_polarity = &rs600_hpd_set_polarity,
399 .ioctl_wait_idle = NULL, 405 .ioctl_wait_idle = NULL,
406 .gui_idle = &r100_gui_idle,
400}; 407};
401 408
402static struct radeon_asic rs690_asic = { 409static struct radeon_asic rs690_asic = {
@@ -436,6 +443,7 @@ static struct radeon_asic rs690_asic = {
436 .hpd_sense = &rs600_hpd_sense, 443 .hpd_sense = &rs600_hpd_sense,
437 .hpd_set_polarity = &rs600_hpd_set_polarity, 444 .hpd_set_polarity = &rs600_hpd_set_polarity,
438 .ioctl_wait_idle = NULL, 445 .ioctl_wait_idle = NULL,
446 .gui_idle = &r100_gui_idle,
439}; 447};
440 448
441static struct radeon_asic rv515_asic = { 449static struct radeon_asic rv515_asic = {
@@ -475,6 +483,7 @@ static struct radeon_asic rv515_asic = {
475 .hpd_sense = &rs600_hpd_sense, 483 .hpd_sense = &rs600_hpd_sense,
476 .hpd_set_polarity = &rs600_hpd_set_polarity, 484 .hpd_set_polarity = &rs600_hpd_set_polarity,
477 .ioctl_wait_idle = NULL, 485 .ioctl_wait_idle = NULL,
486 .gui_idle = &r100_gui_idle,
478}; 487};
479 488
480static struct radeon_asic r520_asic = { 489static struct radeon_asic r520_asic = {
@@ -514,6 +523,7 @@ static struct radeon_asic r520_asic = {
514 .hpd_sense = &rs600_hpd_sense, 523 .hpd_sense = &rs600_hpd_sense,
515 .hpd_set_polarity = &rs600_hpd_set_polarity, 524 .hpd_set_polarity = &rs600_hpd_set_polarity,
516 .ioctl_wait_idle = NULL, 525 .ioctl_wait_idle = NULL,
526 .gui_idle = &r100_gui_idle,
517}; 527};
518 528
519static struct radeon_asic r600_asic = { 529static struct radeon_asic r600_asic = {
@@ -552,6 +562,7 @@ static struct radeon_asic r600_asic = {
552 .hpd_sense = &r600_hpd_sense, 562 .hpd_sense = &r600_hpd_sense,
553 .hpd_set_polarity = &r600_hpd_set_polarity, 563 .hpd_set_polarity = &r600_hpd_set_polarity,
554 .ioctl_wait_idle = r600_ioctl_wait_idle, 564 .ioctl_wait_idle = r600_ioctl_wait_idle,
565 .gui_idle = &r600_gui_idle,
555}; 566};
556 567
557static struct radeon_asic rs780_asic = { 568static struct radeon_asic rs780_asic = {
@@ -590,6 +601,7 @@ static struct radeon_asic rs780_asic = {
590 .hpd_sense = &r600_hpd_sense, 601 .hpd_sense = &r600_hpd_sense,
591 .hpd_set_polarity = &r600_hpd_set_polarity, 602 .hpd_set_polarity = &r600_hpd_set_polarity,
592 .ioctl_wait_idle = r600_ioctl_wait_idle, 603 .ioctl_wait_idle = r600_ioctl_wait_idle,
604 .gui_idle = &r600_gui_idle,
593}; 605};
594 606
595static struct radeon_asic rv770_asic = { 607static struct radeon_asic rv770_asic = {
@@ -628,6 +640,7 @@ static struct radeon_asic rv770_asic = {
628 .hpd_sense = &r600_hpd_sense, 640 .hpd_sense = &r600_hpd_sense,
629 .hpd_set_polarity = &r600_hpd_set_polarity, 641 .hpd_set_polarity = &r600_hpd_set_polarity,
630 .ioctl_wait_idle = r600_ioctl_wait_idle, 642 .ioctl_wait_idle = r600_ioctl_wait_idle,
643 .gui_idle = &r600_gui_idle,
631}; 644};
632 645
633static struct radeon_asic evergreen_asic = { 646static struct radeon_asic evergreen_asic = {
@@ -664,6 +677,7 @@ static struct radeon_asic evergreen_asic = {
664 .hpd_fini = &evergreen_hpd_fini, 677 .hpd_fini = &evergreen_hpd_fini,
665 .hpd_sense = &evergreen_hpd_sense, 678 .hpd_sense = &evergreen_hpd_sense,
666 .hpd_set_polarity = &evergreen_hpd_set_polarity, 679 .hpd_set_polarity = &evergreen_hpd_set_polarity,
680 .gui_idle = &r600_gui_idle,
667}; 681};
668 682
669int radeon_asic_init(struct radeon_device *rdev) 683int radeon_asic_init(struct radeon_device *rdev)