Skip to content

Commit 66c6594

Browse files
author
Marc Zyngier
committed
gpu: Bulk conversion to generic_handle_domain_irq()
Wherever possible, replace constructs that match either generic_handle_irq(irq_find_mapping()) or generic_handle_irq(irq_linear_revmap()) to a single call to generic_handle_domain_irq(). Signed-off-by: Marc Zyngier <[email protected]>
1 parent 0661cb2 commit 66c6594

File tree

4 files changed

+10
-21
lines changed

4 files changed

+10
-21
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ void amdgpu_irq_dispatch(struct amdgpu_device *adev,
502502

503503
} else if ((client_id == AMDGPU_IRQ_CLIENTID_LEGACY) &&
504504
adev->irq.virq[src_id]) {
505-
generic_handle_irq(irq_find_mapping(adev->irq.domain, src_id));
505+
generic_handle_domain_irq(adev->irq.domain, src_id);
506506

507507
} else if (!adev->irq.client[client_id].sources) {
508508
DRM_DEBUG("Unregistered interrupt client_id: %d src_id: %d\n",

drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,13 @@ static void dpu_mdss_irq(struct irq_desc *desc)
4545

4646
while (interrupts) {
4747
irq_hw_number_t hwirq = fls(interrupts) - 1;
48-
unsigned int mapping;
4948
int rc;
5049

51-
mapping = irq_find_mapping(dpu_mdss->irq_controller.domain,
52-
hwirq);
53-
if (mapping == 0) {
54-
DRM_ERROR("couldn't find irq mapping for %lu\n", hwirq);
55-
break;
56-
}
57-
58-
rc = generic_handle_irq(mapping);
50+
rc = generic_handle_domain_irq(dpu_mdss->irq_controller.domain,
51+
hwirq);
5952
if (rc < 0) {
60-
DRM_ERROR("handle irq fail: irq=%lu mapping=%u rc=%d\n",
61-
hwirq, mapping, rc);
53+
DRM_ERROR("handle irq fail: irq=%lu rc=%d\n",
54+
hwirq, rc);
6255
break;
6356
}
6457

drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ static irqreturn_t mdss_irq(int irq, void *arg)
5050
while (intr) {
5151
irq_hw_number_t hwirq = fls(intr) - 1;
5252

53-
generic_handle_irq(irq_find_mapping(
54-
mdp5_mdss->irqcontroller.domain, hwirq));
53+
generic_handle_domain_irq(mdp5_mdss->irqcontroller.domain, hwirq);
5554
intr &= ~(1 << hwirq);
5655
}
5756

drivers/gpu/ipu-v3/ipu-common.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,19 +1003,16 @@ static int ipu_submodules_init(struct ipu_soc *ipu,
10031003
static void ipu_irq_handle(struct ipu_soc *ipu, const int *regs, int num_regs)
10041004
{
10051005
unsigned long status;
1006-
int i, bit, irq;
1006+
int i, bit;
10071007

10081008
for (i = 0; i < num_regs; i++) {
10091009

10101010
status = ipu_cm_read(ipu, IPU_INT_STAT(regs[i]));
10111011
status &= ipu_cm_read(ipu, IPU_INT_CTRL(regs[i]));
10121012

1013-
for_each_set_bit(bit, &status, 32) {
1014-
irq = irq_linear_revmap(ipu->domain,
1015-
regs[i] * 32 + bit);
1016-
if (irq)
1017-
generic_handle_irq(irq);
1018-
}
1013+
for_each_set_bit(bit, &status, 32)
1014+
generic_handle_domain_irq(ipu->domain,
1015+
regs[i] * 32 + bit);
10191016
}
10201017
}
10211018

0 commit comments

Comments
 (0)