Skip to content

Commit bc0bb9f

Browse files
jnikuladanvet
authored andcommitted
drm/i915: remove QUIRK_NO_PCH_PWM_ENABLE
The quirk was added as what I'd say was a stopgap measure in commit e85843b Author: Kamal Mostafa <kamal@canonical.com> Date: Fri Jul 19 15:02:01 2013 -0700 drm/i915: quirk no PCH_PWM_ENABLE for Dell XPS13 backlight without really digging into what was going on. Also, as mentioned in the related bug [1], having the quirk regressed some of the machines it was supposed to fix to begin with, and there were patches posted to disable the quirk on such machines [2]! The fact is, we do need the BLM_PCH_PWM_ENABLE bit set to have backlight. With the quirk, we've relied on BIOS to have set it, and our save/restore code to retain it. With the full backlight setup at enable, we have no place for things that rely on previous state. With the per platform hooks, we've also made a change in the PCH platform enable order: setting the backlight duty cycle between CPU and PCH PWM enable. Some experimenting and commit 770c123 Author: Takashi Iwai <tiwai@suse.de> Date: Sat Aug 11 08:56:42 2012 +0200 drm/i915: Fix blank panel at reopening lid indicate that we can't set the backlight before enabling CPU PWM; the value just won't stick. But AFAICT we should do it before enabling the PCH PWM. Finally, any fallout we should fix properly, preferrably without quirks, and absolutely without quirks that rely on existing state. With the per platform hooks have much more flexibility to adjust the sequence as required by platforms. [1] https://bugzilla.kernel.org/show_bug.cgi?id=47941 [2] http://lkml.kernel.org/r/1378229848-29113-1-git-send-email-kamal@canonical.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
1 parent b35684b commit bc0bb9f

File tree

3 files changed

+0
-21
lines changed

3 files changed

+0
-21
lines changed

drivers/gpu/drm/i915/i915_drv.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,6 @@ enum intel_sbi_destination {
717717
#define QUIRK_PIPEA_FORCE (1<<0)
718718
#define QUIRK_LVDS_SSC_DISABLE (1<<1)
719719
#define QUIRK_INVERT_BRIGHTNESS (1<<2)
720-
#define QUIRK_NO_PCH_PWM_ENABLE (1<<3)
721720

722721
struct intel_fbdev;
723722
struct intel_fbc_work;

drivers/gpu/drm/i915/intel_display.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10456,17 +10456,6 @@ static void quirk_invert_brightness(struct drm_device *dev)
1045610456
DRM_INFO("applying inverted panel brightness quirk\n");
1045710457
}
1045810458

10459-
/*
10460-
* Some machines (Dell XPS13) suffer broken backlight controls if
10461-
* BLM_PCH_PWM_ENABLE is set.
10462-
*/
10463-
static void quirk_no_pcm_pwm_enable(struct drm_device *dev)
10464-
{
10465-
struct drm_i915_private *dev_priv = dev->dev_private;
10466-
dev_priv->quirks |= QUIRK_NO_PCH_PWM_ENABLE;
10467-
DRM_INFO("applying no-PCH_PWM_ENABLE quirk\n");
10468-
}
10469-
1047010459
struct intel_quirk {
1047110460
int device;
1047210461
int subsystem_vendor;
@@ -10526,11 +10515,6 @@ static struct intel_quirk intel_quirks[] = {
1052610515
* seem to use inverted backlight PWM.
1052710516
*/
1052810517
{ 0x2a42, 0x1025, PCI_ANY_ID, quirk_invert_brightness },
10529-
10530-
/* Dell XPS13 HD Sandy Bridge */
10531-
{ 0x0116, 0x1028, 0x052e, quirk_no_pcm_pwm_enable },
10532-
/* Dell XPS13 HD and XPS13 FHD Ivy Bridge */
10533-
{ 0x0166, 0x1028, 0x058b, quirk_no_pcm_pwm_enable },
1053410518
};
1053510519

1053610520
static void intel_init_quirks(struct drm_device *dev)

drivers/gpu/drm/i915/intel_panel.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -749,10 +749,6 @@ static void pch_enable_backlight(struct intel_connector *connector)
749749
pch_ctl2 = panel->backlight.max << 16;
750750
I915_WRITE(BLC_PWM_PCH_CTL2, pch_ctl2);
751751

752-
/* XXX: transitional */
753-
if (dev_priv->quirks & QUIRK_NO_PCH_PWM_ENABLE)
754-
return;
755-
756752
pch_ctl1 = 0;
757753
if (panel->backlight.active_low_pwm)
758754
pch_ctl1 |= BLM_PCH_POLARITY;

0 commit comments

Comments
 (0)