mbox series

[v2,00/14] drm: Make DRM's IRQ helpers legacy

Message ID 20210803090704.32152-1-tzimmermann@suse.de (mailing list archive)
Headers show
Series drm: Make DRM's IRQ helpers legacy | expand

Message

Thomas Zimmermann Aug. 3, 2021, 9:06 a.m. UTC
DRM's IRQ helpers are only helpful for old, non-KMS drivers. Move
the code behind CONFIG_DRM_LEGACY. Convert KMS drivers to Linux
IRQ interfaces.

DRM provides IRQ helpers for setting up, receiving and removing IRQ
handlers. It's an abstraction over plain Linux functions. The code
is mid-layerish with several callbacks to hook into the rsp drivers.
Old UMS driver have their interrupts enabled via ioctl, so these
abstractions makes some sense. Modern KMS manage all their interrupts
internally. Using the DRM helpers adds indirection without benefits.

Most KMS drivers already use Linux IRQ functions instead of DRM's
abstraction layer. Patches 1 to 12 convert the remaining ones.
The patches also resolve a bug for devices without assigned interrupt
number. DRM helpers don't test for IRQ_NOTCONNECTED, so drivers do
not detect if the device has no interrupt assigned.

Patch 13 removes an unused function.

Patch 14 moves the DRM IRQ helpers behind CONFIG_DRM_LEGACY. Only
the old non-KMS drivers still use the functionality.

v2:
	* drop IRQ_NOTCONNECTED test from atmel-hlcdc (Sam)
	* use devm_request_irq() in atmel-hlcdc (Sam)
	* unify variable names in arm/hlcdc (Sam)

Thomas Zimmermann (14):
  drm/amdgpu: Convert to Linux IRQ interfaces
  drm/arm/hdlcd: Convert to Linux IRQ interfaces
  drm/atmel-hlcdc: Convert to Linux IRQ interfaces
  drm/fsl-dcu: Convert to Linux IRQ interfaces
  drm/gma500: Convert to Linux IRQ interfaces
  drm/kmb: Convert to Linux IRQ interfaces
  drm/msm: Convert to Linux IRQ interfaces
  drm/mxsfb: Convert to Linux IRQ interfaces
  drm/radeon: Convert to Linux IRQ interfaces
  drm/tidss: Convert to Linux IRQ interfaces
  drm/tilcdc: Convert to Linux IRQ interfaces
  drm/vc4: Convert to Linux IRQ interfaces
  drm: Remove unused devm_drm_irq_install()
  drm: IRQ midlayer is now legacy

 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c      |   1 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c      |  21 ++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h      |   2 +-
 drivers/gpu/drm/arm/hdlcd_drv.c              | 174 ++++++++++---------
 drivers/gpu/drm/arm/hdlcd_drv.h              |   1 +
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c |  80 +++++----
 drivers/gpu/drm/drm_irq.c                    |  95 +---------
 drivers/gpu/drm/drm_legacy_misc.c            |   3 +-
 drivers/gpu/drm/drm_vblank.c                 |   8 +-
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c    |  78 +++++----
 drivers/gpu/drm/gma500/power.c               |   1 +
 drivers/gpu/drm/gma500/psb_drv.c             |   8 +-
 drivers/gpu/drm/gma500/psb_drv.h             |   5 -
 drivers/gpu/drm/gma500/psb_irq.c             |  26 ++-
 drivers/gpu/drm/gma500/psb_irq.h             |   4 +-
 drivers/gpu/drm/i810/i810_dma.c              |   3 +-
 drivers/gpu/drm/kmb/kmb_drv.c                |  26 ++-
 drivers/gpu/drm/mga/mga_dma.c                |   2 +-
 drivers/gpu/drm/mga/mga_drv.h                |   1 -
 drivers/gpu/drm/msm/msm_drv.c                | 113 +++++++-----
 drivers/gpu/drm/msm/msm_kms.h                |   2 +-
 drivers/gpu/drm/mxsfb/mxsfb_drv.c            |  81 +++++----
 drivers/gpu/drm/mxsfb/mxsfb_drv.h            |   2 +
 drivers/gpu/drm/r128/r128_cce.c              |   3 +-
 drivers/gpu/drm/radeon/radeon_drv.c          |   4 -
 drivers/gpu/drm/radeon/radeon_irq_kms.c      |  44 ++++-
 drivers/gpu/drm/radeon/radeon_kms.h          |   4 -
 drivers/gpu/drm/tidss/tidss_drv.c            |  15 +-
 drivers/gpu/drm/tidss/tidss_drv.h            |   2 +
 drivers/gpu/drm/tidss/tidss_irq.c            |  27 ++-
 drivers/gpu/drm/tidss/tidss_irq.h            |   4 +-
 drivers/gpu/drm/tilcdc/tilcdc_drv.c          |  51 ++++--
 drivers/gpu/drm/tilcdc/tilcdc_drv.h          |   3 +
 drivers/gpu/drm/vc4/vc4_drv.c                |   4 -
 drivers/gpu/drm/vc4/vc4_drv.h                |   8 +-
 drivers/gpu/drm/vc4/vc4_irq.c                |  48 +++--
 drivers/gpu/drm/vc4/vc4_v3d.c                |  17 +-
 drivers/gpu/drm/via/via_mm.c                 |   3 +-
 include/drm/drm_device.h                     |  18 +-
 include/drm/drm_drv.h                        |  44 +----
 include/drm/drm_irq.h                        |  32 ----
 include/drm/drm_legacy.h                     |   3 +
 42 files changed, 567 insertions(+), 504 deletions(-)
 delete mode 100644 include/drm/drm_irq.h


base-commit: c9d6903562aa335593daf44b4a1edeaef6bf9206
prerequisite-patch-id: c2b2f08f0eccc9f5df0c0da49fa1d36267deb11d
prerequisite-patch-id: c67e5d886a47b7d0266d81100837557fda34cb24
prerequisite-patch-id: c3f32630e1d2de2eb74316c930578847d4b83fb3
prerequisite-patch-id: b32ca0abfc255601f8a5052d3b88be09527dabcb
prerequisite-patch-id: 22a3f264168bacb04ef65306b32b86be8dc982ef
prerequisite-patch-id: 095a0acb604eb02956e1a7e53da41371c64eb813
prerequisite-patch-id: 7a2417d5d8d453204bd94aa873e3faae812f26fc
--
2.32.0

Comments

Sam Ravnborg Aug. 3, 2021, 3:04 p.m. UTC | #1
Hi Thomas,

On Tue, Aug 03, 2021 at 11:06:50AM +0200, Thomas Zimmermann wrote:
> DRM's IRQ helpers are only helpful for old, non-KMS drivers. Move
> the code behind CONFIG_DRM_LEGACY. Convert KMS drivers to Linux
> IRQ interfaces.
> 
> DRM provides IRQ helpers for setting up, receiving and removing IRQ
> handlers. It's an abstraction over plain Linux functions. The code
> is mid-layerish with several callbacks to hook into the rsp drivers.
> Old UMS driver have their interrupts enabled via ioctl, so these
> abstractions makes some sense. Modern KMS manage all their interrupts
> internally. Using the DRM helpers adds indirection without benefits.
> 
> Most KMS drivers already use Linux IRQ functions instead of DRM's
> abstraction layer. Patches 1 to 12 convert the remaining ones.
> The patches also resolve a bug for devices without assigned interrupt
> number. DRM helpers don't test for IRQ_NOTCONNECTED, so drivers do
> not detect if the device has no interrupt assigned.
> 
> Patch 13 removes an unused function.
> 
> Patch 14 moves the DRM IRQ helpers behind CONFIG_DRM_LEGACY. Only
> the old non-KMS drivers still use the functionality.
> 
> v2:
> 	* drop IRQ_NOTCONNECTED test from atmel-hlcdc (Sam)
> 	* use devm_request_irq() in atmel-hlcdc (Sam)
> 	* unify variable names in arm/hlcdc (Sam)
> 
> Thomas Zimmermann (14):

The following patches are all:
Acked-by: Sam Ravnborg <sam@ravnborg.org>

>   drm/fsl-dcu: Convert to Linux IRQ interfaces
>   drm/gma500: Convert to Linux IRQ interfaces
>   drm/kmb: Convert to Linux IRQ interfaces
>   drm/msm: Convert to Linux IRQ interfaces
>   drm/mxsfb: Convert to Linux IRQ interfaces
>   drm/tidss: Convert to Linux IRQ interfaces
>   drm/vc4: Convert to Linux IRQ interfaces
>   drm: Remove unused devm_drm_irq_install()

The remaining patches I either skipped or already had a feedback from
me or I asked a question.

	Sam
Chrisanthus, Anitha Aug. 3, 2021, 6:36 p.m. UTC | #2
Hi Thomas,
Can you please hold off on applying the kmb patch, I am seeing some issues while testing. Modetest works, but video playback only plays once, and it fails the second time with this patch.

Thanks,
Anitha


> -----Original Message-----
> From: Sam Ravnborg <sam@ravnborg.org>
> Sent: Tuesday, August 3, 2021 8:05 AM
> To: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: daniel@ffwll.ch; airlied@linux.ie; alexander.deucher@amd.com;
> christian.koenig@amd.com; liviu.dudau@arm.com; brian.starkey@arm.com;
> bbrezillon@kernel.org; nicolas.ferre@microchip.com;
> maarten.lankhorst@linux.intel.com; mripard@kernel.org; stefan@agner.ch;
> alison.wang@nxp.com; patrik.r.jakobsson@gmail.com; Chrisanthus, Anitha
> <anitha.chrisanthus@intel.com>; robdclark@gmail.com; Dea, Edmund J
> <edmund.j.dea@intel.com>; sean@poorly.run; shawnguo@kernel.org;
> s.hauer@pengutronix.de; kernel@pengutronix.de; jyri.sarha@iki.fi;
> tomba@kernel.org; Dan.Sneddon@microchip.com;
> tomi.valkeinen@ideasonboard.com; amd-gfx@lists.freedesktop.org; dri-
> devel@lists.freedesktop.org; linux-arm-kernel@lists.infradead.org; linux-arm-
> msm@vger.kernel.org; freedreno@lists.freedesktop.org
> Subject: Re: [PATCH v2 00/14] drm: Make DRM's IRQ helpers legacy
> 
> Hi Thomas,
> 
> On Tue, Aug 03, 2021 at 11:06:50AM +0200, Thomas Zimmermann wrote:
> > DRM's IRQ helpers are only helpful for old, non-KMS drivers. Move
> > the code behind CONFIG_DRM_LEGACY. Convert KMS drivers to Linux
> > IRQ interfaces.
> >
> > DRM provides IRQ helpers for setting up, receiving and removing IRQ
> > handlers. It's an abstraction over plain Linux functions. The code
> > is mid-layerish with several callbacks to hook into the rsp drivers.
> > Old UMS driver have their interrupts enabled via ioctl, so these
> > abstractions makes some sense. Modern KMS manage all their interrupts
> > internally. Using the DRM helpers adds indirection without benefits.
> >
> > Most KMS drivers already use Linux IRQ functions instead of DRM's
> > abstraction layer. Patches 1 to 12 convert the remaining ones.
> > The patches also resolve a bug for devices without assigned interrupt
> > number. DRM helpers don't test for IRQ_NOTCONNECTED, so drivers do
> > not detect if the device has no interrupt assigned.
> >
> > Patch 13 removes an unused function.
> >
> > Patch 14 moves the DRM IRQ helpers behind CONFIG_DRM_LEGACY. Only
> > the old non-KMS drivers still use the functionality.
> >
> > v2:
> > 	* drop IRQ_NOTCONNECTED test from atmel-hlcdc (Sam)
> > 	* use devm_request_irq() in atmel-hlcdc (Sam)
> > 	* unify variable names in arm/hlcdc (Sam)
> >
> > Thomas Zimmermann (14):
> 
> The following patches are all:
> Acked-by: Sam Ravnborg <sam@ravnborg.org>
> 
> >   drm/fsl-dcu: Convert to Linux IRQ interfaces
> >   drm/gma500: Convert to Linux IRQ interfaces
> >   drm/kmb: Convert to Linux IRQ interfaces
> >   drm/msm: Convert to Linux IRQ interfaces
> >   drm/mxsfb: Convert to Linux IRQ interfaces
> >   drm/tidss: Convert to Linux IRQ interfaces
> >   drm/vc4: Convert to Linux IRQ interfaces
> >   drm: Remove unused devm_drm_irq_install()
> 
> The remaining patches I either skipped or already had a feedback from
> me or I asked a question.
> 
> 	Sam
Thomas Zimmermann Aug. 4, 2021, 7:10 a.m. UTC | #3
Hi

Am 03.08.21 um 20:36 schrieb Chrisanthus, Anitha:
> Hi Thomas,
> Can you please hold off on applying the kmb patch, I am seeing some issues while testing. Modetest works, but video playback only plays once, and it fails the second time with this patch.

Sounds a bit like the testing issue at [1]. For testing, you need the 
latest drm-misc-next or drm-tip. Specifically, you need commit 
1e4cd78ed493 ("drm: Don't test for IRQ support in VBLANK ioctls").

Let me know whether this works for you.

Best regards
Thomas

[1] https://patchwork.freedesktop.org/patch/447057/?series=93078&rev=1

> 
> Thanks,
> Anitha
> 
> 
>> -----Original Message-----
>> From: Sam Ravnborg <sam@ravnborg.org>
>> Sent: Tuesday, August 3, 2021 8:05 AM
>> To: Thomas Zimmermann <tzimmermann@suse.de>
>> Cc: daniel@ffwll.ch; airlied@linux.ie; alexander.deucher@amd.com;
>> christian.koenig@amd.com; liviu.dudau@arm.com; brian.starkey@arm.com;
>> bbrezillon@kernel.org; nicolas.ferre@microchip.com;
>> maarten.lankhorst@linux.intel.com; mripard@kernel.org; stefan@agner.ch;
>> alison.wang@nxp.com; patrik.r.jakobsson@gmail.com; Chrisanthus, Anitha
>> <anitha.chrisanthus@intel.com>; robdclark@gmail.com; Dea, Edmund J
>> <edmund.j.dea@intel.com>; sean@poorly.run; shawnguo@kernel.org;
>> s.hauer@pengutronix.de; kernel@pengutronix.de; jyri.sarha@iki.fi;
>> tomba@kernel.org; Dan.Sneddon@microchip.com;
>> tomi.valkeinen@ideasonboard.com; amd-gfx@lists.freedesktop.org; dri-
>> devel@lists.freedesktop.org; linux-arm-kernel@lists.infradead.org; linux-arm-
>> msm@vger.kernel.org; freedreno@lists.freedesktop.org
>> Subject: Re: [PATCH v2 00/14] drm: Make DRM's IRQ helpers legacy
>>
>> Hi Thomas,
>>
>> On Tue, Aug 03, 2021 at 11:06:50AM +0200, Thomas Zimmermann wrote:
>>> DRM's IRQ helpers are only helpful for old, non-KMS drivers. Move
>>> the code behind CONFIG_DRM_LEGACY. Convert KMS drivers to Linux
>>> IRQ interfaces.
>>>
>>> DRM provides IRQ helpers for setting up, receiving and removing IRQ
>>> handlers. It's an abstraction over plain Linux functions. The code
>>> is mid-layerish with several callbacks to hook into the rsp drivers.
>>> Old UMS driver have their interrupts enabled via ioctl, so these
>>> abstractions makes some sense. Modern KMS manage all their interrupts
>>> internally. Using the DRM helpers adds indirection without benefits.
>>>
>>> Most KMS drivers already use Linux IRQ functions instead of DRM's
>>> abstraction layer. Patches 1 to 12 convert the remaining ones.
>>> The patches also resolve a bug for devices without assigned interrupt
>>> number. DRM helpers don't test for IRQ_NOTCONNECTED, so drivers do
>>> not detect if the device has no interrupt assigned.
>>>
>>> Patch 13 removes an unused function.
>>>
>>> Patch 14 moves the DRM IRQ helpers behind CONFIG_DRM_LEGACY. Only
>>> the old non-KMS drivers still use the functionality.
>>>
>>> v2:
>>> 	* drop IRQ_NOTCONNECTED test from atmel-hlcdc (Sam)
>>> 	* use devm_request_irq() in atmel-hlcdc (Sam)
>>> 	* unify variable names in arm/hlcdc (Sam)
>>>
>>> Thomas Zimmermann (14):
>>
>> The following patches are all:
>> Acked-by: Sam Ravnborg <sam@ravnborg.org>
>>
>>>    drm/fsl-dcu: Convert to Linux IRQ interfaces
>>>    drm/gma500: Convert to Linux IRQ interfaces
>>>    drm/kmb: Convert to Linux IRQ interfaces
>>>    drm/msm: Convert to Linux IRQ interfaces
>>>    drm/mxsfb: Convert to Linux IRQ interfaces
>>>    drm/tidss: Convert to Linux IRQ interfaces
>>>    drm/vc4: Convert to Linux IRQ interfaces
>>>    drm: Remove unused devm_drm_irq_install()
>>
>> The remaining patches I either skipped or already had a feedback from
>> me or I asked a question.
>>
>> 	Sam
Chrisanthus, Anitha Aug. 5, 2021, 11:59 p.m. UTC | #4
Hi Thomas,

> -----Original Message-----
> From: Thomas Zimmermann <tzimmermann@suse.de>
> Sent: Wednesday, August 4, 2021 12:11 AM
> To: Chrisanthus, Anitha <anitha.chrisanthus@intel.com>; Sam Ravnborg
> <sam@ravnborg.org>
> Cc: daniel@ffwll.ch; airlied@linux.ie; alexander.deucher@amd.com;
> christian.koenig@amd.com; liviu.dudau@arm.com; brian.starkey@arm.com;
> bbrezillon@kernel.org; nicolas.ferre@microchip.com;
> maarten.lankhorst@linux.intel.com; mripard@kernel.org; stefan@agner.ch;
> alison.wang@nxp.com; patrik.r.jakobsson@gmail.com; robdclark@gmail.com;
> Dea, Edmund J <edmund.j.dea@intel.com>; sean@poorly.run;
> shawnguo@kernel.org; s.hauer@pengutronix.de; kernel@pengutronix.de;
> jyri.sarha@iki.fi; tomba@kernel.org; Dan.Sneddon@microchip.com;
> tomi.valkeinen@ideasonboard.com; amd-gfx@lists.freedesktop.org; dri-
> devel@lists.freedesktop.org; linux-arm-kernel@lists.infradead.org; linux-arm-
> msm@vger.kernel.org; freedreno@lists.freedesktop.org
> Subject: Re: [PATCH v2 00/14] drm: Make DRM's IRQ helpers legacy
> 
> Hi
> 
> Am 03.08.21 um 20:36 schrieb Chrisanthus, Anitha:
> > Hi Thomas,
> > Can you please hold off on applying the kmb patch, I am seeing some issues
> while testing. Modetest works, but video playback only plays once, and it fails
> the second time with this patch.
> 
> Sounds a bit like the testing issue at [1]. For testing, you need the
> latest drm-misc-next or drm-tip. Specifically, you need commit
> 1e4cd78ed493 ("drm: Don't test for IRQ support in VBLANK ioctls").


You are right, with the above patch video plays fine. It's all good now! Sorry about the confusion.
> 
> Let me know whether this works for you.
> 
> Best regards
> Thomas
> 
> [1] https://patchwork.freedesktop.org/patch/447057/?series=93078&rev=1
> 
> >
> > Thanks,
> > Anitha
> >
> >
> >> -----Original Message-----
> >> From: Sam Ravnborg <sam@ravnborg.org>
> >> Sent: Tuesday, August 3, 2021 8:05 AM
> >> To: Thomas Zimmermann <tzimmermann@suse.de>
> >> Cc: daniel@ffwll.ch; airlied@linux.ie; alexander.deucher@amd.com;
> >> christian.koenig@amd.com; liviu.dudau@arm.com;
> brian.starkey@arm.com;
> >> bbrezillon@kernel.org; nicolas.ferre@microchip.com;
> >> maarten.lankhorst@linux.intel.com; mripard@kernel.org;
> stefan@agner.ch;
> >> alison.wang@nxp.com; patrik.r.jakobsson@gmail.com; Chrisanthus, Anitha
> >> <anitha.chrisanthus@intel.com>; robdclark@gmail.com; Dea, Edmund J
> >> <edmund.j.dea@intel.com>; sean@poorly.run; shawnguo@kernel.org;
> >> s.hauer@pengutronix.de; kernel@pengutronix.de; jyri.sarha@iki.fi;
> >> tomba@kernel.org; Dan.Sneddon@microchip.com;
> >> tomi.valkeinen@ideasonboard.com; amd-gfx@lists.freedesktop.org; dri-
> >> devel@lists.freedesktop.org; linux-arm-kernel@lists.infradead.org; linux-
> arm-
> >> msm@vger.kernel.org; freedreno@lists.freedesktop.org
> >> Subject: Re: [PATCH v2 00/14] drm: Make DRM's IRQ helpers legacy
> >>
> >> Hi Thomas,
> >>
> >> On Tue, Aug 03, 2021 at 11:06:50AM +0200, Thomas Zimmermann wrote:
> >>> DRM's IRQ helpers are only helpful for old, non-KMS drivers. Move
> >>> the code behind CONFIG_DRM_LEGACY. Convert KMS drivers to Linux
> >>> IRQ interfaces.
> >>>
> >>> DRM provides IRQ helpers for setting up, receiving and removing IRQ
> >>> handlers. It's an abstraction over plain Linux functions. The code
> >>> is mid-layerish with several callbacks to hook into the rsp drivers.
> >>> Old UMS driver have their interrupts enabled via ioctl, so these
> >>> abstractions makes some sense. Modern KMS manage all their interrupts
> >>> internally. Using the DRM helpers adds indirection without benefits.
> >>>
> >>> Most KMS drivers already use Linux IRQ functions instead of DRM's
> >>> abstraction layer. Patches 1 to 12 convert the remaining ones.
> >>> The patches also resolve a bug for devices without assigned interrupt
> >>> number. DRM helpers don't test for IRQ_NOTCONNECTED, so drivers do
> >>> not detect if the device has no interrupt assigned.
> >>>
> >>> Patch 13 removes an unused function.
> >>>
> >>> Patch 14 moves the DRM IRQ helpers behind CONFIG_DRM_LEGACY. Only
> >>> the old non-KMS drivers still use the functionality.
> >>>
> >>> v2:
> >>> 	* drop IRQ_NOTCONNECTED test from atmel-hlcdc (Sam)
> >>> 	* use devm_request_irq() in atmel-hlcdc (Sam)
> >>> 	* unify variable names in arm/hlcdc (Sam)
> >>>
> >>> Thomas Zimmermann (14):
> >>
> >> The following patches are all:
> >> Acked-by: Sam Ravnborg <sam@ravnborg.org>
> >>
> >>>    drm/fsl-dcu: Convert to Linux IRQ interfaces
> >>>    drm/gma500: Convert to Linux IRQ interfaces
> >>>    drm/kmb: Convert to Linux IRQ interfaces
> >>>    drm/msm: Convert to Linux IRQ interfaces
> >>>    drm/mxsfb: Convert to Linux IRQ interfaces
> >>>    drm/tidss: Convert to Linux IRQ interfaces
> >>>    drm/vc4: Convert to Linux IRQ interfaces
> >>>    drm: Remove unused devm_drm_irq_install()
> >>
> >> The remaining patches I either skipped or already had a feedback from
> >> me or I asked a question.
> >>
> >> 	Sam
> 
> --
> Thomas Zimmermann
> Graphics Driver Developer
> SUSE Software Solutions Germany GmbH
> Maxfeldstr. 5, 90409 Nürnberg, Germany
> (HRB 36809, AG Nürnberg)
> Geschäftsführer: Felix Imendörffer
Thomas Zimmermann Aug. 7, 2021, 6:51 a.m. UTC | #5
Hi

Am 06.08.21 um 01:59 schrieb Chrisanthus, Anitha:
> Hi Thomas,
> 
>> -----Original Message-----
>> From: Thomas Zimmermann <tzimmermann@suse.de>
>> Sent: Wednesday, August 4, 2021 12:11 AM
>> To: Chrisanthus, Anitha <anitha.chrisanthus@intel.com>; Sam Ravnborg
>> <sam@ravnborg.org>
>> Cc: daniel@ffwll.ch; airlied@linux.ie; alexander.deucher@amd.com;
>> christian.koenig@amd.com; liviu.dudau@arm.com; brian.starkey@arm.com;
>> bbrezillon@kernel.org; nicolas.ferre@microchip.com;
>> maarten.lankhorst@linux.intel.com; mripard@kernel.org; stefan@agner.ch;
>> alison.wang@nxp.com; patrik.r.jakobsson@gmail.com; robdclark@gmail.com;
>> Dea, Edmund J <edmund.j.dea@intel.com>; sean@poorly.run;
>> shawnguo@kernel.org; s.hauer@pengutronix.de; kernel@pengutronix.de;
>> jyri.sarha@iki.fi; tomba@kernel.org; Dan.Sneddon@microchip.com;
>> tomi.valkeinen@ideasonboard.com; amd-gfx@lists.freedesktop.org; dri-
>> devel@lists.freedesktop.org; linux-arm-kernel@lists.infradead.org; linux-arm-
>> msm@vger.kernel.org; freedreno@lists.freedesktop.org
>> Subject: Re: [PATCH v2 00/14] drm: Make DRM's IRQ helpers legacy
>>
>> Hi
>>
>> Am 03.08.21 um 20:36 schrieb Chrisanthus, Anitha:
>>> Hi Thomas,
>>> Can you please hold off on applying the kmb patch, I am seeing some issues
>> while testing. Modetest works, but video playback only plays once, and it fails
>> the second time with this patch.
>>
>> Sounds a bit like the testing issue at [1]. For testing, you need the
>> latest drm-misc-next or drm-tip. Specifically, you need commit
>> 1e4cd78ed493 ("drm: Don't test for IRQ support in VBLANK ioctls").
> 
> 
> You are right, with the above patch video plays fine. It's all good now! Sorry about the confusion.

Thanks for trying. Can I add your Tested-by tag?

Best regards
Thomas

>>
>> Let me know whether this works for you.
>>
>> Best regards
>> Thomas
>>
>> [1] https://patchwork.freedesktop.org/patch/447057/?series=93078&rev=1
>>
>>>
>>> Thanks,
>>> Anitha
>>>
>>>
>>>> -----Original Message-----
>>>> From: Sam Ravnborg <sam@ravnborg.org>
>>>> Sent: Tuesday, August 3, 2021 8:05 AM
>>>> To: Thomas Zimmermann <tzimmermann@suse.de>
>>>> Cc: daniel@ffwll.ch; airlied@linux.ie; alexander.deucher@amd.com;
>>>> christian.koenig@amd.com; liviu.dudau@arm.com;
>> brian.starkey@arm.com;
>>>> bbrezillon@kernel.org; nicolas.ferre@microchip.com;
>>>> maarten.lankhorst@linux.intel.com; mripard@kernel.org;
>> stefan@agner.ch;
>>>> alison.wang@nxp.com; patrik.r.jakobsson@gmail.com; Chrisanthus, Anitha
>>>> <anitha.chrisanthus@intel.com>; robdclark@gmail.com; Dea, Edmund J
>>>> <edmund.j.dea@intel.com>; sean@poorly.run; shawnguo@kernel.org;
>>>> s.hauer@pengutronix.de; kernel@pengutronix.de; jyri.sarha@iki.fi;
>>>> tomba@kernel.org; Dan.Sneddon@microchip.com;
>>>> tomi.valkeinen@ideasonboard.com; amd-gfx@lists.freedesktop.org; dri-
>>>> devel@lists.freedesktop.org; linux-arm-kernel@lists.infradead.org; linux-
>> arm-
>>>> msm@vger.kernel.org; freedreno@lists.freedesktop.org
>>>> Subject: Re: [PATCH v2 00/14] drm: Make DRM's IRQ helpers legacy
>>>>
>>>> Hi Thomas,
>>>>
>>>> On Tue, Aug 03, 2021 at 11:06:50AM +0200, Thomas Zimmermann wrote:
>>>>> DRM's IRQ helpers are only helpful for old, non-KMS drivers. Move
>>>>> the code behind CONFIG_DRM_LEGACY. Convert KMS drivers to Linux
>>>>> IRQ interfaces.
>>>>>
>>>>> DRM provides IRQ helpers for setting up, receiving and removing IRQ
>>>>> handlers. It's an abstraction over plain Linux functions. The code
>>>>> is mid-layerish with several callbacks to hook into the rsp drivers.
>>>>> Old UMS driver have their interrupts enabled via ioctl, so these
>>>>> abstractions makes some sense. Modern KMS manage all their interrupts
>>>>> internally. Using the DRM helpers adds indirection without benefits.
>>>>>
>>>>> Most KMS drivers already use Linux IRQ functions instead of DRM's
>>>>> abstraction layer. Patches 1 to 12 convert the remaining ones.
>>>>> The patches also resolve a bug for devices without assigned interrupt
>>>>> number. DRM helpers don't test for IRQ_NOTCONNECTED, so drivers do
>>>>> not detect if the device has no interrupt assigned.
>>>>>
>>>>> Patch 13 removes an unused function.
>>>>>
>>>>> Patch 14 moves the DRM IRQ helpers behind CONFIG_DRM_LEGACY. Only
>>>>> the old non-KMS drivers still use the functionality.
>>>>>
>>>>> v2:
>>>>> 	* drop IRQ_NOTCONNECTED test from atmel-hlcdc (Sam)
>>>>> 	* use devm_request_irq() in atmel-hlcdc (Sam)
>>>>> 	* unify variable names in arm/hlcdc (Sam)
>>>>>
>>>>> Thomas Zimmermann (14):
>>>>
>>>> The following patches are all:
>>>> Acked-by: Sam Ravnborg <sam@ravnborg.org>
>>>>
>>>>>     drm/fsl-dcu: Convert to Linux IRQ interfaces
>>>>>     drm/gma500: Convert to Linux IRQ interfaces
>>>>>     drm/kmb: Convert to Linux IRQ interfaces
>>>>>     drm/msm: Convert to Linux IRQ interfaces
>>>>>     drm/mxsfb: Convert to Linux IRQ interfaces
>>>>>     drm/tidss: Convert to Linux IRQ interfaces
>>>>>     drm/vc4: Convert to Linux IRQ interfaces
>>>>>     drm: Remove unused devm_drm_irq_install()
>>>>
>>>> The remaining patches I either skipped or already had a feedback from
>>>> me or I asked a question.
>>>>
>>>> 	Sam
>>
>> --
>> Thomas Zimmermann
>> Graphics Driver Developer
>> SUSE Software Solutions Germany GmbH
>> Maxfeldstr. 5, 90409 Nürnberg, Germany
>> (HRB 36809, AG Nürnberg)
>> Geschäftsführer: Felix Imendörffer
>