Skip to contentSkip to conversation

drm/i915: Check for platform specific GPIO config

PATCH In review Vidya Srinivas 2 participants 6 messages Jan 9, 2017 – Feb 8, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/14 drm/i915: Check for platform specific GPIO config

From: Uma Shankar <[email protected]>

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.

---
 drivers/gpu/drm/i915/intel_dsi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dsi.c +2 -1
index 16732e7..27d8f95 100644
@@ -1560,7 +1560,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);
 
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
maintainer
#1 lore raw
Quoted 5 lines · Vidya Srinivas

From: Uma Shankar <[email protected]>

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.

There are no code paths that would have dev_priv->vbt.dsi.config->pwm_blc == PPS_BLC_PMIC on platforms other than VLV/CVH.

BR,
Jani.

Quoted 19 lines
---
 drivers/gpu/drm/i915/intel_dsi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dsi.c +2 -1
index 16732e7..27d8f95 100644
@@ -1560,7 +1560,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);
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw
Quoted 13 lines

-----Original Message-----
From: Jani Nikula [mailto:[email protected]]
Sent: Monday, January 9, 2017 3:48 PM
To: Srinivas, Vidya <[email protected]>; intel- [email protected]
Subject: Re: [Intel-gfx] [PATCH 01/14] drm/i915: Check for platform specific GPIO config

Quoted 2 lines · Vidya Srinivas

From: Uma Shankar <[email protected]>

Quoted 7 lines
Quoted 3 lines

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.

There are no code paths that would have dev_priv->vbt.dsi.config->pwm_blc == PPS_BLC_PMIC on platforms other than VLV/CVH.

This particular field is by default 0 which triggers a redundant gpio get operation for BXT. Hence limiting this to BYT/CHT platforms.

Regards
Vidya

Quoted 17 lines

BR,
Jani.

drivers/gpu/drm/i915/intel_dsi.c void intel_dsi_init(struct drm_i915_private

Quoted 12 lines
---
 drivers/gpu/drm/i915/intel_dsi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dsi.c +0 -0
index 16732e7..27d8f95 100644
@@ -1560,7 +1560,8 @@ void intel_dsi_init(struct drm_i915_private

*dev_priv)

Quoted 11 lines

drivers/gpu/drm/i915/intel_dsi.c void intel_dsi_init(struct drm_i915_private *dev_priv) · line 1566

Quoted 8 lines
drivers/gpu/drm/i915/intel_dsi.c +2 -1
 	 * 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);

--
Jani Nikula, Intel Open Source Technology Center

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

maintainer
#3 lore raw
Quoted 15 lines · Vidya
Quoted 15 lines

-----Original Message-----
From: Jani Nikula [mailto:[email protected]]
Sent: Monday, January 9, 2017 3:48 PM
To: Srinivas, Vidya <[email protected]>; intel- [email protected]
Subject: Re: [Intel-gfx] [PATCH 01/14] drm/i915: Check for platform specific GPIO config

Quoted 5 lines · Vidya Srinivas

From: Uma Shankar <[email protected]>

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.

Quoted 5 lines
Quoted 3 lines

There are no code paths that would have dev_priv->vbt.dsi.config->pwm_blc == PPS_BLC_PMIC on platforms other than VLV/CVH.

This particular field is by default 0 which triggers a redundant gpio get operation for BXT. Hence limiting this to BYT/CHT platforms.

What do you mean by default 0? Are you saying that you have machines that have a VBT which indicate they have PMIC backlight control when they in fact don't?

BR,
Jani.

Quoted 31 lines

Regards
Vidya

Quoted 28 lines

BR,
Jani.

drivers/gpu/drm/i915/intel_dsi.c void intel_dsi_init(struct drm_i915_private

Quoted 12 lines
---
 drivers/gpu/drm/i915/intel_dsi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dsi.c +0 -0
index 16732e7..27d8f95 100644
@@ -1560,7 +1560,8 @@ void intel_dsi_init(struct drm_i915_private

*dev_priv)

drivers/gpu/drm/i915/intel_dsi.c void intel_dsi_init(struct drm_i915_private *dev_priv) · line 1566

Quoted 8 lines
drivers/gpu/drm/i915/intel_dsi.c +2 -1
 	 * 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);

--
Jani Nikula, Intel Open Source Technology Center

Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw
Quoted 29 lines

-----Original Message-----
From: Jani Nikula [mailto:[email protected]]
Sent: Wednesday, February 8, 2017 4:11 PM
To: Srinivas, Vidya <[email protected]>; intel- [email protected]
Subject: RE: [Intel-gfx] [PATCH 01/14] drm/i915: Check for platform specific GPIO config

Quoted 18 lines · Vidya
Quoted 18 lines

-----Original Message-----
From: Jani Nikula [mailto:[email protected]]
Sent: Monday, January 9, 2017 3:48 PM
To: Srinivas, Vidya <[email protected]>; intel- [email protected]
Subject: Re: [Intel-gfx] [PATCH 01/14] drm/i915: Check for platform specific GPIO config

Quoted 5 lines · Vidya Srinivas

From: Uma Shankar <[email protected]>

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.

There are no code paths that would have dev_priv->vbt.dsi.config->pwm_blc == PPS_BLC_PMIC on platforms other than VLV/CVH.

Quoted 6 lines
Quoted 2 lines

This particular field is by default 0 which triggers a redundant gpio get operation for BXT. Hence limiting this to BYT/CHT platforms.

What do you mean by default 0? Are you saying that you have machines that have a VBT which indicate they have PMIC backlight control when they in fact don't?

Sorry, what I meant is PPS_BLC_PMIC is 0. So even if the VBT field is not changed it will still become true causing the condition to pass.

Quoted 38 lines

BR,
Jani.

Quoted 31 lines

Regards
Vidya

Quoted 28 lines

BR,
Jani.

drivers/gpu/drm/i915/intel_dsi.c void intel_dsi_init(struct drm_i915_private

Quoted 12 lines
---
 drivers/gpu/drm/i915/intel_dsi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dsi.c +0 -0
index 16732e7..27d8f95 100644
@@ -1560,7 +1560,8 @@ void intel_dsi_init(struct drm_i915_private

*dev_priv)

drivers/gpu/drm/i915/intel_dsi.c void intel_dsi_init(struct drm_i915_private *dev_priv) · line 1566

Quoted 8 lines
drivers/gpu/drm/i915/intel_dsi.c +2 -1
 	 * 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);

--
Jani Nikula, Intel Open Source Technology Center

Quoted 2 lines

--
Jani Nikula, Intel Open Source Technology Center

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

maintainer
#5 lore raw
Quoted 30 lines · Vidya
Quoted 30 lines

-----Original Message-----
From: Jani Nikula [mailto:[email protected]]
Sent: Wednesday, February 8, 2017 4:11 PM
To: Srinivas, Vidya <[email protected]>; intel- [email protected]
Subject: RE: [Intel-gfx] [PATCH 01/14] drm/i915: Check for platform specific GPIO config

Quoted 20 lines · Vidya
Quoted 11 lines

-----Original Message-----
From: Jani Nikula [mailto:[email protected]]
Sent: Monday, January 9, 2017 3:48 PM
To: Srinivas, Vidya <[email protected]>; intel- [email protected]
Subject: Re: [Intel-gfx] [PATCH 01/14] drm/i915: Check for platform specific GPIO config

Quoted 2 lines · Vidya Srinivas

From: Uma Shankar <[email protected]>

Quoted 7 lines
Quoted 3 lines

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.

There are no code paths that would have dev_priv->vbt.dsi.config->pwm_blc == PPS_BLC_PMIC on platforms other than VLV/CVH.

This particular field is by default 0 which triggers a redundant gpio get operation for BXT. Hence limiting this to BYT/CHT platforms.

Quoted 6 lines
Quoted 3 lines

What do you mean by default 0? Are you saying that you have machines that have a VBT which indicate they have PMIC backlight control when they in fact don't?

Sorry, what I meant is PPS_BLC_PMIC is 0. So even if the VBT field is not changed it will still become true causing the condition to pass.

In other words, the VBT contains PPS_BLC_PMIC for a machine that should not use PMIC. In yet other words, the VBT contains incorrect information. Right?

BR,
Jani.

Quoted 40 lines
Quoted 40 lines

BR,
Jani.

Quoted 31 lines

Regards
Vidya

Quoted 28 lines

BR,
Jani.

drivers/gpu/drm/i915/intel_dsi.c void intel_dsi_init(struct drm_i915_private

Quoted 12 lines
---
 drivers/gpu/drm/i915/intel_dsi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dsi.c +0 -0
index 16732e7..27d8f95 100644
@@ -1560,7 +1560,8 @@ void intel_dsi_init(struct drm_i915_private

*dev_priv)

drivers/gpu/drm/i915/intel_dsi.c void intel_dsi_init(struct drm_i915_private *dev_priv) · line 1566

Quoted 8 lines
drivers/gpu/drm/i915/intel_dsi.c +2 -1
 	 * 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);

--
Jani Nikula, Intel Open Source Technology Center

--
Jani Nikula, Intel Open Source Technology Center

Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx