Bug 44864 - vaPutSurface with VA_TOP_FIELD completely crashes SandyBridge
Summary: vaPutSurface with VA_TOP_FIELD completely crashes SandyBridge
Status: RESOLVED FIXED
Alias: None
Product: libva
Classification: Unclassified
Component: intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium critical
Assignee: haihao
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-17 07:58 UTC by Josep Torra
Modified: 2015-07-20 07:24 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch to reproduce the issue (780 bytes, patch)
2012-01-17 07:58 UTC, Josep Torra
Details | Splinter Review

Description Josep Torra 2012-01-17 07:58:49 UTC
Created attachment 55679 [details] [review]
Patch to reproduce the issue

Running Ubuntu 12.04 + libva(master) + i965(master) when vaPutSurface is called with VA_TOP_FIELD the machine suffer a crash and a hard reset is the only way.

The issue is reproducible with mpeg2vldemo test in libva when the attached patch is applied.

The issue seems to be related to bug #44554 as I've already seen the same kind of dmesg output.

drm:i915_hangcheck_elapsed] *ERROR* Hangcheck timer elapsed...
GPU hung
Comment 1 haihao 2012-02-01 22:37:18 UTC
Could you try with libva (vaapi-ext) + i965(vaapi-ext) ?
Comment 2 sreerenj 2012-02-02 00:01:11 UTC
Me too have the same problem with field encoded content (master branch). vaapi-ext branch won't crash with TOP and BOT filed alteration in vaPutSurface. But if the use case is to just display the field pictures , then you can render both TOP and BOT field to same surface I think.
Comment 3 Josep Torra 2012-02-02 00:38:55 UTC
(In reply to comment #1)
> Could you try with libva (vaapi-ext) + i965(vaapi-ext) ?

I'll give a try to -ext branches next week when I'll have access to the box again.

But I'm worried on what is shipped in the distros as they relay on the releases instead of the branches and if the issue is not solved we will have to deactivate the support for mpeg2 in the next release of our elements on the i965 hardware.
Comment 4 Josep Torra 2012-02-02 00:42:41 UTC
(In reply to comment #2)
> Me too have the same problem with field encoded content (master branch).
> vaapi-ext branch won't crash with TOP and BOT filed alteration in vaPutSurface.
> But if the use case is to just display the field pictures , then you can render
> both TOP and BOT field to same surface I think.

We have implemented BOB deinterlacing by rendering on the drawable the scaled fields instead of the single surface with both fields.

That's the reason we use the TOP/BOTTOM field flags in vaPutSurface.
Comment 5 Josep Torra 2012-02-06 04:49:17 UTC
I've tried with today's master (libva & i965) and the behaviour seems to be racy but it crashes the box sooner or later. I ve got a long freeze and suddenly it started to render some frames frames. Then followed another freeze and some more frames had been rendered. I've experienced this behavior in a single attempt and for an unknown reasons the following attempts just crashed the box. 

As I've already had an ssh connection on the box I've been able to capture the following messages in dmesg during the freezes.

[  244.814039] [drm:i915_hangcheck_elapsed] *ERROR* Hangcheck timer elapsed... GPU hung
[  244.814051] [drm] capturing error event; look for more information in /debug/dri/0/i915_error_state
[  244.823503] [drm:i915_wait_request] *ERROR* i915_wait_request returns -11 (awaiting 4076 at 4071, next 4077)
[  251.523245] [drm:i915_hangcheck_elapsed] *ERROR* Hangcheck timer elapsed... GPU hung
[  251.523312] [drm:i915_wait_request] *ERROR* i915_wait_request returns -11 (awaiting 4167 at 4127, next 4168)

I've couldn't find '/debug/dri/0/i915_error_state', let me know how to recover this info if you need it.
Comment 6 Josep Torra 2012-02-06 04:52:13 UTC
(In reply to comment #1)
> Could you try with libva (vaapi-ext) + i965(vaapi-ext) ?

I've updated as per today -ext branches with a better result. It seems that it doesn't crash the box.

To build it I had to apply the following change in libva.

diff --git a/configure.ac b/configure.ac
index 8917b6a..6af9659 100644
--- a/configure.ac
+++ b/configure.ac
@@ -242,6 +242,7 @@ AC_OUTPUT([
     test/encode/Makefile
     test/putsurface/Makefile
     test/vainfo/Makefile
+    test/transcode/Makefile
     va/Makefile
     va/dummy/Makefile
     va/egl/Makefile
Comment 7 Gwenole Beauchesne 2012-03-13 03:50:52 UTC
Hi, the following patch will be pushed to master. Please give it a try. Thanks.
http://lists.freedesktop.org/archives/libva/2012-March/000795.html

This correctly implements the API, i.e. display only either field of a surface.
Comment 8 Gwenole Beauchesne 2012-03-18 07:03:28 UTC
The fix is now available in master and v1.0-branch branches.
Comment 9 ykzhao 2013-11-29 02:37:25 UTC
Will you please try the latest intel-vaapi driver and see whether the issue still exists?
Comment 10 Gordon Jin 2015-07-20 07:24:02 UTC
No response for 1.5 years. I guess we can close this.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.