<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Helvetica;color: #000000;font-size: 10pt;">
<br>
________________________________________<br>
From: Puthikorn Voravootivat [puthik@google.com] on behalf of Puthikorn Voravootivat [puthik@chromium.org]<br>
Sent: Tuesday, May 16, 2017 5:33 PM<br>
To: intel-gfx@lists.freedesktop.org; Pandiyan, Dhinakaran<br>
Cc: dri-devel@lists.freedesktop.org; Jani Nikula; Navare, Manasi D; Stephane Marchesin; Puthikorn Voravootivat<br>
Subject: [PATCH v8 1/5] drm/i915: Drop AUX backlight enable check for backlight control<br>
<br>
There are some panel that<br>
(1) does not support display backlight enable via AUX<br>
(2) support display backlight adjustment via AUX<br>
(3) support display backlight enable via eDP BL_ENABLE pin<br>
<br>
The current driver required that (1) must be support to enable (2).<br>
This patch drops that requirement.<br>
<br>
Signed-off-by: Puthikorn Voravootivat <puthik@chromium.org><br>
---<br>
drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 1 -<br>
1 file changed, 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/intel_dp_aux_backlight.c<br>
index b87c5a381d6a..d32c06583e0b 100644<br>
--- a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c<br>
+++ b/drivers/gpu/drm/i915/intel_dp_aux_backlight.c<br>
@@ -165,7 +165,6 @@ intel_dp_aux_display_control_capable(struct intel_connector *connector)<br>
* the panel can support backlight control over the aux channel<br>
*/<br>
if (intel_dp->edp_dpcd[1] & DP_EDP_TCON_BACKLIGHT_ADJUSTMENT_CAP &&<br>
- (intel_dp->edp_dpcd[1] & DP_EDP_BACKLIGHT_AUX_ENABLE_CAP) &&<br>
(intel_dp->edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP) &&<br>
!((intel_dp->edp_dpcd[1] & DP_EDP_BACKLIGHT_PIN_ENABLE_CAP) ||<br>
(intel_dp->edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_PWM_PIN_CAP))) {<br>
--<br>
2.13.0.303.g4ebf302169-goog<br>
<br>
<br>
^ still has the problem I mentioned last time. How about this? <br>
<br>
<br>
diff --git a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/intel_dp_aux_backlight.c<br>
index b87c5a3..7072bcf 100644<br>
--- a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c<br>
+++ b/drivers/gpu/drm/i915/intel_dp_aux_backlight.c<br>
@@ -28,6 +28,10 @@ static void set_aux_backlight_enable(struct intel_dp *intel_dp, bool enable)<br>
{<br>
uint8_t reg_val = 0;<br>
<br>
+ /* Early return when display use other mechanism to enable backlight. */<br>
+ if (!(intel_dp->edp_dpcd[1] & DP_EDP_BACKLIGHT_AUX_ENABLE_CAP))<br>
+ return;<br>
+<br>
if (drm_dp_dpcd_readb(&intel_dp->aux, DP_EDP_DISPLAY_CONTROL_REGISTER,<br>
®_val) < 0) {<br>
DRM_DEBUG_KMS("Failed to read DPCD register 0x%x\n",<br>
@@ -165,10 +169,8 @@ intel_dp_aux_display_control_capable(struct intel_connector *connector)<br>
* the panel can support backlight control over the aux channel<br>
*/<br>
if (intel_dp->edp_dpcd[1] & DP_EDP_TCON_BACKLIGHT_ADJUSTMENT_CAP &&<br>
- (intel_dp->edp_dpcd[1] & DP_EDP_BACKLIGHT_AUX_ENABLE_CAP) &&<br>
(intel_dp->edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP) &&<br>
- !((intel_dp->edp_dpcd[1] & DP_EDP_BACKLIGHT_PIN_ENABLE_CAP) ||<br>
- (intel_dp->edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_PWM_PIN_CAP))) {<br>
+ !(intel_dp->edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_PWM_PIN_CAP)) {<br>
DRM_DEBUG_KMS("AUX Backlight Control Supported!\n");<br>
return true;<br>
}<br>
<br>
<br>
</div>
</body>
</html>