summaryrefslogtreecommitdiff
path: root/hw/xfree86/ddc
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2007-12-28 16:28:44 -0500
committerAdam Jackson <ajax@redhat.com>2007-12-28 16:53:17 -0500
commit322d0103aee317500057c80d542d7270d69a5731 (patch)
treeb7bd08c93f11458e43e4225ed7c80213c8689e17 /hw/xfree86/ddc
parentf1f43caf7e26a84dbacd4e5d7d47c8b4e4982836 (diff)
EDID 1.4: Alternate color encodings for digital inputs.
Section 3.6.4, Table 3.14: Feature support.
Diffstat (limited to 'hw/xfree86/ddc')
-rw-r--r--hw/xfree86/ddc/edid.h6
-rw-r--r--hw/xfree86/ddc/print_edid.c35
2 files changed, 27 insertions, 14 deletions
diff --git a/hw/xfree86/ddc/edid.h b/hw/xfree86/ddc/edid.h
index 198794eaa..2496e19e6 100644
--- a/hw/xfree86/ddc/edid.h
+++ b/hw/xfree86/ddc/edid.h
@@ -326,11 +326,15 @@
#define DPMS_SUSPEND(x) (x & 0x02)
#define DPMS_OFF(x) (x & 0x01)
-/* display type */
+/* display type, analog */
#define DISP_MONO 0
#define DISP_RGB 1
#define DISP_MULTCOLOR 2
+/* display color encodings, digital */
+#define DISP_YCRCB444 0x01
+#define DISP_YCRCB422 0x02
+
/* Msc stuff EDID Ver > 1.1 */
#define STD_COLOR_SPACE(x) (x & 0x4)
#define PREFERRED_TIMING_MODE(x) (x & 0x2)
diff --git a/hw/xfree86/ddc/print_edid.c b/hw/xfree86/ddc/print_edid.c
index 880ca073c..30cd17588 100644
--- a/hw/xfree86/ddc/print_edid.c
+++ b/hw/xfree86/ddc/print_edid.c
@@ -128,20 +128,29 @@ print_dpms_features(int scrnIndex, struct disp_features *c,
if (DPMS_OFF(c->dpms)) xf86ErrorF(" Off");
} else
xf86DrvMsg(scrnIndex,X_INFO,"No DPMS capabilities specified");
- switch (c->display_type){
- case DISP_MONO:
- xf86ErrorF("; Monochorome/GrayScale Display\n");
- break;
- case DISP_RGB:
- xf86ErrorF("; RGB/Color Display\n");
- break;
- case DISP_MULTCOLOR:
- xf86ErrorF("; Non RGB Multicolor Display\n");
- break;
- default:
- xf86ErrorF("\n");
- break;
+ if (!c->input_type) { /* analog */
+ switch (c->display_type){
+ case DISP_MONO:
+ xf86ErrorF("; Monochorome/GrayScale Display\n");
+ break;
+ case DISP_RGB:
+ xf86ErrorF("; RGB/Color Display\n");
+ break;
+ case DISP_MULTCOLOR:
+ xf86ErrorF("; Non RGB Multicolor Display\n");
+ break;
+ default:
+ xf86ErrorF("\n");
+ break;
+ }
+ } else {
+ int enc = c->display_type;
+ xf86DrvMsg(scrnIndex, X_INFO, "\nSupported color encodings: "
+ "RGB 4:4:4 %s%s\n",
+ enc & DISP_YCRCB444 ? "YCrCb 4:4:4 " : "",
+ enc & DISP_YCRCB422 ? "YCrCb 4:2:2" : "");
}
+
if (STD_COLOR_SPACE(c->msc))
xf86DrvMsg(scrnIndex,X_INFO,
"Default color space is primary color space\n");