* [PATCH] drm/i915: Drop all references to DRM IRQ midlayer
@ 2021-06-25 8:47 Thomas Zimmermann
2021-06-29 16:10 ` Ville Syrjälä
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Zimmermann @ 2021-06-25 8:47 UTC (permalink / raw)
To: jani.nikula, joonas.lahtinen, rodrigo.vivi, airlied, daniel,
chris, mika.kuoppala, matthew.brost, maarten.lankhorst,
lucas.demarchi
Cc: Daniel Vetter, intel-gfx, Thomas Zimmermann, dri-devel
Remove all references to DRM's IRQ midlayer.
The code in xcs_resume() probably didn't work as intended. It uses
struct drm_device.irq, which is allocated to 0, but never initialized
by i915 to the device's interrupt number.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 536f77b1caa0 ("drm/i915/gt: Call stop_ring() from ring resume, again")
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
---
drivers/gpu/drm/i915/gt/intel_ring_submission.c | 3 ++-
drivers/gpu/drm/i915/i915_drv.c | 1 -
drivers/gpu/drm/i915/i915_irq.c | 1 -
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_ring_submission.c b/drivers/gpu/drm/i915/gt/intel_ring_submission.c
index 5d42a12ef3d6..d893aaaed74f 100644
--- a/drivers/gpu/drm/i915/gt/intel_ring_submission.c
+++ b/drivers/gpu/drm/i915/gt/intel_ring_submission.c
@@ -180,12 +180,13 @@ static bool stop_ring(struct intel_engine_cs *engine)
static int xcs_resume(struct intel_engine_cs *engine)
{
struct intel_ring *ring = engine->legacy.ring;
+ struct pci_dev *pdev = to_pci_dev(engine->i915->drm.dev);
ENGINE_TRACE(engine, "ring:{HEAD:%04x, TAIL:%04x}\n",
ring->head, ring->tail);
/* Double check the ring is empty & disabled before we resume */
- synchronize_hardirq(engine->i915->drm.irq);
+ synchronize_hardirq(pdev->irq);
if (!stop_ring(engine))
goto err;
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 850b499c71c8..73de45472f60 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -42,7 +42,6 @@
#include <drm/drm_aperture.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_ioctl.h>
-#include <drm/drm_irq.h>
#include <drm/drm_managed.h>
#include <drm/drm_probe_helper.h>
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index a11bdb667241..eef616d96f12 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -33,7 +33,6 @@
#include <linux/sysrq.h>
#include <drm/drm_drv.h>
-#include <drm/drm_irq.h>
#include "display/intel_de.h"
#include "display/intel_display_types.h"
base-commit: 8c1323b422f8473421682ba783b5949ddd89a3f4
prerequisite-patch-id: c2b2f08f0eccc9f5df0c0da49fa1d36267deb11d
prerequisite-patch-id: c67e5d886a47b7d0266d81100837557fda34cb24
--
2.32.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915: Drop all references to DRM IRQ midlayer
2021-06-25 8:47 [PATCH] drm/i915: Drop all references to DRM IRQ midlayer Thomas Zimmermann
@ 2021-06-29 16:10 ` Ville Syrjälä
2021-06-29 16:39 ` Daniel Vetter
0 siblings, 1 reply; 3+ messages in thread
From: Ville Syrjälä @ 2021-06-29 16:10 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: matthew.brost, airlied, mika.kuoppala, intel-gfx, chris,
Daniel Vetter, dri-devel, rodrigo.vivi, lucas.demarchi
On Fri, Jun 25, 2021 at 10:47:40AM +0200, Thomas Zimmermann wrote:
> Remove all references to DRM's IRQ midlayer.
>
> The code in xcs_resume() probably didn't work as intended. It uses
> struct drm_device.irq, which is allocated to 0, but never initialized
> by i915 to the device's interrupt number.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> Fixes: 536f77b1caa0 ("drm/i915/gt: Call stop_ring() from ring resume, again")
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
> ---
> drivers/gpu/drm/i915/gt/intel_ring_submission.c | 3 ++-
> drivers/gpu/drm/i915/i915_drv.c | 1 -
> drivers/gpu/drm/i915/i915_irq.c | 1 -
> 3 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_ring_submission.c b/drivers/gpu/drm/i915/gt/intel_ring_submission.c
> index 5d42a12ef3d6..d893aaaed74f 100644
> --- a/drivers/gpu/drm/i915/gt/intel_ring_submission.c
> +++ b/drivers/gpu/drm/i915/gt/intel_ring_submission.c
> @@ -180,12 +180,13 @@ static bool stop_ring(struct intel_engine_cs *engine)
> static int xcs_resume(struct intel_engine_cs *engine)
> {
> struct intel_ring *ring = engine->legacy.ring;
> + struct pci_dev *pdev = to_pci_dev(engine->i915->drm.dev);
>
> ENGINE_TRACE(engine, "ring:{HEAD:%04x, TAIL:%04x}\n",
> ring->head, ring->tail);
>
> /* Double check the ring is empty & disabled before we resume */
> - synchronize_hardirq(engine->i915->drm.irq);
> + synchronize_hardirq(pdev->irq);
We have intel_synchronize_irq() to hide all these mundane details.
Might want to add a matching intel_synchronize_hardirq().
> if (!stop_ring(engine))
> goto err;
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 850b499c71c8..73de45472f60 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -42,7 +42,6 @@
> #include <drm/drm_aperture.h>
> #include <drm/drm_atomic_helper.h>
> #include <drm/drm_ioctl.h>
> -#include <drm/drm_irq.h>
> #include <drm/drm_managed.h>
> #include <drm/drm_probe_helper.h>
>
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index a11bdb667241..eef616d96f12 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -33,7 +33,6 @@
> #include <linux/sysrq.h>
>
> #include <drm/drm_drv.h>
> -#include <drm/drm_irq.h>
>
> #include "display/intel_de.h"
> #include "display/intel_display_types.h"
>
> base-commit: 8c1323b422f8473421682ba783b5949ddd89a3f4
> prerequisite-patch-id: c2b2f08f0eccc9f5df0c0da49fa1d36267deb11d
> prerequisite-patch-id: c67e5d886a47b7d0266d81100837557fda34cb24
> --
> 2.32.0
--
Ville Syrjälä
Intel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915: Drop all references to DRM IRQ midlayer
2021-06-29 16:10 ` Ville Syrjälä
@ 2021-06-29 16:39 ` Daniel Vetter
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2021-06-29 16:39 UTC (permalink / raw)
To: Ville Syrjälä
Cc: Matthew Brost, Dave Airlie, Mika Kuoppala, intel-gfx, Wilson,
Chris, dri-devel, Thomas Zimmermann, Rodrigo Vivi,
Lucas De Marchi
On Tue, Jun 29, 2021 at 6:11 PM Ville Syrjälä
<ville.syrjala@linux.intel.com> wrote:
>
> On Fri, Jun 25, 2021 at 10:47:40AM +0200, Thomas Zimmermann wrote:
> > Remove all references to DRM's IRQ midlayer.
> >
> > The code in xcs_resume() probably didn't work as intended. It uses
> > struct drm_device.irq, which is allocated to 0, but never initialized
> > by i915 to the device's interrupt number.
> >
> > Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> > Fixes: 536f77b1caa0 ("drm/i915/gt: Call stop_ring() from ring resume, again")
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> > Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > Cc: Lucas De Marchi <lucas.demarchi@intel.com>
> > ---
> > drivers/gpu/drm/i915/gt/intel_ring_submission.c | 3 ++-
> > drivers/gpu/drm/i915/i915_drv.c | 1 -
> > drivers/gpu/drm/i915/i915_irq.c | 1 -
> > 3 files changed, 2 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/gt/intel_ring_submission.c b/drivers/gpu/drm/i915/gt/intel_ring_submission.c
> > index 5d42a12ef3d6..d893aaaed74f 100644
> > --- a/drivers/gpu/drm/i915/gt/intel_ring_submission.c
> > +++ b/drivers/gpu/drm/i915/gt/intel_ring_submission.c
> > @@ -180,12 +180,13 @@ static bool stop_ring(struct intel_engine_cs *engine)
> > static int xcs_resume(struct intel_engine_cs *engine)
> > {
> > struct intel_ring *ring = engine->legacy.ring;
> > + struct pci_dev *pdev = to_pci_dev(engine->i915->drm.dev);
> >
> > ENGINE_TRACE(engine, "ring:{HEAD:%04x, TAIL:%04x}\n",
> > ring->head, ring->tail);
> >
> > /* Double check the ring is empty & disabled before we resume */
> > - synchronize_hardirq(engine->i915->drm.irq);
> > + synchronize_hardirq(pdev->irq);
>
> We have intel_synchronize_irq() to hide all these mundane details.
> Might want to add a matching intel_synchronize_hardirq().
Hm I wonder whether we shouldn't just use the normal synchronize_irq()
here. We don't have a threaded irq handler, and this should be called
from process context. intel-gfx-ci will catch if I'm wrong :-)
-Daniel
>
> > if (!stop_ring(engine))
> > goto err;
> >
> > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> > index 850b499c71c8..73de45472f60 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.c
> > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > @@ -42,7 +42,6 @@
> > #include <drm/drm_aperture.h>
> > #include <drm/drm_atomic_helper.h>
> > #include <drm/drm_ioctl.h>
> > -#include <drm/drm_irq.h>
> > #include <drm/drm_managed.h>
> > #include <drm/drm_probe_helper.h>
> >
> > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> > index a11bdb667241..eef616d96f12 100644
> > --- a/drivers/gpu/drm/i915/i915_irq.c
> > +++ b/drivers/gpu/drm/i915/i915_irq.c
> > @@ -33,7 +33,6 @@
> > #include <linux/sysrq.h>
> >
> > #include <drm/drm_drv.h>
> > -#include <drm/drm_irq.h>
> >
> > #include "display/intel_de.h"
> > #include "display/intel_display_types.h"
> >
> > base-commit: 8c1323b422f8473421682ba783b5949ddd89a3f4
> > prerequisite-patch-id: c2b2f08f0eccc9f5df0c0da49fa1d36267deb11d
> > prerequisite-patch-id: c67e5d886a47b7d0266d81100837557fda34cb24
> > --
> > 2.32.0
>
> --
> Ville Syrjälä
> Intel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-29 16:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-25 8:47 [PATCH] drm/i915: Drop all references to DRM IRQ midlayer Thomas Zimmermann
2021-06-29 16:10 ` Ville Syrjälä
2021-06-29 16:39 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).