Add a monitor information structure separate from the EDID data for tracking
monitor limits, etc.main
parent
a21ff375c6
commit
eb892fb09d
|
@ -168,6 +168,59 @@ enum subpixel_order {
|
|||
SubPixelNone,
|
||||
};
|
||||
|
||||
/*
|
||||
* Describes a given display (e.g. CRT or flat panel) and its limitations.
|
||||
*/
|
||||
struct drm_display_info {
|
||||
char name[DRM_DISPLAY_INFO_LEN];
|
||||
/* Input info */
|
||||
bool serration_vsync;
|
||||
bool sync_on_green;
|
||||
bool composite_sync;
|
||||
bool separate_syncs;
|
||||
bool blank_to_black;
|
||||
unsigned char video_level;
|
||||
bool digital;
|
||||
/* Physical size */
|
||||
unsigned int width_mm;
|
||||
unsigned int height_mm;
|
||||
|
||||
/* Display parameters */
|
||||
unsigned char gamma; /* FIXME: storage format */
|
||||
bool gtf_supported;
|
||||
bool standard_color;
|
||||
enum {
|
||||
monochrome,
|
||||
rgb,
|
||||
other,
|
||||
unknown,
|
||||
} display_type;
|
||||
bool active_off_supported;
|
||||
bool suspend_supported;
|
||||
bool standby_supported;
|
||||
|
||||
/* Color info FIXME: storage format */
|
||||
unsigned short redx, redy;
|
||||
unsigned short greenx, greeny;
|
||||
unsigned short bluex, bluey;
|
||||
unsigned short whitex, whitey;
|
||||
|
||||
/* Clock limits FIXME: storage format */
|
||||
unsigned int min_vfreq, max_vfreq;
|
||||
unsigned int min_hfreq, max_hfreq;
|
||||
unsigned int pixel_clock;
|
||||
|
||||
/* White point indices FIXME: storage format */
|
||||
unsigned int wpx1, wpy1;
|
||||
unsigned int wpgamma1;
|
||||
unsigned int wpx2, wpy2;
|
||||
unsigned int wpgamma2;
|
||||
|
||||
/* Preferred mode (if any) */
|
||||
struct drm_display_mode *preferred_mode;
|
||||
struct edid *raw_edid; /* if any */
|
||||
};
|
||||
|
||||
struct drm_framebuffer {
|
||||
struct drm_device *dev;
|
||||
struct list_head head;
|
||||
|
@ -376,7 +429,7 @@ struct drm_output {
|
|||
/* xf86MonPtr MonInfo; */
|
||||
enum subpixel_order subpixel_order;
|
||||
int mm_width, mm_height;
|
||||
struct edid *monitor_info;
|
||||
struct drm_display_info *monitor_info; /* if any */
|
||||
char name[DRM_OUTPUT_LEN];
|
||||
const struct drm_output_funcs *funcs;
|
||||
void *driver_private;
|
||||
|
|
|
@ -284,7 +284,6 @@ static int intel_lvds_get_modes(struct drm_output *output)
|
|||
{
|
||||
struct drm_device *dev = output->dev;
|
||||
drm_i915_private_t *dev_priv = dev->dev_private;
|
||||
struct edid *edid_info;
|
||||
int ret = 0;
|
||||
|
||||
ret = intel_ddc_get_modes(output);
|
||||
|
@ -294,23 +293,19 @@ static int intel_lvds_get_modes(struct drm_output *output)
|
|||
|
||||
/* Didn't get an EDID */
|
||||
if (!output->monitor_info) {
|
||||
struct detailed_data_monitor_range *edid_range;
|
||||
edid_info = kzalloc(sizeof(*output->monitor_info), GFP_KERNEL);
|
||||
if (!edid_info)
|
||||
struct drm_display_info *dspinfo;
|
||||
dspinfo = kzalloc(sizeof(*output->monitor_info), GFP_KERNEL);
|
||||
if (!dspinfo)
|
||||
goto out;
|
||||
|
||||
edid_info->detailed_timings[0].data.other_data.type =
|
||||
EDID_DETAIL_MONITOR_RANGE;
|
||||
edid_range = &edid_info->detailed_timings[0].data.other_data.data.range;
|
||||
|
||||
/* Set wide sync ranges so we get all modes
|
||||
* handed to valid_mode for checking
|
||||
*/
|
||||
edid_range->min_vfreq = 0;
|
||||
edid_range->max_vfreq = 200;
|
||||
edid_range->min_hfreq_khz = 0;
|
||||
edid_range->max_hfreq_khz = 200;
|
||||
output->monitor_info = edid_info;
|
||||
dspinfo->min_vfreq = 0;
|
||||
dspinfo->max_vfreq = 200;
|
||||
dspinfo->min_hfreq = 0;
|
||||
dspinfo->max_hfreq = 200;
|
||||
output->monitor_info = dspinfo;
|
||||
}
|
||||
|
||||
out:
|
||||
|
|
|
@ -893,6 +893,7 @@ typedef union drm_mm_init_arg{
|
|||
/*
|
||||
* Drm mode setting
|
||||
*/
|
||||
#define DRM_DISPLAY_INFO_LEN 32
|
||||
#define DRM_OUTPUT_NAME_LEN 32
|
||||
#define DRM_DISPLAY_MODE_LEN 32
|
||||
|
||||
|
|
Loading…
Reference in New Issue