diff mbox

[1/9] drm/i915: Check for platform specific GPIO config

Message ID 1486551058-22596-2-git-send-email-vidya.srinivas@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Srinivas, Vidya Feb. 8, 2017, 10:50 a.m. UTC
From: Uma Shankar <uma.shankar@intel.com>

Panel GPIO control should be done based on platform. Add a check
to restrict VLV and CHT specific GPIO confirguration, so that
they dont apply to other platforms.

Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
---
 drivers/gpu/drm/i915/intel_dsi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Paauwe, Bob J Feb. 15, 2017, 6:05 p.m. UTC | #1
On Wed, 8 Feb 2017 16:20:50 +0530
Vidya Srinivas <vidya.srinivas@intel.com> wrote:

> From: Uma Shankar <uma.shankar@intel.com>
> 
> Panel GPIO control should be done based on platform. Add a check
> to restrict VLV and CHT specific GPIO confirguration, so that
> they dont apply to other platforms.
> 
> Signed-off-by: Uma Shankar <uma.shankar@intel.com>
> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_dsi.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
> index c98234e..c297ea9 100644
> --- a/drivers/gpu/drm/i915/intel_dsi.c
> +++ b/drivers/gpu/drm/i915/intel_dsi.c
> @@ -1584,7 +1584,8 @@ void intel_dsi_init(struct drm_i915_private *dev_priv)
>  	 * In case of BYT with CRC PMIC, we need to use GPIO for
>  	 * Panel control.
>  	 */
> -	if (dev_priv->vbt.dsi.config->pwm_blc == PPS_BLC_PMIC) {
> +	if ((IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) &&
> +		(dev_priv->vbt.dsi.config->pwm_blc == PPS_BLC_PMIC)) {
>  		intel_dsi->gpio_panel =
>  			gpiod_get(dev->dev, "panel", GPIOD_OUT_HIGH);
>  

It makes sense to restrict this as it isn't valid for other platforms
as written. But is there something similar for other platforms that we
should set up here?

Since it makes sense to limit this today..
Reviewed-by: Bob Paauwe <bob.j.paauwe@intel.com>
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
index c98234e..c297ea9 100644
--- a/drivers/gpu/drm/i915/intel_dsi.c
+++ b/drivers/gpu/drm/i915/intel_dsi.c
@@ -1584,7 +1584,8 @@  void intel_dsi_init(struct drm_i915_private *dev_priv)
 	 * In case of BYT with CRC PMIC, we need to use GPIO for
 	 * Panel control.
 	 */
-	if (dev_priv->vbt.dsi.config->pwm_blc == PPS_BLC_PMIC) {
+	if ((IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) &&
+		(dev_priv->vbt.dsi.config->pwm_blc == PPS_BLC_PMIC)) {
 		intel_dsi->gpio_panel =
 			gpiod_get(dev->dev, "panel", GPIOD_OUT_HIGH);