diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2011-11-17 20:13:28 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-12-20 14:52:03 -0500 |
commit | 1b37078b7ddf35cab12ac6544187e3636d50c0dc (patch) | |
tree | f1a3621a98ab8ae5ffef14ae34a5b3454f14dcf9 /drivers/gpu/drm/radeon/radeon.h | |
parent | b40e7e1608c332767e6b94bed7af84b30418e739 (diff) |
drm/radeon/kms: add support for per-ring fence interrupts
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Christian König <deathsimple@vodafone.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon.h')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index e5d5271d7a9c..b4c2d0fe34e3 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h | |||
@@ -107,6 +107,17 @@ extern int radeon_msi; | |||
107 | #define RADEONFB_CONN_LIMIT 4 | 107 | #define RADEONFB_CONN_LIMIT 4 |
108 | #define RADEON_BIOS_NUM_SCRATCH 8 | 108 | #define RADEON_BIOS_NUM_SCRATCH 8 |
109 | 109 | ||
110 | /* max number of rings */ | ||
111 | #define RADEON_NUM_RINGS 3 | ||
112 | |||
113 | /* internal ring indices */ | ||
114 | /* r1xx+ has gfx CP ring */ | ||
115 | #define RADEON_RING_TYPE_GFX_INDEX 0 | ||
116 | |||
117 | /* cayman has 2 compute CP rings */ | ||
118 | #define CAYMAN_RING_TYPE_CP1_INDEX 1 | ||
119 | #define CAYMAN_RING_TYPE_CP2_INDEX 2 | ||
120 | |||
110 | /* | 121 | /* |
111 | * Errata workarounds. | 122 | * Errata workarounds. |
112 | */ | 123 | */ |
@@ -464,7 +475,7 @@ union radeon_irq_stat_regs { | |||
464 | 475 | ||
465 | struct radeon_irq { | 476 | struct radeon_irq { |
466 | bool installed; | 477 | bool installed; |
467 | bool sw_int; | 478 | bool sw_int[RADEON_NUM_RINGS]; |
468 | bool crtc_vblank_int[RADEON_MAX_CRTCS]; | 479 | bool crtc_vblank_int[RADEON_MAX_CRTCS]; |
469 | bool pflip[RADEON_MAX_CRTCS]; | 480 | bool pflip[RADEON_MAX_CRTCS]; |
470 | wait_queue_head_t vblank_queue; | 481 | wait_queue_head_t vblank_queue; |
@@ -474,7 +485,7 @@ struct radeon_irq { | |||
474 | wait_queue_head_t idle_queue; | 485 | wait_queue_head_t idle_queue; |
475 | bool hdmi[RADEON_MAX_HDMI_BLOCKS]; | 486 | bool hdmi[RADEON_MAX_HDMI_BLOCKS]; |
476 | spinlock_t sw_lock; | 487 | spinlock_t sw_lock; |
477 | int sw_refcount; | 488 | int sw_refcount[RADEON_NUM_RINGS]; |
478 | union radeon_irq_stat_regs stat_regs; | 489 | union radeon_irq_stat_regs stat_regs; |
479 | spinlock_t pflip_lock[RADEON_MAX_CRTCS]; | 490 | spinlock_t pflip_lock[RADEON_MAX_CRTCS]; |
480 | int pflip_refcount[RADEON_MAX_CRTCS]; | 491 | int pflip_refcount[RADEON_MAX_CRTCS]; |
@@ -482,8 +493,8 @@ struct radeon_irq { | |||
482 | 493 | ||
483 | int radeon_irq_kms_init(struct radeon_device *rdev); | 494 | int radeon_irq_kms_init(struct radeon_device *rdev); |
484 | void radeon_irq_kms_fini(struct radeon_device *rdev); | 495 | void radeon_irq_kms_fini(struct radeon_device *rdev); |
485 | void radeon_irq_kms_sw_irq_get(struct radeon_device *rdev); | 496 | void radeon_irq_kms_sw_irq_get(struct radeon_device *rdev, int ring); |
486 | void radeon_irq_kms_sw_irq_put(struct radeon_device *rdev); | 497 | void radeon_irq_kms_sw_irq_put(struct radeon_device *rdev, int ring); |
487 | void radeon_irq_kms_pflip_irq_get(struct radeon_device *rdev, int crtc); | 498 | void radeon_irq_kms_pflip_irq_get(struct radeon_device *rdev, int crtc); |
488 | void radeon_irq_kms_pflip_irq_put(struct radeon_device *rdev, int crtc); | 499 | void radeon_irq_kms_pflip_irq_put(struct radeon_device *rdev, int crtc); |
489 | 500 | ||
@@ -491,17 +502,6 @@ void radeon_irq_kms_pflip_irq_put(struct radeon_device *rdev, int crtc); | |||
491 | * CP & rings. | 502 | * CP & rings. |
492 | */ | 503 | */ |
493 | 504 | ||
494 | /* max number of rings */ | ||
495 | #define RADEON_NUM_RINGS 3 | ||
496 | |||
497 | /* internal ring indices */ | ||
498 | /* r1xx+ has gfx CP ring */ | ||
499 | #define RADEON_RING_TYPE_GFX_INDEX 0 | ||
500 | |||
501 | /* cayman has 2 compute CP rings */ | ||
502 | #define CAYMAN_RING_TYPE_CP1_INDEX 1 | ||
503 | #define CAYMAN_RING_TYPE_CP2_INDEX 2 | ||
504 | |||
505 | struct radeon_ib { | 505 | struct radeon_ib { |
506 | struct list_head list; | 506 | struct list_head list; |
507 | unsigned idx; | 507 | unsigned idx; |