[RFC,02/10] drm/i915/config: Add init-time configuration of bits per color.

Submitted by Bob Paauwe on April 13, 2015, 8:51 p.m.

Details

Message ID 1428958271-15653-3-git-send-email-bob.j.paauwe@intel.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Bob Paauwe April 13, 2015, 8:51 p.m.
Allow the init-time configuration to specify the bits per color value
that gets used if bits per color is not present in EDID data (or if EDID
is not present).

v2: Use connector->base.name for connector name (Jani)

Signed-off-by: Bob Paauwe <bob.j.paauwe@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 97922fb..e50dbbd0 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -10744,6 +10744,20 @@  connected_sink_compute_bpp(struct intel_connector *connector,
 		connector->base.base.id,
 		connector->base.name);
 
+	/* If !bpc then see if one was specified in the static configuation */
+	if (connector->base.display_info.bpc == 0) {
+		/*
+		 * This is making the assumption that the static configuration
+		 * will use the names defined in the drm_connector_enum_list
+		 * array to identify the connector.
+		 */
+		intel_config_get_integer(to_i915(connector->base.dev),
+					CFG_CONNECTOR,
+					connector->base.name,
+					"bits_per_color",
+					&connector->base.display_info.bpc);
+	}
+
 	/* Don't use an invalid EDID bpc value */
 	if (connector->base.display_info.bpc &&
 	    connector->base.display_info.bpc * 3 < bpp) {