Commit 66c6594b authored by Marc Zyngier's avatar Marc Zyngier

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: default avatarMarc Zyngier <maz@kernel.org>
parent 0661cb2a
...@@ -502,7 +502,7 @@ void amdgpu_irq_dispatch(struct amdgpu_device *adev, ...@@ -502,7 +502,7 @@ void amdgpu_irq_dispatch(struct amdgpu_device *adev,
} else if ((client_id == AMDGPU_IRQ_CLIENTID_LEGACY) && } else if ((client_id == AMDGPU_IRQ_CLIENTID_LEGACY) &&
adev->irq.virq[src_id]) { adev->irq.virq[src_id]) {
generic_handle_irq(irq_find_mapping(adev->irq.domain, src_id)); generic_handle_domain_irq(adev->irq.domain, src_id);
} else if (!adev->irq.client[client_id].sources) { } else if (!adev->irq.client[client_id].sources) {
DRM_DEBUG("Unregistered interrupt client_id: %d src_id: %d\n", DRM_DEBUG("Unregistered interrupt client_id: %d src_id: %d\n",
......
...@@ -45,20 +45,13 @@ static void dpu_mdss_irq(struct irq_desc *desc) ...@@ -45,20 +45,13 @@ static void dpu_mdss_irq(struct irq_desc *desc)
while (interrupts) { while (interrupts) {
irq_hw_number_t hwirq = fls(interrupts) - 1; irq_hw_number_t hwirq = fls(interrupts) - 1;
unsigned int mapping;
int rc; int rc;
mapping = irq_find_mapping(dpu_mdss->irq_controller.domain, rc = generic_handle_domain_irq(dpu_mdss->irq_controller.domain,
hwirq); hwirq);
if (mapping == 0) {
DRM_ERROR("couldn't find irq mapping for %lu\n", hwirq);
break;
}
rc = generic_handle_irq(mapping);
if (rc < 0) { if (rc < 0) {
DRM_ERROR("handle irq fail: irq=%lu mapping=%u rc=%d\n", DRM_ERROR("handle irq fail: irq=%lu rc=%d\n",
hwirq, mapping, rc); hwirq, rc);
break; break;
} }
......
...@@ -50,8 +50,7 @@ static irqreturn_t mdss_irq(int irq, void *arg) ...@@ -50,8 +50,7 @@ static irqreturn_t mdss_irq(int irq, void *arg)
while (intr) { while (intr) {
irq_hw_number_t hwirq = fls(intr) - 1; irq_hw_number_t hwirq = fls(intr) - 1;
generic_handle_irq(irq_find_mapping( generic_handle_domain_irq(mdp5_mdss->irqcontroller.domain, hwirq);
mdp5_mdss->irqcontroller.domain, hwirq));
intr &= ~(1 << hwirq); intr &= ~(1 << hwirq);
} }
......
...@@ -1003,19 +1003,16 @@ static int ipu_submodules_init(struct ipu_soc *ipu, ...@@ -1003,19 +1003,16 @@ static int ipu_submodules_init(struct ipu_soc *ipu,
static void ipu_irq_handle(struct ipu_soc *ipu, const int *regs, int num_regs) static void ipu_irq_handle(struct ipu_soc *ipu, const int *regs, int num_regs)
{ {
unsigned long status; unsigned long status;
int i, bit, irq; int i, bit;
for (i = 0; i < num_regs; i++) { for (i = 0; i < num_regs; i++) {
status = ipu_cm_read(ipu, IPU_INT_STAT(regs[i])); status = ipu_cm_read(ipu, IPU_INT_STAT(regs[i]));
status &= ipu_cm_read(ipu, IPU_INT_CTRL(regs[i])); status &= ipu_cm_read(ipu, IPU_INT_CTRL(regs[i]));
for_each_set_bit(bit, &status, 32) { for_each_set_bit(bit, &status, 32)
irq = irq_linear_revmap(ipu->domain, generic_handle_domain_irq(ipu->domain,
regs[i] * 32 + bit); regs[i] * 32 + bit);
if (irq)
generic_handle_irq(irq);
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment