<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 17, 2017 at 1:09 PM, Pandiyan, Dhinakaran <span dir="ltr"><<a href="mailto:dhinakaran.pandiyan@intel.com" target="_blank" class="cremed">dhinakaran.pandiyan@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div>
<div style="direction:ltr;font-family:Helvetica;color:#000000;font-size:10pt">
<br>
______________________________<wbr>__________<br>
From: Puthikorn Voravootivat [<a href="mailto:puthik@google.com" target="_blank" class="cremed">puthik@google.com</a>] on behalf of Puthikorn Voravootivat [<a href="mailto:puthik@chromium.org" target="_blank" class="cremed">puthik@chromium.org</a>]<br>
Sent: Tuesday, May 16, 2017 5:33 PM<br>
To: <a href="mailto:intel-gfx@lists.freedesktop.org" target="_blank" class="cremed">intel-gfx@lists.freedesktop.<wbr>org</a>; Pandiyan, Dhinakaran<br>
Cc: <a href="mailto:dri-devel@lists.freedesktop.org" target="_blank" class="cremed">dri-devel@lists.freedesktop.<wbr>org</a>; 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<div><div class="h5"><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 <<a href="mailto:puthik@chromium.org" target="_blank" class="cremed">puthik@chromium.org</a>><br>
---<br>
drivers/gpu/drm/i915/intel_dp_<wbr>aux_backlight.c | 1 -<br>
1 file changed, 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/i915/intel_<wbr>dp_aux_backlight.c b/drivers/gpu/drm/i915/intel_<wbr>dp_aux_backlight.c<br>
index b87c5a381d6a..d32c06583e0b 100644<br>
--- a/drivers/gpu/drm/i915/intel_<wbr>dp_aux_backlight.c<br>
+++ b/drivers/gpu/drm/i915/intel_<wbr>dp_aux_backlight.c<br>
@@ -165,7 +165,6 @@ intel_dp_aux_display_control_<wbr>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_<wbr>ADJUSTMENT_CAP &&<br>
- (intel_dp->edp_dpcd[1] & DP_EDP_BACKLIGHT_AUX_ENABLE_<wbr>CAP) &&<br>
(intel_dp->edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_<wbr>AUX_SET_CAP) &&<br>
!((intel_dp->edp_dpcd[1] & DP_EDP_BACKLIGHT_PIN_ENABLE_<wbr>CAP) ||<br>
(intel_dp->edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_<wbr>PWM_PIN_CAP))) {<br>
--<br>
2.13.0.303.g4ebf302169-goog<br>
<br>
<br></div></div>
^ still has the problem I mentioned last time. How about this? <br>
<br>
<br>
diff --git a/drivers/gpu/drm/i915/intel_<wbr>dp_aux_backlight.c b/drivers/gpu/drm/i915/intel_<wbr>dp_aux_backlight.c<br>
index b87c5a3..7072bcf 100644<br>
--- a/drivers/gpu/drm/i915/intel_<wbr>dp_aux_backlight.c<br>
+++ b/drivers/gpu/drm/i915/intel_<wbr>dp_aux_backlight.c<br>
@@ -28,6 +28,10 @@ static void set_aux_backlight_enable(<wbr>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_<wbr>CAP))<br>
+               return;<br>
+<br>
        if (drm_dp_dpcd_readb(&intel_dp-><wbr>aux, DP_EDP_DISPLAY_CONTROL_<wbr>REGISTER,<br>
                              &reg_val) < 0) {<br>
                DRM_DEBUG_KMS("Failed to read DPCD register 0x%x\n",<br>
@@ -165,10 +169,8 @@ intel_dp_aux_display_control_<wbr>capable(struct intel_connector *connector)<span class=""><br>
         * the panel can support backlight control over the aux channel<br>
         */<br>
        if (intel_dp->edp_dpcd[1] & DP_EDP_TCON_BACKLIGHT_<wbr>ADJUSTMENT_CAP &&<br>
-           (intel_dp->edp_dpcd[1] & DP_EDP_BACKLIGHT_AUX_ENABLE_<wbr>CAP) &&<br>
            (intel_dp->edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_<wbr>AUX_SET_CAP) &&<br></span>
-           !((intel_dp->edp_dpcd[1] & DP_EDP_BACKLIGHT_PIN_ENABLE_<wbr>CAP) ||<br>
-             (intel_dp->edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_<wbr>PWM_PIN_CAP))) {<br>
+           !(intel_dp->edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_<wbr>PWM_PIN_CAP)) {<br>
                DRM_DEBUG_KMS("AUX Backlight Control Supported!\n");<br>
                return true;<br>
        }<br>
<br>
<br>
</div>
</div>

</blockquote></div>This works too. I probably misunderstood your comment as I move the code to next patch in the set.</div></div>