Bug 1117 - cw and cfb don't play nice together
Summary: cw and cfb don't play nice together
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
Keywords: cleanup0407
Depends on:
Blocks: 1245
  Show dependency treegraph
Reported: 2004-08-17 23:37 UTC by Adam Jackson
Modified: 2007-04-08 13:43 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

backtrace from the crash (2.00 KB, text/plain)
2004-08-17 23:41 UTC, Adam Jackson
no flags Details
composite-requires-render-1.patch (611 bytes, patch)
2005-10-17 15:10 UTC, Adam Jackson
no flags Details | Splinter Review

Description Adam Jackson 2004-08-17 23:37:55 UTC
Attempting to use Composite using an s3virge in cfb mode makes the server
segfault.  It works fine in fb mode, which is the default.

This will affect:
- all sunffb and sunleo users
- s3virge users who say Option "UseFB" "no" in xorg.conf
- i740, nsc, s3, siliconmotion, and via users who explicitly built their drivers
to use cfb instead of fb
- people building Xsun from our tree (assuming Xsun even builds anymore, and
that it builds with the composite wrapper)

Since except for sunffb and sunleo cfb is not the default, I'm tempted to say
the right fix is to migrate those two to fb and remove cfb altogether.  Note
though that the overlay framebuffer cores (xf8_16bpp etc) use cfb too, and I
don't know how hard it would be to switch them to fb.

At any rate this should either be fixed or documented for the release.
Comment 1 Adam Jackson 2004-08-17 23:41:25 UTC
Created attachment 665 [details]
backtrace from the crash

from an optimized build, so the function arguments for the innermost frame are
a little funky.  nonetheless the segfault does happen on the indicated line,
because 'ps' is completely bogus.  PictureScreenPrivateIndex is -1 at this
point, and we call GetPictureScreen() about five lines earlier, so we're
indexing off the head of the array.  boom.
Comment 2 Adam Jackson 2004-08-18 19:26:52 UTC
cfb has no Render support whatsoever.  Composite requires Render but doesn't
check for its presence first.  the latter part we should fix, but Render on cfb
is not worthwhile.

knocking this down from critical since the general opinion is that cfb isn't
worth spending energy on anymore.
Comment 3 Adam Jackson 2005-10-17 15:10:59 UTC
Created attachment 3572 [details] [review]

refuse to initialize Composite on a given screen if Render hasn't been set up
yet.  haven't run-tested this at all yet, but it should work; since Composite
has to wrap Render and not the other way around, Render should always have
inited when this gets called.
Comment 4 Daniel Stone 2007-02-27 01:23:53 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 5 Daniel Stone 2007-04-07 14:32:48 UTC
ajax, is this worth committing?
Comment 6 Adam Jackson 2007-04-08 13:43:08 UTC
This is fixed in head now, thanks Eric.

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.