/*
*
* 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_prconf - Display current hardware configuration
*/
#include <ctype.h> /* isprint() */
#include <stdio.h> /* printf(), putchar() */
#include <string.h> /* strlen(), strstr() */
#include <unistd.h> /* ioctl() */
#include "gfx_common.h" /* Model name, part number, cur video mode */
#include "sun_edid.h" /* EDID data parsing */
#include "fbc.h" /* Common fbconf_xorg(1M) definitions */
#include "fbc_dev.h" /* Identify the graphics device (-dev opt) */
#include "fbc_prconf.h" /* Display current hardware configuration */
/*
* fbc_prconf_model()
*
* Display the frame buffer model name and part number.
*/
void
int device_fd) /* Device file descriptor number */
{
/*
* Display the model name and part number
*/
}
}
}
}
}
} /* fbc_prconf_model() */
/*
* fbc_prconf_edid_product_id()
*
* Display the Vendor & Product Identification, etc. found in the
* EDID Base block.
*/
static
void
{
}
(serial_num != 0)) {
if (serial_num != 0) {
}
if (string_buf[0] != '\0') {
}
putchar('\n');
}
if (week == 0xFF) {
} else {
if (week != 0) {
}
putchar('\n');
}
} /* fbc_prconf_edid_product_id() */
/*
* fbc_prconf_edid_version()
*
* Display the EDID Structure Version & Revision, obtained from EDID
* Base block bytes 0x12 and 0x13, respectively.
*/
static
void
{
} /* fbc_prconf_edid_version() */
/*
* fbc_prconf_edid_basic_display()
*
* Display the Basic Display Parameters & Features of the display
* device. This is obtained from the EDID Base block.
*/
static
void
{
#if (0) /* Made redundant by -predid */
/*
* Video Input Definition (sync support info)
*
* Check for Analog Video Signal Interface
*/
/*
* Display Synchronization Types for this analog display device
*/
"Separate sync H & V signals: %s\n",
"Composite sync on Horizontal: %s\n",
"Composite sync on Green: %s\n",
}
#endif /* Made redundant by -predid */
/*
* Horizontal & Vertical Screen Size or Aspect Ratio
*
* The returned aspect ratio value (introduced in EDID 1.4)
* is only valid iff positive. Aspect ratios are rounded to
* the hundredth decimal place.
*/
if ((horizontal != 0) && (vertical != 0)) {
} else
if (aspect > 0.0) {
if (horizontal != 0) {
"Monitor aspect ratio (Landscape): %4.2f:1\n",
aspect);
} else {
"Monitor aspect ratio (Portrait): %4.2f:1\n",
aspect);
}
}
/*
* Display Transfer Characteristic (Gamma)
*/
if (gamma > 0.0) {
}
} /* fbc_prconf_edid_basic_display() */
/*
* fbc_prconf_edid_display_descriptor()
*
* Display any EDID Display Descriptor information that isn't handled
* elsewhere.
*/
static
void
{
}
} /* fbc_prconf_edid_display_descriptor() */
/*
* fbc_prconf_edid_modes()
*
* Display the list of display-supported resolution names obtained
* from EDID timings data. The caller must have made sure that the
* list exists. Mode names can be filtered (excluded or substituted)
* based on the edid_mode_mods[] array.
*/
static
void
{
/*
* Display the preferred video mode of the display device
*
* The display's Preferred Timing Mode should be encoded in
* the first Detailed Timing Descriptor in the EDID Base
* block. This yeilds the preferred video mode, which should
* be stored in the first element of the edid_mode[] array.
* An empty mode name string ("") means that no Preferred
* Timing was specified (e.g. pre EDID 1.1).
*/
if (*mode_name != '\0') {
}
/*
* Display the video modes supported by the display device
*
* Which mode names will get past the filter isn't yet known.
* Hypothetically, no names might be displayed. A suitable
* generalization is wanted.
*
* A comma preceeds each video mode name except for the
* first. The first video mode name is preceded by the
* "supported resolutions" label. The label will be treated
* as an honorary comma so that the loop will be able to
* handle each mode name in the same way.
*/
line_len = 0;
if (*mode_name == '\0') {
continue; /* Video mode has been filtered out */
}
comma_str = ",";
}
}
if (line_len > 0) {
putchar('\n');
}
} /* fbc_prconf_edid_modes() */
/*
* fbc_prconf_edid()
*
* Display the EDID information for this video stream's display device.
*/
void
{
#if defined(FBC_EDID_TEST_DATA)
#include "fbc_edid_test_data.h" /* EDID test data */
#endif
/*
* Validate the EDID Base block and any Extension blocks
*
* The Base block is needed in order for this function to do
* anything. Extension blocks aren't used in the current
* implementation.
*/
"EDID Data: EDID Base block is not available\n");
return;
}
if (block_num != 0) {
"EDID Data: Error near EDID Extension block #%d\n",
}
/*
* Display Vendor & Product ID, Version, Basic Display Params, etc.
*/
/*
* Get the EDID video mode names for this stream's display device
*/
/*
* Display the display-supported video modes (possibly filtered)
*/
}
} /* fbc_prconf_edid() */
/*
* fbc_prconf_cur_mode()
*
* Display the current video mode setting.
*/
void
int device_fd) /* Device file descriptor number */
{
/*
* Display the current video mode setting
*/
&gfx_vid_mode) >= 0) {
}
} /* fbc_prconf_cur_mode() */
/* End of fbc_prconf.c */