From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Nick Bowler <nbowler@elliptictech.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>,
Linus Torvalds <torvalds@linux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
airlied@linux.ie, eric@anholt.net,
intel-gfx@lists.freedesktop.org
Subject: [PATCH] drm/i915: disable LVDS downclock by default
Date: Thu, 14 Jan 2010 12:48:02 -0800 [thread overview]
Message-ID: <20100114124802.025bbcae@jbarnes-piketon> (raw)
In-Reply-To: <20100114202803.GA1749@emergent.ellipticsemi.com>
Many platform support this feature, and it can provide significant
power savings when the reduced refresh rate is low. However, on some
platforms a secondary (reduced) timing is provided but not actually
supported by the hardware. This results in undesirable flicker at
runtime.
So disable the feature by default, but allow users to opt-in to the
reduced clock behavior with a new module parameter, lvds_downclock,
that can be set to 1 to enable the feature.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
--
Nick and Pekka, please try this out and reply with your Tested-by
(assuming it works, if not I'll fix it up).
Thanks,
Jesse
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 66f7bac..46d8896 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -45,6 +45,9 @@ module_param_named(fbpercrtc, i915_fbpercrtc, int, 0400);
unsigned int i915_powersave = 1;
module_param_named(powersave, i915_powersave, int, 0400);
+unsigned int i915_lvds_downclock = 0;
+module_param_named(lvds_downclock, i915_lvds_downclock, int, 0400);
+
static struct drm_driver driver;
#define INTEL_VGA_DEVICE(id, info) { \
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 445c49c..5f781a7 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -722,6 +722,7 @@ extern struct drm_ioctl_desc i915_ioctls[];
extern int i915_max_ioctl;
extern unsigned int i915_fbpercrtc;
extern unsigned int i915_powersave;
+extern unsigned int i915_lvds_downclock;
extern void i915_save_display(struct drm_device *dev);
extern void i915_restore_display(struct drm_device *dev);
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index f275677..b53c46f 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -197,7 +197,8 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
memset(temp_mode, 0, sizeof(*temp_mode));
}
kfree(temp_mode);
- if (temp_downclock < panel_fixed_mode->clock) {
+ if (temp_downclock < panel_fixed_mode->clock &&
+ i915_lvds_downclock) {
dev_priv->lvds_downclock_avail = 1;
dev_priv->lvds_downclock = temp_downclock;
DRM_DEBUG_KMS("LVDS downclock is found in VBT. ",
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index 5041590..aa74e59 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -926,7 +926,8 @@ static void intel_find_lvds_downclock(struct drm_device *dev,
}
}
mutex_unlock(&dev->mode_config.mutex);
- if (temp_downclock < panel_fixed_mode->clock) {
+ if (temp_downclock < panel_fixed_mode->clock &&
+ i915_lvds_downclock) {
/* We found the downclock for LVDS. */
dev_priv->lvds_downclock_avail = 1;
dev_priv->lvds_downclock = temp_downclock;
next prev parent reply other threads:[~2010-01-14 20:48 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-13 5:44 Linux 2.6.33-rc4 Linus Torvalds
2010-01-13 20:21 ` Linux 2.6.33-rc4, boot regression still exists Gene Heskett
2010-01-13 21:03 ` Linux 2.6.33-rc4 Pekka Enberg
2010-01-13 21:33 ` Jesse Barnes
2010-01-13 21:50 ` Pekka Enberg
2010-01-14 0:55 ` Jesse Barnes
2010-01-14 19:15 ` Pekka Enberg
2010-01-14 19:26 ` Jesse Barnes
2010-01-14 19:31 ` Nick Bowler
2010-01-14 20:18 ` Pekka Enberg
2010-01-14 20:28 ` Nick Bowler
2010-01-14 20:48 ` Jesse Barnes [this message]
2010-01-14 20:58 ` [Intel-gfx] [PATCH] drm/i915: disable LVDS downclock by default Peter Clifton
2010-01-14 21:05 ` Linus Torvalds
2010-01-14 21:21 ` Jesse Barnes
2010-01-14 21:16 ` Nick Bowler
2010-01-14 21:27 ` Jesse Barnes
2010-01-14 21:25 ` Pekka Enberg
2010-01-14 21:51 ` Jesse Barnes
2010-01-15 1:15 ` Nick Bowler
2010-01-15 8:54 ` Pekka Enberg
2010-01-15 16:14 ` Thomas Meyer
2010-01-15 16:21 ` Pekka Enberg
2010-01-15 16:32 ` Nick Bowler
2010-01-15 16:46 ` Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100114124802.025bbcae@jbarnes-piketon \
--to=jbarnes@virtuousgeek.org \
--cc=airlied@linux.ie \
--cc=eric@anholt.net \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nbowler@elliptictech.com \
--cc=penberg@cs.helsinki.fi \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®