mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-06 04:19:23 -04:00
drm/radeon: Track IRQ state in local device state
Replace usage of struct drm_device.irq_enabled with the driver's own state field struct radeon_device.irq.installed. The field in the DRM device structure is considered legacy and should not be used by KMS drivers. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20210625082222.3845-4-tzimmermann@suse.de
This commit is contained in:
@@ -288,7 +288,7 @@ static void radeon_fence_check_lockup(struct work_struct *work)
|
||||
return;
|
||||
}
|
||||
|
||||
if (fence_drv->delayed_irq && rdev->ddev->irq_enabled) {
|
||||
if (fence_drv->delayed_irq && rdev->irq.installed) {
|
||||
unsigned long irqflags;
|
||||
|
||||
fence_drv->delayed_irq = false;
|
||||
|
||||
@@ -357,7 +357,7 @@ void radeon_irq_kms_sw_irq_get(struct radeon_device *rdev, int ring)
|
||||
{
|
||||
unsigned long irqflags;
|
||||
|
||||
if (!rdev->ddev->irq_enabled)
|
||||
if (!rdev->irq.installed)
|
||||
return;
|
||||
|
||||
if (atomic_inc_return(&rdev->irq.ring_int[ring]) == 1) {
|
||||
@@ -396,7 +396,7 @@ void radeon_irq_kms_sw_irq_put(struct radeon_device *rdev, int ring)
|
||||
{
|
||||
unsigned long irqflags;
|
||||
|
||||
if (!rdev->ddev->irq_enabled)
|
||||
if (!rdev->irq.installed)
|
||||
return;
|
||||
|
||||
if (atomic_dec_and_test(&rdev->irq.ring_int[ring])) {
|
||||
@@ -422,7 +422,7 @@ void radeon_irq_kms_pflip_irq_get(struct radeon_device *rdev, int crtc)
|
||||
if (crtc < 0 || crtc >= rdev->num_crtc)
|
||||
return;
|
||||
|
||||
if (!rdev->ddev->irq_enabled)
|
||||
if (!rdev->irq.installed)
|
||||
return;
|
||||
|
||||
if (atomic_inc_return(&rdev->irq.pflip[crtc]) == 1) {
|
||||
@@ -448,7 +448,7 @@ void radeon_irq_kms_pflip_irq_put(struct radeon_device *rdev, int crtc)
|
||||
if (crtc < 0 || crtc >= rdev->num_crtc)
|
||||
return;
|
||||
|
||||
if (!rdev->ddev->irq_enabled)
|
||||
if (!rdev->irq.installed)
|
||||
return;
|
||||
|
||||
if (atomic_dec_and_test(&rdev->irq.pflip[crtc])) {
|
||||
@@ -470,7 +470,7 @@ void radeon_irq_kms_enable_afmt(struct radeon_device *rdev, int block)
|
||||
{
|
||||
unsigned long irqflags;
|
||||
|
||||
if (!rdev->ddev->irq_enabled)
|
||||
if (!rdev->irq.installed)
|
||||
return;
|
||||
|
||||
spin_lock_irqsave(&rdev->irq.lock, irqflags);
|
||||
@@ -492,7 +492,7 @@ void radeon_irq_kms_disable_afmt(struct radeon_device *rdev, int block)
|
||||
{
|
||||
unsigned long irqflags;
|
||||
|
||||
if (!rdev->ddev->irq_enabled)
|
||||
if (!rdev->irq.installed)
|
||||
return;
|
||||
|
||||
spin_lock_irqsave(&rdev->irq.lock, irqflags);
|
||||
@@ -514,7 +514,7 @@ void radeon_irq_kms_enable_hpd(struct radeon_device *rdev, unsigned hpd_mask)
|
||||
unsigned long irqflags;
|
||||
int i;
|
||||
|
||||
if (!rdev->ddev->irq_enabled)
|
||||
if (!rdev->irq.installed)
|
||||
return;
|
||||
|
||||
spin_lock_irqsave(&rdev->irq.lock, irqflags);
|
||||
@@ -537,7 +537,7 @@ void radeon_irq_kms_disable_hpd(struct radeon_device *rdev, unsigned hpd_mask)
|
||||
unsigned long irqflags;
|
||||
int i;
|
||||
|
||||
if (!rdev->ddev->irq_enabled)
|
||||
if (!rdev->irq.installed)
|
||||
return;
|
||||
|
||||
spin_lock_irqsave(&rdev->irq.lock, irqflags);
|
||||
|
||||
Reference in New Issue
Block a user