Patch for quirking Asus tx300 and others incorrect edp bpp value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patch against Linus' latest git, fixing bug 59841 reported at

The Intel HD Graphics 4000 PCI display controller id 0x0166 appears to return an incorrect edp bpp value 16 instead of the correct 24. This patch adds a quirk for the controller.

Date: Sat, 7 Sep 2013 12:18:31 +0300
Subject: [PATCH] i915: add quirk to ignore incorrect edp_bpp value on Asus
 TX300 and others

Signed-off-by: Jyrki Kuoppala <jkp@xxxxxx>
 drivers/gpu/drm/i915/i915_drv.h      |  1 +
 drivers/gpu/drm/i915/intel_display.c | 16 ++++++++++++++++
 drivers/gpu/drm/i915/intel_dp.c      |  3 ++-
 3 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 52a3785..3784be1 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -651,6 +651,7 @@ enum intel_sbi_destination {
 #define QUIRK_LVDS_SSC_DISABLE (1<<1)
 #define QUIRK_NO_PCH_PWM_ENABLE (1<<3)
+#define QUIRK_IGNORE_EDP_BPP (1<<4)

 struct intel_fbdev;
 struct intel_fbc_work;
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 38452d8..2a8cec3 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9907,6 +9907,17 @@ static void quirk_no_pcm_pwm_enable(struct drm_device *dev)
     DRM_INFO("applying no-PCH_PWM_ENABLE quirk\n");

+ * Some machines (e.g. Asus TX300) incorrectly return 18bpp in UEFI mode
+ * from vbe edp data
+ */
+static void quirk_no_edp_bpp_enable(struct drm_device *dev)
+    struct drm_i915_private *dev_priv = dev->dev_private;
+    dev_priv->quirks |= QUIRK_IGNORE_EDP_BPP;
+    DRM_INFO("applying IGNORE_EDP_BPP quirk\n");
 struct intel_quirk {
     int device;
     int subsystem_vendor;
@@ -9981,6 +9992,11 @@ 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 },
+    /* at least Asus TX300 (0x1042 0x15b7),
+       UX32VD (0x1042 0x1507), Dell XPS13 and Toshiba Kirabook,
+       see */
+    { 0x0166, PCI_ANY_ID, PCI_ANY_ID, quirk_no_edp_bpp_enable },

 static void intel_init_quirks(struct drm_device *dev)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 2151d13..0e0fc37 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -731,7 +731,8 @@ 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_EDP_BPP)) {
         DRM_DEBUG_KMS("clamping bpp for eDP panel to BIOS-provided %i\n",
         bpp = min_t(int, bpp, dev_priv->vbt.edp_bpp);

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at

[Kernel Announce]     [Linux Kernel Newbies]     [Linux Driver Development]     [Devicetree]     [Linux EFI]     [Linux Backports]     [Linux Kbuild]     [Fedora Kernel]     [Linux Kernel Testers]     [Linux SH]     [Linux Omap]     [Linux Tape]     [Linux Input]     [Linux LEDS]     [Linux Kernel Janitors]     [Linux Kernel Packagers]     [Linux Doc]     [Linux Man Pages]     [Linux API]     [Linux Memory Management]     [Linux Modules]     [Linux Standards]     [Netdev]     [Git]     [Linux PCI]     Linux CAN Development     [Linux I2C]     [Linux RDMA]     [Linux NUMA]     [Netfilter]     [Netfilter Devel]     [SELinux]     [Bugtraq]     [FIO]     [Linux Perf Users]     [Linux Serial]     [Linux PPP]     [Linux ISDN]     [Linux Next]     [Stable Kernel]     [Kernel Stable Commits]     [Linux Tip Commits]     [Kernel MM Commits]     [Linux Security Module]     [AutoFS]     [Filesystem Development]     [Ext3 Filesystem]     [Linux bcache]     [Ext4 Filesystem]     [Linux BTRFS]     [Linux CEPH Filesystem]     [Linux XFS]     [XFS]     [Linux NFS]     [Linux CIFS]     [Ecryptfs]     [Linux NILFS]     [Linux Cachefs]     [Reiser FS]     [Initramfs]     [Linux FB Devel]     [Linux OpenGL]     [Intel GFX]     [DRI Devel]     [Fastboot]     [Linux RT Users]     [Linux RT Stable]     [eCos]     [Corosync]     [Linux Clusters]     [LVS Devel]     [Hot Plug]     [Linux Virtualization]     [KVM]     [KVM PPC]     [KVM ia64]     [Linux Containers]     [Linux Hexagon]     [Linux Cgroups]     [Util Linux]     [Wireless]     [Linux Bluetooth]     [Bluez Devel]     [Ethernet Bridging]     [Embedded Linux]     [Barebox]     [Linux MMC]     [Linux IIO]     [Sparse]     [Smatch]     [Trinity Fuzzer Tool]     [Linux Arch]     [x86 Platform Driver]     [Linux ACPI]     [Linux IBM ACPI]     [LM Sensors]     [CPU Freq]     [Linux Power Management]     [Linmodems]     [Linux DCCP]     [Linux SCTP]     [ALSA Devel]     [Linux USB]     [Linux PA RISC]     [Linux Samsung SOC]     [MIPS Linux]     [IBM S/390 Linux]     [ARM Linux]     [ARM Kernel]     [ARM MSM]     [Tegra Devel]     [Sparc Linux]     [Linux Security]     [Linux Sound]     [Linux Media]     [Video 4 Linux]     [Linux IRDA Users]     [Linux for the blind]     [Linux RAID]     [Linux ATA RAID]     [Device Mapper]     [Linux SCSI]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Linux IDE]     [Linux SMP]     [Linux AXP]     [Linux Alpha]     [Linux ia64]     [Linux MetaG]     [Linux M68K]     [Linux 8086]     [Linux x86_64]     [Linux Config]     [Linux Apps]     [Linux MSDOS]     [Linux X.25]     [Linux Crypto]     [DM Crypt]     [Linux Trace Users]     [Linux Btrace]     [Linux Watchdog]     [Utrace Devel]     [Linux C Programming]     [Linux Assembly]     [Dash]     [DWARVES]     [Hail Devel]     [Linux Kernel Debugger]     [Linux gcc]     [Gcc Help]     [X.Org]     [Wine]

Add to Google Powered by Linux

[Older Kernel Discussion]     [Yosemite National Park Forum]     [Large Format Photos]     [Gimp]     [Yosemite Photos]     [Stuff]     [Other Archives]