public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] drm/i915/gem: Allow EXEC_CAPTURE on recoverable contexts on DG1
       [not found] <20250411144313.11660-1-ville.syrjala@linux.intel.com>
@ 2025-04-11 14:43 ` Ville Syrjala
  2025-05-22  6:25   ` Joonas Lahtinen
  0 siblings, 1 reply; 5+ messages in thread
From: Ville Syrjala @ 2025-04-11 14:43 UTC (permalink / raw)
  To: intel-gfx; +Cc: stable, Matthew Auld, Thomas Hellström, Andi Shyti

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

The intel-media-driver is currently broken on DG1 because
it uses EXEC_CAPTURE with recovarable contexts. Relax the
check to allow that.

I've also submitted a fix for the intel-media-driver:
https://github.com/intel/media-driver/pull/1920

Cc: stable@vger.kernel.org
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Testcase: igt/gem_exec_capture/capture-invisible
Fixes: 71b1669ea9bd ("drm/i915/uapi: tweak error capture on recoverable contexts")
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
index ca7e9216934a..ea9d5063ce78 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
@@ -2013,7 +2013,7 @@ static int eb_capture_stage(struct i915_execbuffer *eb)
 			continue;
 
 		if (i915_gem_context_is_recoverable(eb->gem_context) &&
-		    (IS_DGFX(eb->i915) || GRAPHICS_VER_FULL(eb->i915) > IP_VER(12, 0)))
+		    GRAPHICS_VER_FULL(eb->i915) > IP_VER(12, 10))
 			return -EINVAL;
 
 		for_each_batch_create_order(eb, j) {
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 1/2] drm/i915/gem: Allow EXEC_CAPTURE on recoverable contexts on DG1
  2025-04-11 14:43 ` [PATCH v2 1/2] drm/i915/gem: Allow EXEC_CAPTURE on recoverable contexts on DG1 Ville Syrjala
@ 2025-05-22  6:25   ` Joonas Lahtinen
  2025-05-22  6:35     ` Andi Shyti
  2025-05-22  9:35     ` Ville Syrjälä
  0 siblings, 2 replies; 5+ messages in thread
From: Joonas Lahtinen @ 2025-05-22  6:25 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx, Tvrtko Ursulin
  Cc: stable, Matthew Auld, Thomas Hellström, Andi Shyti

(+ Tvrkto)

Quoting Ville Syrjala (2025-04-11 17:43:12)
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> The intel-media-driver is currently broken on DG1 because
> it uses EXEC_CAPTURE with recovarable contexts. Relax the
> check to allow that.
> 
> I've also submitted a fix for the intel-media-driver:
> https://github.com/intel/media-driver/pull/1920
> 
> Cc: stable@vger.kernel.org
> Cc: Matthew Auld <matthew.auld@intel.com>
> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> Testcase: igt/gem_exec_capture/capture-invisible
> Fixes: 71b1669ea9bd ("drm/i915/uapi: tweak error capture on recoverable contexts")
> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> index ca7e9216934a..ea9d5063ce78 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> @@ -2013,7 +2013,7 @@ static int eb_capture_stage(struct i915_execbuffer *eb)
>                         continue;
>  
>                 if (i915_gem_context_is_recoverable(eb->gem_context) &&
> -                   (IS_DGFX(eb->i915) || GRAPHICS_VER_FULL(eb->i915) > IP_VER(12, 0)))
> +                   GRAPHICS_VER_FULL(eb->i915) > IP_VER(12, 10))

The IS_DGFX check was there because the error capture is expected to be
broken on anything with VRAM.

If we have already submitted an userspace fix to remove that flag, that
would be the right way to go.

So reverting this for now.

Regards, Joonas

>                         return -EINVAL;
>  
>                 for_each_batch_create_order(eb, j) {
> -- 
> 2.49.0
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 1/2] drm/i915/gem: Allow EXEC_CAPTURE on recoverable contexts on DG1
  2025-05-22  6:25   ` Joonas Lahtinen
@ 2025-05-22  6:35     ` Andi Shyti
  2025-05-22  9:35     ` Ville Syrjälä
  1 sibling, 0 replies; 5+ messages in thread
From: Andi Shyti @ 2025-05-22  6:35 UTC (permalink / raw)
  To: Joonas Lahtinen
  Cc: Ville Syrjala, intel-gfx, Tvrtko Ursulin, stable, Matthew Auld,
	Thomas Hellström, Andi Shyti

Hi Joonas,

On Thu, May 22, 2025 at 09:25:04AM +0300, Joonas Lahtinen wrote:
> (+ Tvrkto)
> 
> Quoting Ville Syrjala (2025-04-11 17:43:12)
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > The intel-media-driver is currently broken on DG1 because
> > it uses EXEC_CAPTURE with recovarable contexts. Relax the
> > check to allow that.
> > 
> > I've also submitted a fix for the intel-media-driver:
> > https://github.com/intel/media-driver/pull/1920
> > 
> > Cc: stable@vger.kernel.org
> > Cc: Matthew Auld <matthew.auld@intel.com>
> > Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> > Testcase: igt/gem_exec_capture/capture-invisible
> > Fixes: 71b1669ea9bd ("drm/i915/uapi: tweak error capture on recoverable contexts")
> > Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> > index ca7e9216934a..ea9d5063ce78 100644
> > --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> > +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> > @@ -2013,7 +2013,7 @@ static int eb_capture_stage(struct i915_execbuffer *eb)
> >                         continue;
> >  
> >                 if (i915_gem_context_is_recoverable(eb->gem_context) &&
> > -                   (IS_DGFX(eb->i915) || GRAPHICS_VER_FULL(eb->i915) > IP_VER(12, 0)))
> > +                   GRAPHICS_VER_FULL(eb->i915) > IP_VER(12, 10))
> 
> The IS_DGFX check was there because the error capture is expected to be
> broken on anything with VRAM.
> 
> If we have already submitted an userspace fix to remove that flag, that
> would be the right way to go.

Oh! We need to add a comment there, though, because in the
future I expect someone else might decide to send the same patch.

Andi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 1/2] drm/i915/gem: Allow EXEC_CAPTURE on recoverable contexts on DG1
  2025-05-22  6:25   ` Joonas Lahtinen
  2025-05-22  6:35     ` Andi Shyti
@ 2025-05-22  9:35     ` Ville Syrjälä
  2025-05-22 10:58       ` Joonas Lahtinen
  1 sibling, 1 reply; 5+ messages in thread
From: Ville Syrjälä @ 2025-05-22  9:35 UTC (permalink / raw)
  To: Joonas Lahtinen
  Cc: intel-gfx, Tvrtko Ursulin, stable, Matthew Auld,
	Thomas Hellström, Andi Shyti

On Thu, May 22, 2025 at 09:25:04AM +0300, Joonas Lahtinen wrote:
> (+ Tvrkto)
> 
> Quoting Ville Syrjala (2025-04-11 17:43:12)
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > The intel-media-driver is currently broken on DG1 because
> > it uses EXEC_CAPTURE with recovarable contexts. Relax the
> > check to allow that.
> > 
> > I've also submitted a fix for the intel-media-driver:
> > https://github.com/intel/media-driver/pull/1920
> > 
> > Cc: stable@vger.kernel.org
> > Cc: Matthew Auld <matthew.auld@intel.com>
> > Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> > Testcase: igt/gem_exec_capture/capture-invisible
> > Fixes: 71b1669ea9bd ("drm/i915/uapi: tweak error capture on recoverable contexts")
> > Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> > index ca7e9216934a..ea9d5063ce78 100644
> > --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> > +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> > @@ -2013,7 +2013,7 @@ static int eb_capture_stage(struct i915_execbuffer *eb)
> >                         continue;
> >  
> >                 if (i915_gem_context_is_recoverable(eb->gem_context) &&
> > -                   (IS_DGFX(eb->i915) || GRAPHICS_VER_FULL(eb->i915) > IP_VER(12, 0)))
> > +                   GRAPHICS_VER_FULL(eb->i915) > IP_VER(12, 10))
> 
> The IS_DGFX check was there because the error capture is expected to be
> broken on anything with VRAM.

I don't care. It's a regression that prevents current userspace
from working.

> 
> If we have already submitted an userspace fix to remove that flag, that
> would be the right way to go.

There has a been an open pull request for that for who knows how long
without any action.

> 
> So reverting this for now.

*You* make sure a userspace fix actually gets released then.

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 1/2] drm/i915/gem: Allow EXEC_CAPTURE on recoverable contexts on DG1
  2025-05-22  9:35     ` Ville Syrjälä
@ 2025-05-22 10:58       ` Joonas Lahtinen
  0 siblings, 0 replies; 5+ messages in thread
From: Joonas Lahtinen @ 2025-05-22 10:58 UTC (permalink / raw)
  To: Ville Syrjälä
  Cc: intel-gfx, Tvrtko Ursulin, stable, Matthew Auld,
	Thomas Hellström, Andi Shyti

Quoting Ville Syrjälä (2025-05-22 12:35:05)
> On Thu, May 22, 2025 at 09:25:04AM +0300, Joonas Lahtinen wrote:
> > (+ Tvrkto)
> > 
> > Quoting Ville Syrjala (2025-04-11 17:43:12)

<SNIP>

> > > +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> > > @@ -2013,7 +2013,7 @@ static int eb_capture_stage(struct i915_execbuffer *eb)
> > >                         continue;
> > >  
> > >                 if (i915_gem_context_is_recoverable(eb->gem_context) &&
> > > -                   (IS_DGFX(eb->i915) || GRAPHICS_VER_FULL(eb->i915) > IP_VER(12, 0)))
> > > +                   GRAPHICS_VER_FULL(eb->i915) > IP_VER(12, 10))
> > 
> > The IS_DGFX check was there because the error capture is expected to be
> > broken on anything with VRAM.
> 
> I don't care. It's a regression that prevents current userspace
> from working.

(Spoiler: The userspace fix seems to be accepted and released.)

It's always bit murky when a platform stays under force_probe for
extended period of time, but it was never considered to be finalized from
memory management perspective at the time of adding this check.

Now you are just unblocking codepaths that are simply not expected to work,
and as it's in rather fragile part of the device resets so that's bit of
a no-go.

So if you really would prefer to drop this check for DG1, options would be to
implement the page copying for VRAM (probably bit much work) or alternatively
we could just ignore the flag for DG1 specifically.

> > If we have already submitted an userspace fix to remove that flag, that
> > would be the right way to go.
> 
> There has a been an open pull request for that for who knows how long
> without any action.
> 
> > 
> > So reverting this for now.
> 
> *You* make sure a userspace fix actually gets released then.

Per GIT history[1] it should already be part of media-driver release 25.2.3
which was released last week. Or am I looking at the wrong fix?

Regards, Joonas

[1] https://github.com/intel/media-driver/commit/93c07d9b4b96a78bab21f6acd4eb863f4313ea4a

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-05-22 10:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250411144313.11660-1-ville.syrjala@linux.intel.com>
2025-04-11 14:43 ` [PATCH v2 1/2] drm/i915/gem: Allow EXEC_CAPTURE on recoverable contexts on DG1 Ville Syrjala
2025-05-22  6:25   ` Joonas Lahtinen
2025-05-22  6:35     ` Andi Shyti
2025-05-22  9:35     ` Ville Syrjälä
2025-05-22 10:58       ` Joonas Lahtinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox