Re: [PATCH] drm/i915: Drop all references to DRM IRQ midlayer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 29, 2021 at 6:11 PM Ville Syrjälä
<ville.syrjala@xxxxxxxxxxxxxxx> 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@xxxxxxx>
> > Fixes: 536f77b1caa0 ("drm/i915/gt: Call stop_ring() from ring resume, again")
> > Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > Cc: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx>
> > Cc: Daniel Vetter <daniel.vetter@xxxxxxxx>
> > Cc: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>
> > Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
> > Cc: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
> > Cc: Lucas De Marchi <lucas.demarchi@xxxxxxxxx>
> > ---
> >  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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux