[PATCH] drm/i915/display: Warn about types of backlight not handled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Right now we are only explicitly handling the backlight of types
INTEL_BACKLIGHT_VESA_EDP_AUX_INTERFACE, INTEL_BACKLIGHT_DSI_DCS and
INTEL_BACKLIGHT_DISPLAY_DDI all others are being handled as
INTEL_BACKLIGHT_DISPLAY_DDI(south display engine PWM) but that
might not be the intended HW usage, so lets warn to identify those
systems and implement it properly if needed.

Cc: Imre Deak <imre.deak@xxxxxxxxx>
Signed-off-by: José Roberto de Souza <jose.souza@xxxxxxxxx>
---
 drivers/gpu/drm/i915/display/intel_panel.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_panel.c b/drivers/gpu/drm/i915/display/intel_panel.c
index 9f23bac0d792..368722536462 100644
--- a/drivers/gpu/drm/i915/display/intel_panel.c
+++ b/drivers/gpu/drm/i915/display/intel_panel.c
@@ -2023,6 +2023,21 @@ intel_panel_init_backlight_funcs(struct intel_panel *panel)
 	struct intel_connector *connector =
 		container_of(panel, struct intel_connector, panel);
 	struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
+	enum intel_backlight_type type = dev_priv->vbt.backlight.type;
+
+	if (dev_priv->params.enable_dpcd_backlight)
+		type = INTEL_BACKLIGHT_VESA_EDP_AUX_INTERFACE;
+
+	drm_dbg_kms(&dev_priv->drm,
+		    "Connector %s backlight type %u controller %u\n",
+		    connector->base.name, type,
+		    dev_priv->vbt.backlight.controller);
+
+	if (type != INTEL_BACKLIGHT_DISPLAY_DDI &&
+	    type != INTEL_BACKLIGHT_VESA_EDP_AUX_INTERFACE &&
+	    type != INTEL_BACKLIGHT_DSI_DCS)
+		drm_warn(&dev_priv->drm, "Backlight type %i not properly handled\n",
+			 type);
 
 	if (connector->base.connector_type == DRM_MODE_CONNECTOR_eDP &&
 	    intel_dp_aux_init_backlight_funcs(connector) == 0)
-- 
2.29.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux