Bug 675532
Summary: | X11 crashes if Xv is not enabled/supported and v4l driver is loaded (noticed with Intel driver) [@ xf86XVQueryOffscreenImages] | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Mauro Carvalho Chehab <mchehab> | ||||||
Component: | xorg-x11-drv-v4l | Assignee: | Adam Jackson <ajax> | ||||||
Status: | CLOSED EOL | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | 19 | CC: | lwang, xgl-maint | ||||||
Target Milestone: | --- | Keywords: | Patch, Triaged | ||||||
Target Release: | --- | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | [cat:crash] | ||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2015-02-17 13:37:16 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Mauro Carvalho Chehab
2011-02-06 11:21:01 UTC
Created attachment 477289 [details]
Don't let the Xorg server crash if XV is not initialized
This patch adds a check to avoid the crashes if XV is not initialized.
After the patch X11 server loads properly:
[ 21670.571] (==) intel(0): Intel XvMC decoder disabled
[ 21671.225] (II) v4l: /dev/video0 open ok
[ 21671.225] (II) v4l: /dev/video0 device supports overlay mode.
[ 21671.225] (II) VIDIOCSPICT / VIDIOC_S_FMT: 22
[ 21671.225] (II) VIDIOCSPICT / VIDIOC_S_FBUF: 22
[ 21671.225] (II) VIDIOCSPICT / VIDIOC_S_FMT: 22
[ 21671.225] (II) VIDIOCSPICT / VIDIOC_S_FBUF: 22
[ 21671.225] (II) v4l: add attr XV_ENCODING
[ 21671.225] (II) v4l: add attr XV_BRIGHTNESS
[ 21671.225] (II) v4l: add attr XV_CONTRAST
[ 21671.225] (II) v4l: add attr XV_SATURATION
[ 21671.225] (II) v4l: add attr XV_HUE
[ 21671.225] (II) VIDIOCGAUDIO / VIDIOC_G_AUDIO: 9
[ 21671.225] (II) v4l: add attr XV_FREQ
[ 21671.225] (II) v4l: saving config into driver data
[ 21671.225] (II) v4l: /dev/video0 init finished.
[ 21671.257] (II) v4l: init done, 1 device(s) found
The above messages are with the debug messages enabled. The last message indicates that v4l driver loaded properly.
I added a small patch at the Intel driver, as it should be supporting Xv: diff -r 9a863fcd4479 src/intel_video.c --- a/src/intel_video.c Sun Feb 06 15:38:05 2011 -0500 +++ b/src/intel_video.c Sun Feb 06 15:39:08 2011 -0500 @@ -398,6 +398,8 @@ adaptors[num_adaptors++] = overlayAdaptor; if (num_adaptors) { + xf86DrvMsg(scrn->scrnIndex, X_WARNING, + "Xv enabled with %d adaptors.\n", num_adaptors); xf86XVScreenInit(screen, adaptors, num_adaptors); } else { xf86DrvMsg(scrn->scrnIndex, X_WARNING, And a log at v4l driver to show when it detects that Xv is not supported. The result logs are: [ 27315.881] (EE) v4l: video screen doesn't have Xv extension. [ 27315.881] (WW) intel(0): Xv enabled with 2 adaptors. What's happening here is that the v4l driver was loaded just before the Intel register for Xv. Due to that, it was failing. Some change is needed to make sure that v4l driver will be loaded only after having all adapters registered. Created attachment 477367 [details]
Don't let the Xorg server crash if XV is not initialized v2
Version 2: return NULL instead of 0 and sets num = 0
(In reply to comment #2) > I added a small patch at the Intel driver, as it should be supporting Xv: > > diff -r 9a863fcd4479 src/intel_video.c > --- a/src/intel_video.c Sun Feb 06 15:38:05 2011 -0500 > +++ b/src/intel_video.c Sun Feb 06 15:39:08 2011 -0500 > @@ -398,6 +398,8 @@ > adaptors[num_adaptors++] = overlayAdaptor; > > if (num_adaptors) { > + xf86DrvMsg(scrn->scrnIndex, X_WARNING, > + "Xv enabled with %d adaptors.\n", num_adaptors); > xf86XVScreenInit(screen, adaptors, num_adaptors); > } else { > xf86DrvMsg(scrn->scrnIndex, X_WARNING, > > And a log at v4l driver to show when it detects that Xv is not supported. The > result logs are: > > [ 27315.881] (EE) v4l: video screen doesn't have Xv extension. > [ 27315.881] (WW) intel(0): Xv enabled with 2 adaptors. > > What's happening here is that the v4l driver was loaded just before the Intel > register for Xv. Due to that, it was failing. > > Some change is needed to make sure that v4l driver will be loaded only after > having all adapters registered. I've patched the driver to only talk with Xv during device open and this didn't solve at all. What happens is that the Intel driver registers only textured video. I tested with nouveau driver and got similar results. So, the issue is not related to the initialization order. Yet, the fix at attachment 477367 [details] is needed, otherwise trying to load v4l driver will cause a crash during X start, if a video board with overlay support is connected and its driver is loaded. This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle. Changing version to '19'. (As we did not run this process for some time, it could affect also pre-Fedora 19 development cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.) More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19 This message is a notice that Fedora 19 is now at end of life. Fedora has stopped maintaining and issuing updates for Fedora 19. It is Fedora's policy to close all bug reports from releases that are no longer maintained. Approximately 4 (four) weeks from now this bug will be closed as EOL if it remains open with a Fedora 'version' of '19'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 19 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed. |