]> git.baikalelectronics.ru Git - kernel.git/commit
drm/radeon: Cleanup display interrupt handling for evergreen, si
authorLyude <lyude@redhat.com>
Fri, 19 May 2017 23:48:37 +0000 (19:48 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 24 May 2017 22:33:57 +0000 (18:33 -0400)
commitca03bbc8d0e2b0dcef302f1e9fe43163b87f52d1
tree1d9dcc100949e4ce2899eaff4d10cdeda22cb68b
parent2fd67e98d3defa80cf2681b7988cbeb67624697d
drm/radeon: Cleanup display interrupt handling for evergreen, si

The current code here is really, really bad. A huge amount of it looks
to be copy pasted, it has some weird hatred of arrays and code sharing,
switch cases everywhere for things that really don't need them, and it
makes the file seem immensely more complex then it actually is. This is
a pain for maintanence, and is vulnerable to more weird irq handling
bugs.

So, let's start cleaning this up a bit. Modify all of the IRQ handlers
for evergreen/si so that they just use for loops. As well, we add a
helper function radeon_irq_kms_set_irq_n_enabled(), whose purpose is
just to update the state of registers that enable/disable interrupts
while printing any changes to the set of enabled interrupts to the
kernel log.

Note in this commit, since vblank/vline irq acking is intertwined with
page flip irq acking, we can't cut out all of the copy paste in
evergreen/si_irq_ack() just yet.

Changes since v1:
- Preserve order we write back all registers

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Lyude <lyude@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/evergreen.c
drivers/gpu/drm/radeon/radeon.h
drivers/gpu/drm/radeon/radeon_irq_kms.c
drivers/gpu/drm/radeon/si.c