Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "José Roberto de Souza" <jose.souza@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH] drm/i915/display: Warn about types of backlight not handled
Date: Fri, 20 Nov 2020 11:57:48 -0800	[thread overview]
Message-ID: <20201120195748.99265-1-jose.souza@intel.com> (raw)

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@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2020-11-20 19:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-20 19:57 José Roberto de Souza [this message]
2020-11-20 20:56 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/display: Warn about types of backlight not handled Patchwork
2020-11-21  0:45 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2020-11-25 19:05 ` [Intel-gfx] [PATCH] " Imre Deak
2020-11-26 14:09   ` Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201120195748.99265-1-jose.souza@intel.com \
    --to=jose.souza@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox