Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] qsv: Update ffmpeg qsv_errors to recognize GPU hang
@ 2022-07-22 18:06 Dmitry Rogozhkin
  2022-07-25  1:21 ` Xiang, Haihao
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Rogozhkin @ 2022-07-22 18:06 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Hon Wai Chow, Dmitry Rogozhkin

GPU hang is one of the most typical errors on Intel GPUs in
case something goes wrong. It's important to recognize it
explicitly for easier bugs triage. Also, this error code
can be used to trigger GPU recovery path in self-written
applications.

Signed-off-by: Hon Wai Chow <hon.wai.chow@intel.com>
Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
---
 libavcodec/qsv.c     | 1 +
 libavfilter/qsvvpp.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c
index 385b43b..55bcb6e 100644
--- a/libavcodec/qsv.c
+++ b/libavcodec/qsv.c
@@ -125,6 +125,7 @@ static const struct {
     { MFX_ERR_INVALID_VIDEO_PARAM,      AVERROR(EINVAL), "invalid video parameters"             },
     { MFX_ERR_UNDEFINED_BEHAVIOR,       AVERROR_BUG,     "undefined behavior"                   },
     { MFX_ERR_DEVICE_FAILED,            AVERROR(EIO),    "device failed"                        },
+    { MFX_ERR_GPU_HANG,                 AVERROR(EIO),    "GPU Hang"                             },
     { MFX_ERR_INCOMPATIBLE_AUDIO_PARAM, AVERROR(EINVAL), "incompatible audio parameters"        },
     { MFX_ERR_INVALID_AUDIO_PARAM,      AVERROR(EINVAL), "invalid audio parameters"             },
 
diff --git a/libavfilter/qsvvpp.c b/libavfilter/qsvvpp.c
index 954f882..7504906 100644
--- a/libavfilter/qsvvpp.c
+++ b/libavfilter/qsvvpp.c
@@ -100,6 +100,7 @@ static const struct {
     { MFX_ERR_INVALID_VIDEO_PARAM,      AVERROR(EINVAL), "invalid video parameters"             },
     { MFX_ERR_UNDEFINED_BEHAVIOR,       AVERROR_BUG,     "undefined behavior"                   },
     { MFX_ERR_DEVICE_FAILED,            AVERROR(EIO),    "device failed"                        },
+    { MFX_ERR_GPU_HANG,                 AVERROR(EIO),    "GPU Hang"                             },
     { MFX_ERR_INCOMPATIBLE_AUDIO_PARAM, AVERROR(EINVAL), "incompatible audio parameters"        },
     { MFX_ERR_INVALID_AUDIO_PARAM,      AVERROR(EINVAL), "invalid audio parameters"             },
 
-- 
1.8.3.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

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

* Re: [FFmpeg-devel] [PATCH] qsv: Update ffmpeg qsv_errors to recognize GPU hang
  2022-07-22 18:06 [FFmpeg-devel] [PATCH] qsv: Update ffmpeg qsv_errors to recognize GPU hang Dmitry Rogozhkin
@ 2022-07-25  1:21 ` Xiang, Haihao
  2022-07-25 15:25   ` Rogozhkin, Dmitry V
  0 siblings, 1 reply; 3+ messages in thread
From: Xiang, Haihao @ 2022-07-25  1:21 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Chow, Hon Wai, Rogozhkin, Dmitry V

On Fri, 2022-07-22 at 11:06 -0700, Dmitry Rogozhkin wrote:
> GPU hang is one of the most typical errors on Intel GPUs in
> case something goes wrong. It's important to recognize it
> explicitly for easier bugs triage. Also, this error code
> can be used to trigger GPU recovery path in self-written
> applications.
> 
> Signed-off-by: Hon Wai Chow <hon.wai.chow@intel.com>
> Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
> ---
>  libavcodec/qsv.c     | 1 +
>  libavfilter/qsvvpp.c | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c
> index 385b43b..55bcb6e 100644
> --- a/libavcodec/qsv.c
> +++ b/libavcodec/qsv.c
> @@ -125,6 +125,7 @@ static const struct {
>      { MFX_ERR_INVALID_VIDEO_PARAM,      AVERROR(EINVAL), "invalid video
> parameters"             },
>      { MFX_ERR_UNDEFINED_BEHAVIOR,       AVERROR_BUG,     "undefined
> behavior"                   },
>      { MFX_ERR_DEVICE_FAILED,            AVERROR(EIO),    "device
> failed"                        },
> +    { MFX_ERR_GPU_HANG,                 AVERROR(EIO),    "GPU
> Hang"                             },
>      { MFX_ERR_INCOMPATIBLE_AUDIO_PARAM, AVERROR(EINVAL), "incompatible audio
> parameters"        },
>      { MFX_ERR_INVALID_AUDIO_PARAM,      AVERROR(EINVAL), "invalid audio
> parameters"             },
>  
> diff --git a/libavfilter/qsvvpp.c b/libavfilter/qsvvpp.c
> index 954f882..7504906 100644
> --- a/libavfilter/qsvvpp.c
> +++ b/libavfilter/qsvvpp.c
> @@ -100,6 +100,7 @@ static const struct {
>      { MFX_ERR_INVALID_VIDEO_PARAM,      AVERROR(EINVAL), "invalid video
> parameters"             },
>      { MFX_ERR_UNDEFINED_BEHAVIOR,       AVERROR_BUG,     "undefined
> behavior"                   },
>      { MFX_ERR_DEVICE_FAILED,            AVERROR(EIO),    "device
> failed"                        },
> +    { MFX_ERR_GPU_HANG,                 AVERROR(EIO),    "GPU
> Hang"                             },
>      { MFX_ERR_INCOMPATIBLE_AUDIO_PARAM, AVERROR(EINVAL), "incompatible audio
> parameters"        },
>      { MFX_ERR_INVALID_AUDIO_PARAM,      AVERROR(EINVAL), "invalid audio
> parameters"             },
>  

Could you add other missing qsv video errors or warnings too ?

Thanks
Haihao


_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

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

* Re: [FFmpeg-devel] [PATCH] qsv: Update ffmpeg qsv_errors to recognize GPU hang
  2022-07-25  1:21 ` Xiang, Haihao
@ 2022-07-25 15:25   ` Rogozhkin, Dmitry V
  0 siblings, 0 replies; 3+ messages in thread
From: Rogozhkin, Dmitry V @ 2022-07-25 15:25 UTC (permalink / raw)
  To: ffmpeg-devel, Xiang, Haihao; +Cc: Chow, Hon Wai

On Mon, 2022-07-25 at 01:21 +0000, Xiang, Haihao wrote:
> On Fri, 2022-07-22 at 11:06 -0700, Dmitry Rogozhkin wrote:
> > GPU hang is one of the most typical errors on Intel GPUs in
> > case something goes wrong. It's important to recognize it
> > explicitly for easier bugs triage. Also, this error code
> > can be used to trigger GPU recovery path in self-written
> > applications.
> > 
> > Signed-off-by: Hon Wai Chow <hon.wai.chow@intel.com>
> > Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
> > ---
> >  libavcodec/qsv.c     | 1 +
> >  libavfilter/qsvvpp.c | 1 +
> >  2 files changed, 2 insertions(+)
> > 
> > diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c
> > index 385b43b..55bcb6e 100644
> > --- a/libavcodec/qsv.c
> > +++ b/libavcodec/qsv.c
> > @@ -125,6 +125,7 @@ static const struct {
> >      { MFX_ERR_INVALID_VIDEO_PARAM,      AVERROR(EINVAL), "invalid
> > video
> > parameters"             },
> >      {
> > MFX_ERR_UNDEFINED_BEHAVIOR,       AVERROR_BUG,     "undefined
> > behavior"                   },
> >      { MFX_ERR_DEVICE_FAILED,            AVERROR(EIO),    "device
> > failed"                        },
> > +    { MFX_ERR_GPU_HANG,                 AVERROR(EIO),    "GPU
> > Hang"                             },
> >      { MFX_ERR_INCOMPATIBLE_AUDIO_PARAM, AVERROR(EINVAL),
> > "incompatible audio
> > parameters"        },
> >      { MFX_ERR_INVALID_AUDIO_PARAM,      AVERROR(EINVAL), "invalid
> > audio
> > parameters"             },
> >  
> > diff --git a/libavfilter/qsvvpp.c b/libavfilter/qsvvpp.c
> > index 954f882..7504906 100644
> > --- a/libavfilter/qsvvpp.c
> > +++ b/libavfilter/qsvvpp.c
> > @@ -100,6 +100,7 @@ static const struct {
> >      { MFX_ERR_INVALID_VIDEO_PARAM,      AVERROR(EINVAL), "invalid
> > video
> > parameters"             },
> >      {
> > MFX_ERR_UNDEFINED_BEHAVIOR,       AVERROR_BUG,     "undefined
> > behavior"                   },
> >      { MFX_ERR_DEVICE_FAILED,            AVERROR(EIO),    "device
> > failed"                        },
> > +    { MFX_ERR_GPU_HANG,                 AVERROR(EIO),    "GPU
> > Hang"                             },
> >      { MFX_ERR_INCOMPATIBLE_AUDIO_PARAM, AVERROR(EINVAL),
> > "incompatible audio
> > parameters"        },
> >      { MFX_ERR_INVALID_AUDIO_PARAM,      AVERROR(EINVAL), "invalid
> > audio
> > parameters"             },
> >  
> 
> Could you add other missing qsv video errors or warnings too ?
Yes, sure. For what I see we are missing 3 statuses returnable by
mediasdk library implementations: MFX_ERR_GPU_HANG,
MFX_ERR_NONE_PARTIAL_OUTPUT, MFX_ERR_REALLOC_SURFACE. Other statuses
defined in mfxdefs.h are not returnable to ffmpeg level (they are
internal or plugin specific stuff).
I will resubmit the patch under other name with added stuff.
> 
> Thanks
> Haihao
> 
> 
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

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

end of thread, other threads:[~2022-07-25 15:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-22 18:06 [FFmpeg-devel] [PATCH] qsv: Update ffmpeg qsv_errors to recognize GPU hang Dmitry Rogozhkin
2022-07-25  1:21 ` Xiang, Haihao
2022-07-25 15:25   ` Rogozhkin, Dmitry V

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git