[PATCH v2 2/7] drm: mxsfb: Simplify LCDIF IRQ handling

Lucas Stach l.stach at pengutronix.de
Thu Apr 7 08:01:54 UTC 2022


Am Donnerstag, dem 07.04.2022 um 00:03 +0200 schrieb Marek Vasut:
> On 4/6/22 21:41, Lucas Stach wrote:
> > Am Freitag, dem 11.03.2022 um 18:05 +0100 schrieb Marek Vasut:
> > > The call to drm_crtc_vblank_off(&lcdif->crtc); disables IRQ generation
> > > from the LCDIF block already and this is called in mxsfb_load() before
> > > request_irq(), so explicitly disabling IRQ using custom function like
> > > mxsfb_irq_disable() is not needed, remove it.
> > > 
> > 
> > Have you checked that the drm_vblank_off in probe actually results in a
> > call to mxsfb_crtc_disable_vblank? From my reading of the core code,
> > this should be a no-op without a previous drm_vblank_on, so it would
> > not result in the desired masking before the IRQ is requested.
> 
> I must've missed the vblank->enabled check, but then, I am also not 
> getting any interrupts, so presumably they are already disabled after 
> the IP is reset.

Yep, it should be the default for every peripheral to not send any
unsolicited interrupts. But then I don't see explicit reset of the IP
in the driver probe. So maybe this is a workaround for situation where
something running before Linux has already enabled the display
controller and for whatever reason also enabled the interrupt
requests? 

Either we should have a proper reset of the block in the probe path, or
this interrupt masking must be kept in one form or the other. My vote
would be on just masking the IRQs and dropping the useless
drm_vblank_off.

Regards,
Lucas



More information about the dri-devel mailing list