output->id = drm_idr_get(dev, output);
output->output_type = output_type;
output->output_type_id = 1; /* TODO */
- output->subpixel_order = SubPixelUnknown;
INIT_LIST_HEAD(&output->user_modes);
INIT_LIST_HEAD(&output->probed_modes);
INIT_LIST_HEAD(&output->modes);
out_resp->output_type = output->output_type;
out_resp->output_type_id = output->output_type_id;
- out_resp->mm_width = output->mm_width;
- out_resp->mm_height = output->mm_height;
- out_resp->subpixel = output->subpixel_order;
+ out_resp->mm_width = output->display_info.width_mm;
+ out_resp->mm_height = output->display_info.height_mm;
+ out_resp->subpixel = output->display_info.subpixel_order;
out_resp->connection = output->status;
if (output->crtc)
out_resp->crtc = output->crtc->id;
bool gtf_supported;
bool standard_color;
enum {
- monochrome,
+ monochrome = 0,
rgb,
other,
unknown,
unsigned int wpx2, wpy2;
unsigned int wpgamma2;
+ enum subpixel_order subpixel_order;
+
/* Preferred mode (if any) */
struct drm_display_mode *preferred_mode;
char *raw_edid; /* if any */
int desired_x, desired_y;
const struct drm_crtc_funcs *funcs;
void *driver_private;
-
- /* RRCrtcPtr randr_crtc? */
};
extern struct drm_crtc *drm_crtc_create(struct drm_device *dev,
* @initial_x: initial x position for this output
* @initial_y: initial y position for this output
* @status: output connected?
- * @subpixel_order: for this output
- * @mm_width: displayable width of output in mm
- * @mm_height: displayable height of output in mm
* @funcs: output control functions
* @driver_private: private driver data
*
bool doublescan_allowed;
struct list_head modes; /* list of modes on this output */
- /*
- OptionInfoPtr options;
- XF86ConfMonitorPtr conf_monitor;
- */
int initial_x, initial_y;
enum drm_output_status status;
/* these are modes added by probing with DDC or the BIOS */
struct list_head probed_modes;
- /* xf86MonPtr MonInfo; */
- enum subpixel_order subpixel_order;
- int mm_width, mm_height;
- struct drm_display_info *monitor_info; /* if any */
+ struct drm_display_info display_info;
const struct drm_output_funcs *funcs;
void *driver_private;
if (i == 0 && edid->preferred_timing)
newmode->type |= DRM_MODE_TYPE_PREFERRED;
drm_mode_probed_add(output, newmode);
-
+
+ /* Use first one for output's preferred mode */
+ if (!output->display_info.preferred_mode)
+ output->display_info.preferred_mode =
+ newmode;
modes++;
}
continue;
kfree(edid);
return NULL;
}
+
+ output->display_info.raw_edid = (char *)edid;
+
return edid;
}
EXPORT_SYMBOL(drm_get_edid);
num_modes += add_established_modes(output, edid);
num_modes += add_standard_modes(output, edid);
num_modes += add_detailed_info(output, edid);
+
+ output->display_info.serration_vsync = edid->serration_vsync;
+ output->display_info.sync_on_green = edid->sync_on_green;
+ output->display_info.composite_sync = edid->composite_sync;
+ output->display_info.separate_syncs = edid->separate_syncs;
+ output->display_info.blank_to_black = edid->blank_to_black;
+ output->display_info.video_level = edid->video_level;
+ output->display_info.digital = edid->digital;
+ output->display_info.width_mm = edid->width_cm * 10;
+ output->display_info.height_mm = edid->height_cm * 10;
+ output->display_info.gamma = edid->gamma;
+ output->display_info.gtf_supported = edid->default_gtf;
+ output->display_info.standard_color = edid->standard_color;
+ output->display_info.display_type = edid->display_type;
+ output->display_info.active_off_supported = edid->pm_active_off;
+ output->display_info.suspend_supported = edid->pm_suspend;
+ output->display_info.standby_supported = edid->pm_standby;
+ output->display_info.gamma = edid->gamma;
+
return num_modes;
}
EXPORT_SYMBOL(drm_add_edid_modes);
if (ret)
return ret;
- /* Didn't get an EDID */
- if (!output->monitor_info) {
- struct drm_display_info *dspinfo;
- dspinfo = kzalloc(sizeof(*output->monitor_info), GFP_KERNEL);
- if (!dspinfo)
- goto out;
-
- /* Set wide sync ranges so we get all modes
- * handed to valid_mode for checking
- */
- dspinfo->min_vfreq = 0;
- dspinfo->max_vfreq = 200;
- dspinfo->min_hfreq = 0;
- dspinfo->max_hfreq = 200;
- output->monitor_info = dspinfo;
- }
+ /* Didn't get an EDID, so
+ * Set wide sync ranges so we get all modes
+ * handed to valid_mode for checking
+ */
+ output->display_info.min_vfreq = 0;
+ output->display_info.max_vfreq = 200;
+ output->display_info.min_hfreq = 0;
+ output->display_info.max_hfreq = 200;
-out:
if (dev_priv->panel_fixed_mode != NULL) {
struct drm_display_mode *mode =
drm_mode_duplicate(dev, dev_priv->panel_fixed_mode);
intel_output->type = INTEL_OUTPUT_LVDS;
output->driver_private = intel_output;
- output->subpixel_order = SubPixelHorizontalRGB;
+ output->display_info.subpixel_order = SubPixelHorizontalRGB;
output->interlace_allowed = FALSE;
output->doublescan_allowed = FALSE;
if (sdvo_priv->caps.output_flags & SDVO_OUTPUT_RGB0)
{
sdvo_priv->active_outputs = SDVO_OUTPUT_RGB0;
- output->subpixel_order = SubPixelHorizontalRGB;
+ output->display_info.subpixel_order = SubPixelHorizontalRGB;
output_type = DRM_MODE_OUTPUT_DAC;
connector_type = ConnectorVGA;
}
else if (sdvo_priv->caps.output_flags & SDVO_OUTPUT_RGB1)
{
sdvo_priv->active_outputs = SDVO_OUTPUT_RGB1;
- output->subpixel_order = SubPixelHorizontalRGB;
+ output->display_info.subpixel_order = SubPixelHorizontalRGB;
output_type = DRM_MODE_OUTPUT_DAC;
connector_type = ConnectorVGA;
}
else if (sdvo_priv->caps.output_flags & SDVO_OUTPUT_TMDS0)
{
sdvo_priv->active_outputs = SDVO_OUTPUT_TMDS0;
- output->subpixel_order = SubPixelHorizontalRGB;
+ output->display_info.subpixel_order = SubPixelHorizontalRGB;
output_type = DRM_MODE_OUTPUT_TMDS;
connector_type = ConnectorDVID;
}
else if (sdvo_priv->caps.output_flags & SDVO_OUTPUT_TMDS1)
{
sdvo_priv->active_outputs = SDVO_OUTPUT_TMDS1;
- output->subpixel_order = SubPixelHorizontalRGB;
+ output->display_info.subpixel_order = SubPixelHorizontalRGB;
output_type = DRM_MODE_OUTPUT_TMDS;
connector_type = ConnectorDVID;
}