Bug 22672 - Change VBE version limitation from 2.0 to 1.2 to allow to perform EDID query by means of VBE/DDC
Summary: Change VBE version limitation from 2.0 to 1.2 to allow to perform EDID query ...
Status: RESOLVED WONTFIX
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/DDX/Xorg (show other bugs)
Version: git
Hardware: All All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2009-07-08 06:01 UTC by Evgeny Zubok
Modified: 2012-12-19 22:16 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Evgeny Zubok 2009-07-08 06:01:10 UTC
I have S3 Trio64V2 with VESA 1.2. While trying to implement DDC
support for the S3 driver I discovered that there is VESA version
checking before queriyng the EDID -- if VESA version is less than 2.0
the function returns NULL and didn't perform EDID query.

    if (pVbe->version < 0x200)
	return NULL;

However my S3 Trio64V2 with VESA Video BIOS 1.2 has DDC extention! I
have verified this with get-edid program. What the reason of this
limitation on the VESA version?

As I understand from VBE/DDC specification [1], the DDC supplements
VESA Video BIOS and isn't included into both VESA 1.2 [2] or VESA 2.0
[3]. VESA 1.2 specification defines subfunctions from 00h to 07h, and
subfunctions 08h-FFh are declared as reserved [2]. VESA 2.0 defines
subfunctions 00h-0Fh, and 10-FFh are reserved for VBE Supplemental
Specifications [3]. DDC's subfunction number is 15h.

The presence of DDC can be verified by calling function 4F15h of
int10h and examining the contents of AX register. If AL != 4FH or AH
!= 0 after calling, then DDC isn't supported. This procedure is
described in Section 6, 6.1 of [2] and 4, 4.1 of [3] and, therefore,
actual for both VESA 2.0 and VESA 1.2. The function vbeProbeDDC
(hw/xfree86/vbe/vbe.c) already doing this checking of DDC presence (it
is called from vbeReadEDID which is called from vbeDoEDID).

So, the VBE version in vbeDoEDID can be lowered to 1.2 as the
procedure of verifying the presence of subfunction (15h in the case of
DDC) is defined in VESA 1.2 and VESA 2.0 specs and is implemented in
vbe.c.

The attached patch lowers VBE version from 2.0 to 1.2. I tested this
patch with my working copy of S3 driver and successfully retrieved
EDID from my monitor and got the required modes.

[1] DDC - http://www.vesa.org/public/VBE/VBEDDC11.PDF
[2] VESA 1.2 - http://docs.ruudkoot.nl/vesasp12.txt 
[3] VESA 2.0 - http://docs.ruudkoot.nl/vbe20.txt



diff --git a/hw/xfree86/vbe/vbe.c b/hw/xfree86/vbe/vbe.c
index 4986b5b..0f03a07 100644
--- a/hw/xfree86/vbe/vbe.c
+++ b/hw/xfree86/vbe/vbe.c
@@ -314,7 +314,7 @@ vbeDoEDID(vbeInfoPtr pVbe, pointer pDDCModule)
     unsigned char *DDC_data = NULL;
     
     if (!pVbe) return NULL;
-    if (pVbe->version < 0x200)
+    if (pVbe->version < 0x102)
        return NULL;
 
     if (!(pModule = pDDCModule)) {
Comment 1 Evgeny Zubok 2010-02-20 13:35:29 UTC
Can anybody apply this patch or tell me what is wrong with it? Only don't leave it without feedback.
Comment 2 Alan Coopersmith 2010-02-20 13:39:23 UTC
Patches tend to be more quickly reviewed (though no promises, since we have
far more work than available developers/time) if submitted to the xorg-devel
mailing list as described on:
http://www.x.org/wiki/Development/Documentation/SubmittingPatches
and the "Development Process" section of http://www.x.org/wiki/XServer
Comment 3 Evgeny Zubok 2010-02-20 15:06:30 UTC
(In reply to comment #2)
> Patches tend to be more quickly reviewed (though no promises, since we have
> far more work than available developers/time) if submitted to the xorg-devel
> mailing list as described on:
> http://www.x.org/wiki/Development/Documentation/SubmittingPatches
> and the "Development Process" section of http://www.x.org/wiki/XServer

The patch had been sent to the mailing list before this bug report was opened:
http://www.mail-archive.com/xorg@lists.freedesktop.org/msg07090.html, and after some waiting I decided to dublicate it here. Anyway, thank you for the explanation.




Comment 4 Evgeny Zubok 2012-12-19 22:16:21 UTC
I tried in this thread:
http://lists.x.org/archives/xorg/2009-May/045495.html

later here:
http://lists.x.org/archives/xorg-devel/2012-September/033568.html

and in the present bugreport. There is no feedback.

I close this bugreport with status WONTFIX.


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.