segfault in libIntelXvMc $ valgrind mplayer -vo xvmc -vc ffmpeg12mc -fs /usr/share/texmf-dist/doc/latex/aastex/video3.mpg output: ... ==25040== Invalid write of size 1 ==25040== at 0x4024E64: memcpy (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==25040== by 0x695282C: intelBatchbufferData (in /usr/lib/libIntelXvMC.so.1.0.0) ==25040== by 0x12: ??? ==25040== Address 0xb7718044 is not stack'd, malloc'd or (recently) free'd ==25040== ==25040== Invalid write of size 1 ==25040== at 0x4024E6C: memcpy (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==25040== by 0x695282C: intelBatchbufferData (in /usr/lib/libIntelXvMC.so.1.0.0) ==25040== by 0x12: ??? ==25040== Address 0xb7718045 is not stack'd, malloc'd or (recently) free'd ==25040== ==25040== Invalid write of size 1 ==25040== at 0x4024E75: memcpy (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==25040== by 0x695282C: intelBatchbufferData (in /usr/lib/libIntelXvMC.so.1.0.0) ==25040== by 0x12: ??? ==25040== Address 0xb7718046 is not stack'd, malloc'd or (recently) free'd ==25040== ==25040== Invalid write of size 1 ==25040== at 0x4024E7E: memcpy (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==25040== by 0x695282C: intelBatchbufferData (in /usr/lib/libIntelXvMC.so.1.0.0) ==25040== by 0x12: ??? ==25040== Address 0xb7718047 is not stack'd, malloc'd or (recently) free'd ==25040== ==25040== Invalid write of size 1 ==25040== at 0x4024E64: memcpy (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==25040== by 0x695282C: intelBatchbufferData (in /usr/lib/libIntelXvMC.so.1.0.0) ==25040== by 0x13: ??? ==25040== Address 0xb7718044 is not stack'd, malloc'd or (recently) free'd ==25040== ==25040== Invalid write of size 1 ==25040== at 0x4024E6C: memcpy (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==25040== by 0x695282C: intelBatchbufferData (in /usr/lib/libIntelXvMC.so.1.0.0) ==25040== by 0x13: ??? ==25040== Address 0xb7718045 is not stack'd, malloc'd or (recently) free'd ==25040== ... Driver: xf86-intel-driver 2.10.0 Mplayer: git-20100107
which chipset (945,965...)?
And could you please provide a backtrace for the segmentation fault?
lspci: 00:02.0 VGA compatible controller: Intel Corporation Mobile 945GME Express Integrated Graphics Controller (rev 03) 00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03) Xorg.0.log: (II) intel(0): Integrated Graphics Chipset: Intel(R) 945GME (--) intel(0): Chipset: "945GME"
(In reply to comment #3) > lspci: > 00:02.0 VGA compatible controller: Intel Corporation Mobile 945GME Express > Integrated Graphics Controller (rev 03) > 00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML > Express Integrated Graphics Controller (rev 03) > Xorg.0.log: > (II) intel(0): Integrated Graphics Chipset: Intel(R) 945GME > (--) intel(0): Chipset: "945GME" OK, I can confirm this issue on 945GME, and bisect shows that it's caused by Daniel Vetter's following commits: commit 229d23fb18d696fb7ad476ce335be14ec9811bd3 commit ce7ba18f577cc9aedddaff303dbc9662a276b4cf commit 1ac7c94083a3266e2d5dd932709118436074dd00 commit 31f13fa8a0d4cd28067de37d0d31d23e8200d0ff And the last 3 commits failed to build and have different issues. So I'm not which of those 4 commit cause this issue.
The same issue on piketon.
Created attachment 32582 [details] [review] patch against xf86-video-intel Quick shot in the dark: Does this help (I don't have the hw, so I can't test).
If my patch doesn't help, can you please narrow down which one of the four commits broke stuff? I've pushed a rebase tree with the intermediate compile breakage fixed to git://gitorious.org/daniel-s-linux-stuff/xf86-video-intel.git bugs/xvmc-crash-on-945 Thanks, Daniel
(In reply to comment #7) > If my patch doesn't help, can you please narrow down which one of the four > commits broke stuff? I've pushed a rebase tree with the intermediate compile > breakage fixed to > > git://gitorious.org/daniel-s-linux-stuff/xf86-video-intel.git > bugs/xvmc-crash-on-945 > > Thanks, Daniel > Seems there's some problem git-clone from your tree. It will complains: warning: remote HEAD refers to nonexistent ref, unable to checkout.
(In reply to comment #8) > (In reply to comment #7) > > If my patch doesn't help, can you please narrow down which one of the four > > commits broke stuff? I've pushed a rebase tree with the intermediate compile > > breakage fixed to > > > > git://gitorious.org/daniel-s-linux-stuff/xf86-video-intel.git > > bugs/xvmc-crash-on-945 > > > > Thanks, Daniel > > > > Seems there's some problem git-clone from your tree. > It will complains: > warning: remote HEAD refers to nonexistent ref, unable to checkout. > Ok, ignore this. I started bisect. And for your information, since it also happened on clarkdale, the patch in comment #6 won't fix them all at least.
OK, I have tried those commits on your branch. Now it's narrow down to two commits: 93a744d40c2f9c5407682c7c441cc1cb8b54120e f637726e547cd3a1d5d9774b716b044f0e8630da commits f637726e547cd3a1d5d9774b716b044f0e8630da will complain a lot about: X11 error: BadAlloc (insufficient resources for operation)
On Tue, Jan 12, 2010 at 12:59:08AM -0800, bugzilla-daemon@freedesktop.org wrote: > --- Comment #10 from Shuang He <shuang.he@intel.com> 2010-01-12 00:59:07 PST --- > OK, I have tried those commits on your branch. > Now it's narrow down to two commits: > 93a744d40c2f9c5407682c7c441cc1cb8b54120e > f637726e547cd3a1d5d9774b716b044f0e8630da > > commits f637726e547cd3a1d5d9774b716b044f0e8630da will complain a lot about: > X11 error: BadAlloc (insufficient resources for operation) This is expected (when you're on a 945). Just a few questions to clarify stuff for me: - Did xvmc on 945 really work beforehand? - What are the other chips that affected by this? I have no clue how intel codenames map to the IS_ macros. -Daniel
(In reply to comment #11) > On Tue, Jan 12, 2010 at 12:59:08AM -0800, bugzilla-daemon@freedesktop.org > wrote: > > --- Comment #10 from Shuang He <shuang.he@intel.com> 2010-01-12 00:59:07 PST --- > > OK, I have tried those commits on your branch. > > Now it's narrow down to two commits: > > 93a744d40c2f9c5407682c7c441cc1cb8b54120e > > f637726e547cd3a1d5d9774b716b044f0e8630da > > > > commits f637726e547cd3a1d5d9774b716b044f0e8630da will complain a lot about: > > X11 error: BadAlloc (insufficient resources for operation) > > This is expected (when you're on a 945). Just a few questions to clarify > stuff for me: > > - Did xvmc on 945 really work beforehand? > - What are the other chips that affected by this? I have no clue how intel > codenames map to the IS_ macros. > > -Daniel > Sure, it used to be working on 945GM before your changes. It is the baseline to do bisection. And to be clear, 945GM is working well with the commit a16a769b0e65afb30cc0cdcba651667b8f7c9251, which is just the commit before f637726e547cd3a1d5d9774b716b044f0e8630da Clarkdale is the latest intel 32nm CPU that integrated GPU, I haven't tried it on other platforms
On Tue, Jan 12, 2010 at 04:55:57AM -0800, bugzilla-daemon@freedesktop.org wrote: > Sure, it used to be working on 945GM before your changes. It is the baseline to > do bisection. > And to be clear, 945GM is working well with the commit > a16a769b0e65afb30cc0cdcba651667b8f7c9251, which is just the commit before > f637726e547cd3a1d5d9774b716b044f0e8630da > Clarkdale is the latest intel 32nm CPU that integrated GPU, I haven't tried it > on other platforms Argh, I think I've found it. i915_video.c does some funky spaghetti-code logic that magically passes around a few things. I've overlooked this when doing the original patch series. Furthermore I've found a small omission that explains why xvmc broke on all supported configs. I hope I have a patch ready later today.
Created attachment 32589 [details] [review] patch against xf86-video-intel This hopefully fixes xvmc for 4th gen chipsets (clarkdale).
Created attachment 32592 [details] [review] new patch against xf86-video-intel Now hopefully also with fixed-up 945 xvmc support. Please test, thx Daniel
Xun, Could you help following up this issue. Thanks
Test with the patch on piketon and 945GM. It works well on piketon(clarkdale). For 945GM, video can be played, but the output is green screen.
> --- Comment #17 from fangxun <xunx.fang@intel.com> 2010-01-12 19:11:47 PST --- > Test with the patch on piketon and 945GM. It works well on piketon(clarkdale). > For 945GM, video can be played, but the output is green screen. Ok, looks like I've the pointer fixup stuff is not quite right, yet. I'll stare at the code some more ...
> --- Comment #18 from Daniel Vetter <daniel@ffwll.ch> 2010-01-13 00:11:54 PST --- > Ok, looks like I've the pointer fixup stuff is not quite right, yet. I'll > stare at the code some more ... Ok, I've got a new idea as to where I've screwed up. Can you tell me what the source dimension is of the video you're using to test this? Can you also test with HD-content (more specific: 2048 > width > 1024 pixels)? Thanks, Daniel
Created attachment 32650 [details] xvmc error info on 945GM The video we're using to test is 720x576. Tested with HD-content video(1920 x 1080), the video can not be played. Pls see attached file.
Created attachment 32654 [details] [review] patch against xf86-video-intel Please apply this on top of the other patch. This hopefully fixes the xvmc breakage on 945.
Still fails with the patch. For 720x576 video, it can be played, but the output is green screen. For HD-content video(1920 x 1080), it can not be played.
Work now for me with new linux kernel 2.6.33-rc7 xf86-video-intel: 2.10.0 MPlayer SVN-r30519-4.4.3
Shuang He is OOO during 2-8 and 2-19.
I've submitted new patches for inclusion that should also fix xvmc on i945. Please reopen if they do not work as advertised. Thanks, Daniel
Daniel, thanks for the patch. But let's keep this bug open until the patches committed. This will also remind us to include it in 2.11 release (P1 major bugs appear on our release blocker list)
Patched arrived in the master branch. Please test and reopen in case it doesn't work as advertised.
Created attachment 33848 [details] wrong color while playing video With this patch, video(720x576) can be played on 945GM. But the video's output color is wrong.
> --- Comment #28 from fangxun <xunx.fang@intel.com> 2010-03-07 21:36:34 PST --- > Created an attachment (id=33848) > --> (http://bugs.freedesktop.org/attachment.cgi?id=33848) > wrong color while playing video > > With this patch, video(720x576) can be played on 945GM. But the video's output > color is wrong. Gosh, I think we can safely assume that I'm colorblind ... ;) I've mixed up the UV plane ordering somewhere, which caused these funny colors. I'll send a patch asap.
It works well now. Verified.
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.