diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-08-10 06:51:33 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-08-10 06:51:33 +0100 |
commit | 8e1961e7fc163f3103b2260cca965aefa61fed40 (patch) | |
tree | 7fad0fa8a855b8ea048b8ac774153ed019049cb0 | |
parent | f6e85048b0789162e389ad2b838d417d517d62d9 (diff) |
sna: Respect monitor option "DefaultModes"
The is a monitor option to allow the user to specify whether to add the
default modes, use it to determine adding the extra modes for panels.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_display.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 68295acd..3d9724b1 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -167,7 +167,7 @@ struct sna_output { unsigned attached_encoders; unsigned int is_panel : 1; - unsigned int has_scaler : 1; + unsigned int add_default_modes : 1; uint32_t edid_idx; uint32_t edid_blob_id; @@ -2864,7 +2864,7 @@ sna_output_get_modes(xf86OutputPtr output) * If it is incorrect, please fix me. */ sna_output->has_panel_limits = false; - if (sna_output->has_scaler) { + if (sna_output->add_default_modes) { sna_output->panel_hdisplay = sna_output->panel_vdisplay = 0; for (i = 0; i < sna_output->num_modes; i++) { struct drm_mode_modeinfo *m; @@ -3697,7 +3697,10 @@ reset: sna_output->id = compat_conn.conn.connector_id; sna_output->is_panel = is_panel(compat_conn.conn.connector_type); sna_output->edid_idx = find_property(sna, sna_output, "EDID"); - sna_output->has_scaler = find_property(sna, sna_output, "scaling mode") != -1; + if (find_property(sna, sna_output, "scaling mode") != -1) + sna_output->add_default_modes = + xf86ReturnOptValBool(output->options, OPTION_DEFAULT_MODES, TRUE); + i = find_property(sna, sna_output, "DPMS"); if (i != -1) { sna_output->dpms_id = sna_output->prop_ids[i]; |