From ca8656591ec3ee5c076e0c53aa7c7368a5a4629e Mon Sep 17 00:00:00 2001 From: Alberto Aguirre Date: Mon, 27 Jan 2014 10:42:46 -0600 Subject: [PATCH] drm/i915: Add quirk for ASUS UX302LA(G) to fix blank screen Add quirk for ASUS UX302LA(G) models to ignore eDP bpp clamping to the BIOS provided values as blank screen issues occur otherwise during modesetting or suspend/resume. Signed-off-by: Alberto Aguirre --- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_display.c | 14 ++++++++++++++ drivers/gpu/drm/i915/intel_dp.c | 3 ++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 523fb16..0bcfc78 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -764,6 +764,7 @@ enum intel_sbi_destination { #define QUIRK_PIPEA_FORCE (1<<0) #define QUIRK_LVDS_SSC_DISABLE (1<<1) #define QUIRK_INVERT_BRIGHTNESS (1<<2) +#define QUIRK_IGNORE_BPP_CLAMPING (1<<3) 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 122f871..441b597 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -10884,6 +10884,17 @@ static void quirk_invert_brightness(struct drm_device *dev) DRM_INFO("applying inverted panel brightness quirk\n"); } +/* + * Some machines (ASUS UX302LA/LG) have blank screen issues + * when running at the 18bpp as advertised by BIOS. + */ +static void quirk_ignore_bpp_clamping(struct drm_device *dev) +{ + struct drm_i915_private *dev_priv = dev->dev_private; + dev_priv->quirks |= QUIRK_IGNORE_BPP_CLAMPING; + DRM_INFO("applying ignoring bpp clamping quirk\n"); +} + struct intel_quirk { int device; int subsystem_vendor; @@ -10955,6 +10966,9 @@ static struct intel_quirk intel_quirks[] = { /* Acer Aspire 5336 */ { 0x2a42, 0x1025, 0x048a, quirk_invert_brightness }, + + /* ASUS UX302LA/UX302LG */ + { 0x0a16, 0x1043, 0x13ad, quirk_ignore_bpp_clamping }, }; 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 3760890..437d184 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -879,7 +879,8 @@ intel_dp_compute_config(struct intel_encoder *encoder, * bpc in between. */ bpp = pipe_config->pipe_bpp; if (is_edp(intel_dp) && dev_priv->vbt.edp_bpp && - dev_priv->vbt.edp_bpp < bpp) { + dev_priv->vbt.edp_bpp < bpp && + !(dev_priv->quirks & QUIRK_IGNORE_BPP_CLAMPING)) { DRM_DEBUG_KMS("clamping bpp for eDP panel to BIOS-provided %i\n", dev_priv->vbt.edp_bpp); bpp = dev_priv->vbt.edp_bpp; -- 1.8.5.3