All of lore.kernel.org
 help / color / mirror / Atom feed
From: Puthikorn Voravootivat <puthik@chromium.org>
To: intel-gfx@lists.freedesktop.org,
	Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>,
	Jani Nikula <jani.nikula@linux.intel.com>
Cc: Puthikorn Voravootivat <puthik@chromium.org>,
	dri-devel@lists.freedesktop.org
Subject: [PATCH v9 1/5] drm/i915: Drop AUX backlight enable check for backlight control
Date: Tue, 23 May 2017 15:38:01 -0700	[thread overview]
Message-ID: <20170523223805.46372-2-puthik@chromium.org> (raw)
In-Reply-To: <20170523223805.46372-1-puthik@chromium.org>

There are some panel that
(1) does not support display backlight enable via AUX
(2) support display backlight adjustment via AUX
(3) support display backlight enable via eDP BL_ENABLE pin

The current driver required that (1) must be support to enable (2).
This patch drops that requirement.

Signed-off-by: Puthikorn Voravootivat <puthik@chromium.org>
---
 drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/intel_dp_aux_backlight.c
index b87c5a381d6a..a0995c00fc84 100644
--- a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c
+++ b/drivers/gpu/drm/i915/intel_dp_aux_backlight.c
@@ -28,6 +28,10 @@ static void set_aux_backlight_enable(struct intel_dp *intel_dp, bool enable)
 {
 	uint8_t reg_val = 0;
 
+	/* Early return when display use other mechanism to enable backlight. */
+	if (!(intel_dp->edp_dpcd[1] & DP_EDP_BACKLIGHT_AUX_ENABLE_CAP))
+		return;
+
 	if (drm_dp_dpcd_readb(&intel_dp->aux, DP_EDP_DISPLAY_CONTROL_REGISTER,
 			      &reg_val) < 0) {
 		DRM_DEBUG_KMS("Failed to read DPCD register 0x%x\n",
@@ -165,10 +169,8 @@ intel_dp_aux_display_control_capable(struct intel_connector *connector)
 	 * the panel can support backlight control over the aux channel
 	 */
 	if (intel_dp->edp_dpcd[1] & DP_EDP_TCON_BACKLIGHT_ADJUSTMENT_CAP &&
-	    (intel_dp->edp_dpcd[1] & DP_EDP_BACKLIGHT_AUX_ENABLE_CAP) &&
 	    (intel_dp->edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP) &&
-	    !((intel_dp->edp_dpcd[1] & DP_EDP_BACKLIGHT_PIN_ENABLE_CAP) ||
-	      (intel_dp->edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_PWM_PIN_CAP))) {
+	    !(intel_dp->edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_PWM_PIN_CAP)) {
 		DRM_DEBUG_KMS("AUX Backlight Control Supported!\n");
 		return true;
 	}
-- 
2.13.0.219.gdb65acc882-goog

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

  reply	other threads:[~2017-05-23 22:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-23 22:38 [PATCH v9 0/5] Enhancement to intel_dp_aux_backlight driver Puthikorn Voravootivat
2017-05-23 22:38 ` Puthikorn Voravootivat [this message]
2017-05-24  8:16   ` [PATCH v9 1/5] drm/i915: Drop AUX backlight enable check for backlight control Jani Nikula
2017-05-26 12:28     ` Jani Nikula
2017-05-23 22:38 ` [PATCH v9 2/5] drm/i915: Allow choosing how to adjust brightness if both supported Puthikorn Voravootivat
2017-05-24  8:26   ` [Intel-gfx] " Daniel Vetter
2017-05-23 22:38 ` [PATCH v9 3/5] drm/i915: Add option to support dynamic backlight via DPCD Puthikorn Voravootivat
2017-05-23 22:38 ` [PATCH v9 4/5] drm: Add definition for eDP backlight frequency Puthikorn Voravootivat
2017-05-24  8:40   ` Jani Nikula
2017-05-26 12:30     ` Jani Nikula
2017-05-23 22:38 ` [PATCH v9 5/5] drm/i915: Set PWM divider to match desired frequency in vbt Puthikorn Voravootivat
2017-05-26 12:49   ` Jani Nikula
2017-05-26 23:01     ` Puthikorn Voravootivat
2017-05-23 22:51 ` ✓ Fi.CI.BAT: success for Enhancement to intel_dp_aux_backlight driver (rev8) Patchwork
2017-05-24  5:34   ` Saarinen, Jani
2017-05-24  8:15 ` Patchwork

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=20170523223805.46372-2-puthik@chromium.org \
    --to=puthik@chromium.org \
    --cc=dhinakaran.pandiyan@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.