RE: [Intel-gfx] [PATCH] drm/i915: Remove unused IRQ chip data of HDMI LPE audio

From: Chen, Augustine
Date: Tue Dec 12 2017 - 04:26:36 EST



> -----Original Message-----
> From: Takashi Iwai [mailto:tiwai@xxxxxxx]
> Sent: Monday, December 11, 2017 9:23 PM
> To: Ville SyrjÃlà <ville.syrjala@xxxxxxxxxxxxxxx>
> Cc: Anand, Jerome <jerome.anand@xxxxxxxxx>; Thomas Gleixner
> <tglx@xxxxxxxxxxxxx>; Chen, Augustine <augustine.chen@xxxxxxxxx>; intel-
> gfx@xxxxxxxxxxxxxxxxxxxxx; alsa-devel@xxxxxxxxxxxxxxxx; Bossart, Pierre-louis
> <pierre-louis.bossart@xxxxxxxxx>; Ingo Molnar <mingo@xxxxxxxxxx>; H. Peter
> Anvin <hpa@xxxxxxxxx>; Jiang Liu <jiang.liu@xxxxxxxxxxxxxxx>; Juergen Gross
> <jgross@xxxxxxxx>; Dou Liyang <douly.fnst@xxxxxxxxxxxxxx>; linux-
> kernel@xxxxxxxxxxxxxxx
> Subject: Re: [Intel-gfx] [PATCH] drm/i915: Remove unused IRQ chip data of
> HDMI LPE audio
>
> On Mon, 11 Dec 2017 14:20:23 +0100,
> Ville SyrjÃlà wrote:
> >
> > On Mon, Dec 11, 2017 at 08:33:33AM +0000, Anand, Jerome wrote:
> > >
> > >
> > > > -----Original Message-----
> > > > From: Thomas Gleixner [mailto:tglx@xxxxxxxxxxxxx]
> > > > Sent: Saturday, December 9, 2017 4:22 AM
> > > > To: Ville SyrjÃlà <ville.syrjala@xxxxxxxxxxxxxxx>
> > > > Cc: Chen, Augustine <augustine.chen@xxxxxxxxx>; intel-
> > > > gfx@xxxxxxxxxxxxxxxxxxxxx; alsa-devel@xxxxxxxxxxxxxxxx; Anand,
> > > > Jerome <jerome.anand@xxxxxxxxx>; Bossart, Pierre-louis <pierre-
> > > > louis.bossart@xxxxxxxxx>; tiwai@xxxxxxx; Ingo Molnar
> > > > <mingo@xxxxxxxxxx>; H. Peter Anvin <hpa@xxxxxxxxx>; Jiang Liu
> > > > <jiang.liu@xxxxxxxxxxxxxxx>; Juergen Gross <jgross@xxxxxxxx>; Dou
> > > > Liyang <douly.fnst@xxxxxxxxxxxxxx>; linux- kernel@xxxxxxxxxxxxxxx
> > > > Subject: Re: [Intel-gfx] [PATCH] drm/i915: Remove unused IRQ chip
> > > > data of HDMI LPE audio
> > > >
> > > > On Fri, 8 Dec 2017, Ville SyrjÃlà wrote:
> > > >
> > > > > On Fri, Dec 08, 2017 at 05:33:23PM +0800, Augustine.Chen wrote:
> > > > > > The chip data of HDMI LPE audio is set to drm_i915_private
> > > > > > which is not consistent with the expectation by x86 APIC driver.
> > > > >
> > > > > Hmm. Why is the apic code looking at data for an irq chip it
> > > > > hasn't created?
> > > > >
> > >
> > > apic code expects an irq domain to be place as generic approach.
> > >
> > > > > Do we need something like
> > > > > - dev_priv->lpe_audio.irq = irq_alloc_desc(0);
> > > > > + dev_priv->lpe_audio.irq = irq_alloc_desc(-1);
> > > >
> > > > #define irq_alloc_desc(node)
> > > >
> > > > So instead of handing in node 0 you hand in node -1 which is
> > > > NUMA_NO_NODE
> > > >
> >
> > Ah. I misread the macros. So we already pass irq=-1.
No matter from the code perspective or from the real test result, this change doesn't make any difference in terms of the issue symptom.

> >
> > >
> > > Agree - am not sure whether it will make any difference.
> > >
> > > > > That *looks* more correct to me based on a cursory glance at the
> > > > > x86 code, but I didn't trawl very deeply.
> > > >
> > > > The x86 core cares not at all about interrupt chips which are
> > > > created in a driver and not connected to an actual apic/ioapic/msi
> > > > interrupt. This interrupt chip is its own thing as we have others in GPIO etc.
> > > >
> > > > > > In the case of not enabling CONFIG_CPUMASK_OFFSTACK, this
> > > > > > would cause kernel panic while doing CPU hotplug.
> > > >
> > > > And why so? Surely not because you set irq_chip_data. That's
> > > > really no explanation at all.
> > > >
> > >
> > > Ideally, I feel there needs to be an irq domain for mapping the irq numbers
> with hwirq.
> > > It is not created as part of the hdmi lpe audio bridge.
> > > Since the logic to mask/unmask lpe audio interrupts is removed,
> > > there is no need of the Chip data or creation of the domain now.
> >
> > There is no need right now. But there might be a need in the future.
> > LPE audio isn't even the only piece of hardware whose irq goes through
> > the i915 display engine (there's also the ISP and VED). So I would
> > much prefer a proper solution instead of sweeping the problem under
> > the rug.
>
> IMO, the primary question is whether the usage of irq chip without irq domain is
> valid or not. If an irq domain is mandatory, that's the thing to be fixed in i915
> side.
In terms of functionality, the interrupt and hdmi audio work fine without irq domain according to the validation. And besides, there are other drivers with similar implementation which doesn't set chip data at all.


>
>
> thanks,
>
> Takashi