summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drm_crtc.h55
-rw-r--r--linux-core/intel_lvds.c21
2 files changed, 62 insertions, 14 deletions
diff --git a/linux-core/drm_crtc.h b/linux-core/drm_crtc.h
index e5a89b17..e3e97ad8 100644
--- a/linux-core/drm_crtc.h
+++ b/linux-core/drm_crtc.h
@@ -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;
diff --git a/linux-core/intel_lvds.c b/linux-core/intel_lvds.c
index 34ed6a9d..74b040ba 100644
--- a/linux-core/intel_lvds.c
+++ b/linux-core/intel_lvds.c
@@ -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: