/*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
/*
* fbc_predid_diext - Display EDID data DI-EXT data
*/
#include <stdio.h> /* printf(), putchar() */
#include "sun_edid.h" /* EDID data parsing */
#include "fbc_predid.h" /* Display EDID data */
#include "fbc_predid_diext.h" /* Display EDID DI-EXT data */
/*
* Conversions from EDID flag bit value to output text string
*/
/*
* fbc_predid_diext_display_interface()
*
* Display Interface (Monitors with a digital video interface)
*/
void
unsigned int start_addr, /* Starting byte address (0x02) */
unsigned int end_addr) /* Ending byte address (0x0D) */
{
/*
* Standard/Specification Supported
*/
{
{ 0x00, "Display has an Analog Video Input" },
{ 0x01, "Display has a Digital Video Input" },
{ 0x02, "Digital Visual Interface (DVI) - Single link" },
{ 0x03,
"Digital Visual Interface (DVI) - Dual link, High resolution" },
{ 0x04,
"Digital Visual Interface (DVI) - Dual link, High color" },
{ 0x05,
"Digital Visual Interface (DVI) - For consumer electronics" },
{ 0x06, "Plug & Display (P&D)" },
{ 0x07, "Digital Flat Panel (DFP)" },
{ 0x08, "Open LDI - Single Link" },
{ 0x09, "Open LDI - Dual Link" },
{ 0x0A, "Open LDI - For consumer electronics" },
};
printf("\t Standard/Specification:\n");
printf("\t\t%s\n",
}
/*
*/
case 0:
printf("Not specified\n");
break;
printf("%d.%d / %d.%d\n",
edid_block[0x04],
edid_block[0x05],
edid_block[0x06]);
break;
case 2: /* ASCII character */
break;
case 3: /* Year, Month, Day */
printf("%d/%02d/%02d\n",
edid_block[0x05],
edid_block[0x06]);
break;
}
/*
* Data Format Description
*/
printf("\t Data Enable Signal: ");
printf("Available\n");
printf("\t Data enabled upon: %s signal\n",
} else {
printf("Unavailable\n");
}
{
"Not specified",
"Rising edge",
"Falling edge",
"Both rising and falling edges"
};
printf("\t Shift Clock usage: %s\n",
}
printf("\t HDCP Support: %s\n",
printf("\t Double Clocking of Input Data: %s\n",
printf("\t Packetized Digital Video: %s\n",
/*
* Data Format Description
*/
{
{ 0x00, "Display has an Analog Video Input" },
{ 0x15, "8-bit Over 8-bit RGB" },
{ 0x19, "12-bit Over 12-bit RGB" },
{ 0x24, "24-Bit MSB-Aligned RGB (Single Link)" },
{ 0x48, "48-Bit MSB-Aligned RGB (Dual Link Hi-Res)" },
{ 0x49, "48-Bit MSB-Aligned RGB (Dual Link Hi-Color)" },
{ 0, NULL }
};
printf("\t Digital Interface: %s\n",
}
/*
* Min & Max Pixel Clock Frequency (PCF) Per Link and Crossover PCF
*/
{
printf("\t Min Pixel Clock Frequency: ");
if (frequency == 0x00) {
printf("Display has an Analog Video Input\n");
} else
if (frequency == 0xFF) {
printf("Reserved\n");
} else {
}
printf("\t Max Pixel Clock Frequency: ");
if (frequency == 0x0000) {
printf("Display has an Analog Video Input\n");
} else
if (frequency == 0xFFFF) {
printf("Reserved\n");
} else {
}
printf("\t Crossover Pixel Clock Freq: ");
if (frequency == 0x0000) {
printf("Display has an Analog Video Input\n");
} else
if (frequency == 0xFFFF) {
printf("Single Link (no frequency)\n");
} else {
}
}
} /* fbc_predid_diext_display_interface() */
/*
* fbc_predid_diext_display_device()
*
*/
void
unsigned int start_addr, /* Starting byte address (0x0E) */
unsigned int end_addr) /* Ending byte address (0x13) */
{
/*
* Sub-Pixel Layout, Configuration, and Shape
*/
{
{ 0x00, "Not defined" },
{ 0x01, "RGB" },
{ 0x02, "BGR" },
{ 0, NULL }
};
printf("\t Sub-Pixel Layout: %s\n",
}
{
{ 0x00, "Not defined" },
{ 0x01, "Delta (Tri-ad)" },
{ 0x02, "Stripe" },
{ 0x03, "Stripe Offset" },
{ 0x04, "Quad pixel (4 sub-pixels / pixel)" },
{ 0, NULL }
};
printf("\t Sub-Pixel Configuration: %s\n",
}
{
{ 0x00, "Not defined" },
{ 0x01, "Round" },
{ 0x02, "Square" },
{ 0x03, "Rectangular" },
{ 0x04, "Oval" },
{ 0x05, "Elliptical" },
{ 0, NULL }
};
printf("\t Sub-Pixel Shape: %s\n",
};
/*
*/
/*
* Major Display Device Characteristics
*/
{
"Not specified",
"Direct View",
"Reflected View",
"Directed & Reflected View"
};
"Not specified",
"Large image device (group viewing)",
"Desktop or personal display",
"Eyepiece type personal display"
};
printf("\t Fixed Pixel Format: %s\n",
printf("\t View Direction: %s\n",
printf("\t Transparent Background: %s\n",
printf("\t Physical Implementation: %s\n",
};
} /* fbc_predid_diext_display_device() */
/*
* fbc_predid_diext_capabilities()
*
*/
void
unsigned int start_addr, /* Starting byte address (0x14) */
unsigned int end_addr) /* Ending byte address (0x36) */
{
/*
* Miscellaneous Display Capabilities
*/
printf("\t Legacy Timing Mode support: %s\n",
{
{ 0, "No direct stereo" },
{ 1, "Field seq. stereo via stero sync signal" },
{ 2, "Auto-stereoscopic, column interleave" },
{ 3, "Auto-stereoscopic, line interleave" },
{ 0, NULL }
};
printf("\t Stereo Video: %s\n",
"Reserved"));
}
printf("\t Scaler On Board: %s\n",
printf("\t Image Centering: %s\n",
printf("\t Conditional Update: %s\n",
printf("\t Interlaced Video: %s\n",
/*
* Frame Lock and Frame Rate Conversion
*/
printf("\t Frame Lock Support: %s\n",
{
"Not supported",
"Vertical converted to single frequency",
"Horizontal converted to single frequency",
"Vert & Horiz converted to single freqs"
};
printf("\t Frame Rate Conversion: %s\n",
}
printf("\t Vertical Frequency: %u.%02u Hz%s\n",
frequency / 100,
frequency % 100,
printf("\t Horizontal Frequency: %u.%02u Hz%s\n",
frequency / 100,
frequency % 100,
/*
*/
{
"Not defined",
"Fixed orientation (doesn't rotate)",
"Rotates (single EDID extension table)",
"Rotates (multiple EDID extension tables)"
};
}
{
"Landscape",
"Portrait"
};
printf("\t Screen Orientation: %s\n",
}
{
"Upper left",
"Upper right",
"Lower left",
"Lower right"
};
printf("\t Zero Pixel Location: %s\n",
}
{
"Not defined",
"Fast on Major, Slow on Minor",
"Fast on Minor, Slow on Major",
"Undefined"
};
printf("\t Scan Direction: %s\n",
}
printf("\t Standalone Projector: %s\n",
/*
* Default Color/Luminescence Coding Description
*/
{
{ 0x00, "Not defined" },
{ 0x01, "BGR (additive color)" },
{ 0x02, "Y/C (S-Video) NTSC" },
{ 0x03, "Y/C (S-Video) PAL" },
{ 0x04, "Y/C (S-Video) SECAM" },
{ 0x05, "YCrCb (4:4:4)" },
{ 0x06, "YCrCb (4:2:2)" },
{ 0x07, "YCrCb (4:2:0)" },
{ 0x08, "YCrCb (Legacy HDTV)" },
{ 0x09, "YPbPr (Legacy HDTV)" },
{ 0x0A, "YCrCb (Modern HDTV)" },
{ 0x0B, "YPbPr (Modern HDTV)" },
{ 0x0C, "Y B-Y R-Y BetaCam (Sony)" },
{ 0x0D, "Y B-Y R-Y M-2 (Matsushita)" },
{ 0x0E, "Monochrome" },
{ 0, NULL }
};
printf("\t Default Color/Luminescence: %s\n",
}
/*
* Preferred Color/Luminescence Coding Description
*/
{
{ 0x01, "BGR (additive color)" },
{ 0x02, "Y/C (S-Video) xxxx color" },
{ 0x03, "Yxx (SMPTE 2xxM) Color Diff)" },
{ 0x04, "Monochrome" },
{ 0, NULL }
};
printf("\t Preferred Color/Luminescence: %s\n",
}
/*
* Color/Luminescence Decoding Capabilities Description
*/
{
"BGR (additive color)",
"Y/C (S-Video) NTSC color",
"Y/C (S-Video) PAL color",
"Y/C (S-Video) SECAM color",
"YCrCb (4:4:4)",
"YCrCb (4:2:2)",
"YCrCb (4:2:0)",
"YCrCb (Legacy HDTV)",
"YpbPr (Legacy HDTV)",
"YCrCb (Modern HDTV)",
"YpbPr (Modern HDTV)",
"Y B-Y R-Y BetaCam (Sony)",
"Y B-Y R-Y M-2 (Matsushita)",
"Monochrome",
"Undefined (Bit 1)",
"Undefined (Bit 0)"
};
printf("\t Color/Luminescence Decoding Capabilities:\n");
printf("\t\tNot defined\n");
} else {
if (sun_edid_bit_set(
printf("\t\t%s\n",
}
}
}
}
/*
* Monitor Color Depth
*/
printf("\t Dithering: %s\n",
{
"Blue:",
"Green:",
"Red:",
"Y:",
};
int i;
printf("\t Monitor Color Depth:\n");
for (i = 0; i < 6; i += 1) {
printf("\t\t%-6s %2u %s\n",
color[i],
edid_block[0x20 + i],
? "- No Color Depth information"
: "bits per color");
}
}
/*
* Aspect Ratio Conversion Modes
*/
{
"Full mode",
"Zoom mode",
"Squeeze mode",
"Reserved (Bit 3)",
"Reserved (Bit 2)",
"Reserved (Bit 1)",
"Reserved (Bit 0)"
};
printf("\t Aspect Ratio Conversion Modes:\n");
printf("\t\tNot supported\n");
} else {
if (sun_edid_bit_set(
printf("\t\t%s\n",
}
}
}
}
/*
* Packetized Digital Video Support Information (reserved)
*/
} /* fbc_predid_diext_capabilities() */
/*
* fbc_predid_diext_gamma()
*
*/
void
unsigned int start_addr, /* Starting byte address (0x51) */
unsigned int end_addr) /* Ending byte address (0x7E) */
{
const char *const curve_white[] =
{ "White", NULL };
const char *const curve_color[] =
int i; /* Loop counter / entry number */
printf("\t Combined or Separate: ");
curve_name = &curve_white[0];
max_entries = 45;
case 0:
printf("Not defined\n");
return;
case 1:
printf("Single White Curve\n");
break;
case 2:
printf("Three Color Curves\n");
curve_name = &curve_color[0];
max_entries = 15;
break;
case 3:
printf("Reserved\n");
return;
}
if (entries > max_entries) {
}
addr = 0x52;
for (i = 0; i < entries; i += 1) {
}
putchar('\n');
}
} /* fbc_predid_diext_gamma() */
/* End of fbc_predid_diext.c */