Skip to contentSkip to conversation

drm/i915: Quirk to ignore VBT bpp

PATCH In review Ben Widawsky 3 participants 4 messages Sep 20, 2013 – Sep 23, 2013

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

PATCH 1/1 drm/i915: Quirk to ignore VBT bpp

We've had several reports of an Asus Zenbook reporting an 18bpp eDP display, which then proceeds to not work. Using the default 24, work just fine. Since it appears this is somewhat common in the budding world of eDP, make a new quirk for it, and use it.

This code has been changed several times. Amongst the most recent with the best history are:

commit 57c219633275c7e7413f8bc7be250dc092887458

Author: Daniel Vetter <[email protected]>
Date:   Thu Apr 4 17:19:37 2013 +0200

drm/i915: revert eDP bpp clamping code changes

and

commit af13188a1a6623fc8b4b6c42178046fb80f8b1d0

Author: Daniel Vetter <[email protected]>
Date:   Tue Feb 19 17:45:00 2013 +0100

drm/i915: force bpp for eDP panels

---
 drivers/gpu/drm/i915/i915_drv.h      |  1 +
 drivers/gpu/drm/i915/intel_display.c | 12 ++++++++++++
 drivers/gpu/drm/i915/intel_dp.c      |  4 +++-
 3 files changed, 16 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_drv.h +1 -0
index 8c52cbd..bc8ff0a 100644
@@ -672,6 +672,7 @@ enum intel_sbi_destination {
 #define QUIRK_LVDS_SSC_DISABLE (1<<1)
 #define QUIRK_INVERT_BRIGHTNESS (1<<2)
 #define QUIRK_NO_PCH_PWM_ENABLE (1<<3)
+#define QUIRK_IGNORE_VBT_BPP	(1<<4)
 
 struct intel_fbdev;
 struct intel_fbc_work;
drivers/gpu/drm/i915/intel_display.c +12 -0
index 8206ee7..c364377 100644
@@ -10139,6 +10139,15 @@ static void quirk_no_pcm_pwm_enable(struct drm_device *dev)
 	DRM_INFO("applying no-PCH_PWM_ENABLE quirk\n");
 }
 
+/* Some machines (ux31a) advertise the panel should use 18bpp, but it lies.
+ */
+static void quirk_ignore_vbt_bpp(struct drm_device *dev)
+{
+	struct drm_i915_private *dev_priv = dev->dev_private;
+	dev_priv->quirks |= QUIRK_IGNORE_VBT_BPP;
+	DRM_INFO("applying IGNORE_VBT_BPP quirk\n");
+}
+
 struct intel_quirk {
 	int device;
 	int subsystem_vendor;
@@ -10213,6 +10222,9 @@ static struct intel_quirk intel_quirks[] = {
 	{ 0x0116, 0x1028, 0x052e, quirk_no_pcm_pwm_enable },
 	/* Dell XPS13 HD and XPS13 FHD Ivy Bridge */
 	{ 0x0166, 0x1028, 0x058b, quirk_no_pcm_pwm_enable },
+
+	/* Asus Zenbook UX31A Ivybridge eDP */
+	{ 0x0166, 0x1043, 0x1517, quirk_ignore_vbt_bpp },
 };
 
 static void intel_init_quirks(struct drm_device *dev)
drivers/gpu/drm/i915/intel_dp.c +3 -1
index 9770160..fd47be8 100644
@@ -805,7 +805,9 @@ intel_dp_compute_config(struct intel_encoder *encoder,
 	/* Walk through all bpp values. Luckily they're all nicely spaced with 2
 	 * bpc in between. */
 	bpp = pipe_config->pipe_bpp;
-	if (is_edp(intel_dp) && dev_priv->vbt.edp_bpp) {
+	if (is_edp(intel_dp) &&
+	    dev_priv->vbt.edp_bpp &&
+	    (dev_priv->quirks & QUIRK_IGNORE_VBT_BPP) == 0) {
 		DRM_DEBUG_KMS("clamping bpp for eDP panel to BIOS-provided %i\n",
 			      dev_priv->vbt.edp_bpp);
 		bpp = min_t(int, bpp, dev_priv->vbt.edp_bpp);
Signature · 1 line
1.8.4
maintainer
#1 lore raw
Quoted 4 lines · Ben Widawsky

We've had several reports of an Asus Zenbook reporting an 18bpp eDP display, which then proceeds to not work. Using the default 24, work just fine. Since it appears this is somewhat common in the budding world of eDP, make a new quirk for it, and use it.

Srinivas, are you using UEFI boot? Does the problem go away if you try enabling CSM or legacy boot?

That would be [1]. On certain machines we need to use the bpp from VBT, otherwise eDP fails. For some reason the VBT on certain other machines reports a different bpp value depending on UEFI vs. CSM/legacy boot, where the former fails but latter works.

There are more affected machines than just Asus Zenbook UX31A IVB, and I'm not sure if quirking is the right option... still hoping to find a good solution that works out of the box for everyone.

BR,
Jani.

[1] https://bugzilla.kernel.org/show_bug.cgi?id=59841

Quoted 92 lines

This code has been changed several times. Amongst the most recent with the best history are:

commit 57c219633275c7e7413f8bc7be250dc092887458

Author: Daniel Vetter <[email protected]>
Date:   Thu Apr 4 17:19:37 2013 +0200

drm/i915: revert eDP bpp clamping code changes

and

commit af13188a1a6623fc8b4b6c42178046fb80f8b1d0

Author: Daniel Vetter <[email protected]>
Date:   Tue Feb 19 17:45:00 2013 +0100

drm/i915: force bpp for eDP panels

---
 drivers/gpu/drm/i915/i915_drv.h      |  1 +
 drivers/gpu/drm/i915/intel_display.c | 12 ++++++++++++
 drivers/gpu/drm/i915/intel_dp.c      |  4 +++-
 3 files changed, 16 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_drv.h +1 -0
index 8c52cbd..bc8ff0a 100644
@@ -672,6 +672,7 @@ enum intel_sbi_destination {
 #define QUIRK_LVDS_SSC_DISABLE (1<<1)
 #define QUIRK_INVERT_BRIGHTNESS (1<<2)
 #define QUIRK_NO_PCH_PWM_ENABLE (1<<3)
+#define QUIRK_IGNORE_VBT_BPP	(1<<4)
 
 struct intel_fbdev;
 struct intel_fbc_work;
drivers/gpu/drm/i915/intel_display.c +12 -0
index 8206ee7..c364377 100644
@@ -10139,6 +10139,15 @@ static void quirk_no_pcm_pwm_enable(struct drm_device *dev)
 	DRM_INFO("applying no-PCH_PWM_ENABLE quirk\n");
 }
 
+/* Some machines (ux31a) advertise the panel should use 18bpp, but it lies.
+ */
+static void quirk_ignore_vbt_bpp(struct drm_device *dev)
+{
+	struct drm_i915_private *dev_priv = dev->dev_private;
+	dev_priv->quirks |= QUIRK_IGNORE_VBT_BPP;
+	DRM_INFO("applying IGNORE_VBT_BPP quirk\n");
+}
+
 struct intel_quirk {
 	int device;
 	int subsystem_vendor;
@@ -10213,6 +10222,9 @@ static struct intel_quirk intel_quirks[] = {
 	{ 0x0116, 0x1028, 0x052e, quirk_no_pcm_pwm_enable },
 	/* Dell XPS13 HD and XPS13 FHD Ivy Bridge */
 	{ 0x0166, 0x1028, 0x058b, quirk_no_pcm_pwm_enable },
+
+	/* Asus Zenbook UX31A Ivybridge eDP */
+	{ 0x0166, 0x1043, 0x1517, quirk_ignore_vbt_bpp },
 };
 
 static void intel_init_quirks(struct drm_device *dev)
drivers/gpu/drm/i915/intel_dp.c +3 -1
index 9770160..fd47be8 100644
@@ -805,7 +805,9 @@ intel_dp_compute_config(struct intel_encoder *encoder,
 	/* Walk through all bpp values. Luckily they're all nicely spaced with 2
 	 * bpc in between. */
 	bpp = pipe_config->pipe_bpp;
-	if (is_edp(intel_dp) && dev_priv->vbt.edp_bpp) {
+	if (is_edp(intel_dp) &&
+	    dev_priv->vbt.edp_bpp &&
+	    (dev_priv->quirks & QUIRK_IGNORE_VBT_BPP) == 0) {
 		DRM_DEBUG_KMS("clamping bpp for eDP panel to BIOS-provided %i\n",
 			      dev_priv->vbt.edp_bpp);
 		bpp = min_t(int, bpp, dev_priv->vbt.edp_bpp);
Signature · 6 lines
1.8.4

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
#2 lore raw
Quoted 8 lines · Jani Nikula
Quoted 4 lines · Ben Widawsky

We've had several reports of an Asus Zenbook reporting an 18bpp eDP display, which then proceeds to not work. Using the default 24, work just fine. Since it appears this is somewhat common in the budding world of eDP, make a new quirk for it, and use it.

Srinivas, are you using UEFI boot? Does the problem go away if you try enabling CSM or legacy boot?

Quoted 9 lines

That would be [1]. On certain machines we need to use the bpp from VBT, otherwise eDP fails. For some reason the VBT on certain other machines reports a different bpp value depending on UEFI vs. CSM/legacy boot, where the former fails but latter works.

There are more affected machines than just Asus Zenbook UX31A IVB, and I'm not sure if quirking is the right option... still hoping to find a good solution that works out of the box for everyone.

I see for some folks enabling legacy mode solves this issue and for some it doesn't solve (There are number of report of this issue). For me UEFI boot is important because I am working on some feature requiring UEFI boot.

Quoted 98 lines

BR,
Jani.

[1] https://bugzilla.kernel.org/show_bug.cgi?id=59841

Quoted 91 lines

This code has been changed several times. Amongst the most recent with the best history are:

commit 57c219633275c7e7413f8bc7be250dc092887458

Author: Daniel Vetter <[email protected]>
Date:   Thu Apr 4 17:19:37 2013 +0200

drm/i915: revert eDP bpp clamping code changes

and

commit af13188a1a6623fc8b4b6c42178046fb80f8b1d0

Author: Daniel Vetter <[email protected]>
Date:   Tue Feb 19 17:45:00 2013 +0100

drm/i915: force bpp for eDP panels

---
  drivers/gpu/drm/i915/i915_drv.h      |  1 +
  drivers/gpu/drm/i915/intel_display.c | 12 ++++++++++++
  drivers/gpu/drm/i915/intel_dp.c      |  4 +++-
  3 files changed, 16 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_drv.h +1 -0
index 8c52cbd..bc8ff0a 100644
@@ -672,6 +672,7 @@ enum intel_sbi_destination {
  #define QUIRK_LVDS_SSC_DISABLE (1<<1)
  #define QUIRK_INVERT_BRIGHTNESS (1<<2)
  #define QUIRK_NO_PCH_PWM_ENABLE (1<<3)
+#define QUIRK_IGNORE_VBT_BPP	(1<<4)
 
  struct intel_fbdev;
  struct intel_fbc_work;
drivers/gpu/drm/i915/intel_display.c +12 -0
index 8206ee7..c364377 100644
@@ -10139,6 +10139,15 @@ static void quirk_no_pcm_pwm_enable(struct drm_device *dev)
  	DRM_INFO("applying no-PCH_PWM_ENABLE quirk\n");
  }
 
+/* Some machines (ux31a) advertise the panel should use 18bpp, but it lies.
+ */
+static void quirk_ignore_vbt_bpp(struct drm_device *dev)
+{
+	struct drm_i915_private *dev_priv = dev->dev_private;
+	dev_priv->quirks |= QUIRK_IGNORE_VBT_BPP;
+	DRM_INFO("applying IGNORE_VBT_BPP quirk\n");
+}
+
  struct intel_quirk {
  	int device;
  	int subsystem_vendor;
@@ -10213,6 +10222,9 @@ static struct intel_quirk intel_quirks[] = {
  	{ 0x0116, 0x1028, 0x052e, quirk_no_pcm_pwm_enable },
  	/* Dell XPS13 HD and XPS13 FHD Ivy Bridge */
  	{ 0x0166, 0x1028, 0x058b, quirk_no_pcm_pwm_enable },
+
+	/* Asus Zenbook UX31A Ivybridge eDP */
+	{ 0x0166, 0x1043, 0x1517, quirk_ignore_vbt_bpp },
  };
 
  static void intel_init_quirks(struct drm_device *dev)
drivers/gpu/drm/i915/intel_dp.c +3 -1
index 9770160..fd47be8 100644
@@ -805,7 +805,9 @@ intel_dp_compute_config(struct intel_encoder *encoder,
  	/* Walk through all bpp values. Luckily they're all nicely spaced with 2
  	 * bpc in between. */
  	bpp = pipe_config->pipe_bpp;
-	if (is_edp(intel_dp) && dev_priv->vbt.edp_bpp) {
+	if (is_edp(intel_dp) &&
+	    dev_priv->vbt.edp_bpp &&
+	    (dev_priv->quirks & QUIRK_IGNORE_VBT_BPP) == 0) {
  		DRM_DEBUG_KMS("clamping bpp for eDP panel to BIOS-provided %i\n",
  			      dev_priv->vbt.edp_bpp);
  		bpp = min_t(int, bpp, dev_priv->vbt.edp_bpp);
Signature · 6 lines
1.8.4

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
maintainer
#3 lore raw
Quoted 14 lines · Srinivas Pandruvada
Quoted 13 lines · Jani Nikula
Quoted 4 lines · Ben Widawsky

We've had several reports of an Asus Zenbook reporting an 18bpp eDP display, which then proceeds to not work. Using the default 24, work just fine. Since it appears this is somewhat common in the budding world of eDP, make a new quirk for it, and use it.

Srinivas, are you using UEFI boot? Does the problem go away if you try enabling CSM or legacy boot?

That would be [1]. On certain machines we need to use the bpp from VBT, otherwise eDP fails. For some reason the VBT on certain other machines reports a different bpp value depending on UEFI vs. CSM/legacy boot, where the former fails but latter works.

Quoted 6 lines
Quoted 4 lines

There are more affected machines than just Asus Zenbook UX31A IVB, and I'm not sure if quirking is the right option... still hoping to find a good solution that works out of the box for everyone.

I see for some folks enabling legacy mode solves this issue and for some it doesn't solve (There are number of report of this issue).

I'd be interested in references and hard data; I was pretty much under the impression it always works in legacy.

Quoted 2 lines

For me UEFI boot is important because I am working on some feature requiring UEFI boot.

Of course; I'm not saying enabling legacy is a fix, or even a decent workaround. Just interested in another data point.

Jani.

Quoted 98 lines
Quoted 98 lines

BR,
Jani.

[1] https://bugzilla.kernel.org/show_bug.cgi?id=59841

Quoted 91 lines

This code has been changed several times. Amongst the most recent with the best history are:

commit 57c219633275c7e7413f8bc7be250dc092887458

Author: Daniel Vetter <[email protected]>
Date:   Thu Apr 4 17:19:37 2013 +0200

drm/i915: revert eDP bpp clamping code changes

and

commit af13188a1a6623fc8b4b6c42178046fb80f8b1d0

Author: Daniel Vetter <[email protected]>
Date:   Tue Feb 19 17:45:00 2013 +0100

drm/i915: force bpp for eDP panels

---
  drivers/gpu/drm/i915/i915_drv.h      |  1 +
  drivers/gpu/drm/i915/intel_display.c | 12 ++++++++++++
  drivers/gpu/drm/i915/intel_dp.c      |  4 +++-
  3 files changed, 16 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_drv.h +1 -0
index 8c52cbd..bc8ff0a 100644
@@ -672,6 +672,7 @@ enum intel_sbi_destination {
  #define QUIRK_LVDS_SSC_DISABLE (1<<1)
  #define QUIRK_INVERT_BRIGHTNESS (1<<2)
  #define QUIRK_NO_PCH_PWM_ENABLE (1<<3)
+#define QUIRK_IGNORE_VBT_BPP	(1<<4)
 
  struct intel_fbdev;
  struct intel_fbc_work;
drivers/gpu/drm/i915/intel_display.c +12 -0
index 8206ee7..c364377 100644
@@ -10139,6 +10139,15 @@ static void quirk_no_pcm_pwm_enable(struct drm_device *dev)
  	DRM_INFO("applying no-PCH_PWM_ENABLE quirk\n");
  }
 
+/* Some machines (ux31a) advertise the panel should use 18bpp, but it lies.
+ */
+static void quirk_ignore_vbt_bpp(struct drm_device *dev)
+{
+	struct drm_i915_private *dev_priv = dev->dev_private;
+	dev_priv->quirks |= QUIRK_IGNORE_VBT_BPP;
+	DRM_INFO("applying IGNORE_VBT_BPP quirk\n");
+}
+
  struct intel_quirk {
  	int device;
  	int subsystem_vendor;
@@ -10213,6 +10222,9 @@ static struct intel_quirk intel_quirks[] = {
  	{ 0x0116, 0x1028, 0x052e, quirk_no_pcm_pwm_enable },
  	/* Dell XPS13 HD and XPS13 FHD Ivy Bridge */
  	{ 0x0166, 0x1028, 0x058b, quirk_no_pcm_pwm_enable },
+
+	/* Asus Zenbook UX31A Ivybridge eDP */
+	{ 0x0166, 0x1043, 0x1517, quirk_ignore_vbt_bpp },
  };
 
  static void intel_init_quirks(struct drm_device *dev)
drivers/gpu/drm/i915/intel_dp.c +3 -1
index 9770160..fd47be8 100644
@@ -805,7 +805,9 @@ intel_dp_compute_config(struct intel_encoder *encoder,
  	/* Walk through all bpp values. Luckily they're all nicely spaced with 2
  	 * bpc in between. */
  	bpp = pipe_config->pipe_bpp;
-	if (is_edp(intel_dp) && dev_priv->vbt.edp_bpp) {
+	if (is_edp(intel_dp) &&
+	    dev_priv->vbt.edp_bpp &&
+	    (dev_priv->quirks & QUIRK_IGNORE_VBT_BPP) == 0) {
  		DRM_DEBUG_KMS("clamping bpp for eDP panel to BIOS-provided %i\n",
  			      dev_priv->vbt.edp_bpp);
  		bpp = min_t(int, bpp, dev_priv->vbt.edp_bpp);
Signature · 6 lines
1.8.4

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