Bug 26878 - vesa driver interacts badly with KMS
Summary: vesa driver interacts badly with KMS
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/Vesa (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
: 28896 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-03-03 21:57 UTC by Christopher James Halse Rogers
Modified: 2012-09-01 18:34 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Xorg log (43.01 KB, text/plain)
2010-03-03 21:57 UTC, Christopher James Halse Rogers
no flags Details
Fail to bind to pci devices being managed by a drmfb (3.53 KB, patch)
2010-03-24 01:24 UTC, Christopher James Halse Rogers
no flags Details | Splinter Review
New patch, with shouty configure warning (3.82 KB, patch)
2010-03-26 16:01 UTC, Christopher James Halse Rogers
no flags Details | Splinter Review
KMS detection - part 2 (1.99 KB, patch)
2010-05-23 12:47 UTC, Marcin Slusarz
no flags Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher James Halse Rogers 2010-03-03 21:57:36 UTC
Created attachment 33749 [details]
Xorg log

When using nouveau's kernel module providing KMS, the vesa driver fails to properly set the mode on my laptop's LVDS display, resulting in the display "blooming".

Since it should be quite easy to detect the presence of KMS, perhaps the vesa driver could fail to load when it detects a KMS framebuffer?

Xorg.0.log of the session with blooming LVDS attached.
Comment 1 Michal Suchanek 2010-03-12 06:20:01 UTC
This also happens on a PC with ION chipset and external screen.

What's worse, vesa driver restores the card to text mode on exit which does not work with the KMS drmfb.
Comment 2 Christopher James Halse Rogers 2010-03-24 01:24:02 UTC
Created attachment 34393 [details] [review]
Fail to bind to pci devices being managed by a drmfb

Here's a patch to fix this.  When LIBPCIACCESS is defined, configure additionally checks for a new-enough libdrm (and xf86driproto - needed for DRICreatePCIBusId), and if so will add a check for kernel modesetting in the PCI probe function.
Comment 3 Michel Dänzer 2010-03-24 05:07:12 UTC
Ideally, such checks shouldn't have any build time dependencies - building a driver without the prerequisites for KMS support doesn't make it work any better with KMS. :)
Comment 4 Christopher James Halse Rogers 2010-03-24 16:26:38 UTC
I could certainly duplicate the libdrm code for drmCheckModesettingSupported to make the kms check unconditionally built.

Are there a lot of cases where someone will build vesa on a system without support for kms and deploy it on a system with support for kms, though?

And I don't think vesa wants to have a hard build-time dependency on a new-enough libdrm does it?
Comment 5 Michal Suchanek 2010-03-25 12:15:07 UTC
I would say that the typical case would be old vesa driver which does not have this patch in any form.

Otherwise people rebuilding X should have new enough setup.

Perhaps a fat warning in configure output is in order but that's it.

Comment 6 Christopher James Halse Rogers 2010-03-26 16:01:35 UTC
Created attachment 34500 [details] [review]
New patch, with shouty configure warning

Here's a revision of the previous patch, but with a shouty configure warning when the dependencies for kms detection are not available.

It still won't do kms detection if the X server isn't built with libpciaccess, and it won't complain either; is this a configuration I should be caring about?
Comment 7 Michal Suchanek 2010-03-27 06:04:41 UTC
Is such configuration even used?

You do need libpciaccess for most drivers to work, right?

Still if people build kdrive or what was the name of the simplistic single-driver X servers then perhaps it makes sense. Are these around still?

I would say adding a warning for a possible issue that can be easily detected in code is better than receiving loads of bug reports but I am not a X developer or anything so take my suggestions with a grain of salt.
Comment 8 Marcin Slusarz 2010-05-23 12:47:48 UTC
Created attachment 35807 [details] [review]
KMS detection - part 2

Patch which drops dri dependency when detecting KMS
Comment 9 Julien Cristau 2010-07-03 04:38:02 UTC
*** Bug 28896 has been marked as a duplicate of this bug. ***
Comment 10 Michal Suchanek 2012-08-31 13:17:11 UTC
Was this fixed already?

There is a multitude of patches but bug is still marked as new.


bug/show.html.tmpl processed on Mar 29, 2017 at 11:02:07.
(provided by the Example extension).