From: Kamal Mostafa <kamal@canonical.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 1/2] drm/i915: i915.enable_backlight=0 disables intel_backlight
Date: Mon, 14 May 2012 11:53:50 -0700 [thread overview]
Message-ID: <1337021630.8218.22.camel@fourier> (raw)
In-Reply-To: <20120426200729.GM5156@phenom.ffwll.local>
[-- Attachment #1.1: Type: text/plain, Size: 4688 bytes --]
Hi Daniel-
Reminding you of this patch...
The new i915.enable_backlight modparam introduced in patch 1/2 is
generally useful, regardless of whether we quirk-enable as done in patch
2/2. Its already been used successfully for a different machine[0] with
a different backlight problem.
Please consider applying this patch 1/2.
Thanks,
-Kamal
[0] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/954661/comments/27
On Thu, 2012-04-26 at 22:07 +0200, Daniel Vetter wrote:
> On Wed, Apr 25, 2012 at 10:28:41AM -0700, Kamal Mostafa wrote:
> > i915.enable_backlight=0 can be used to disable i915 backlight control
> > and the /sys/class/backlight/intel_backlight interface -- useful for
> > systems where intel_backight conflicts with BIOS backlight control.
> >
> > BugLink: https://launchpad.net/bugs/954661
> > Signed-off-by: Kamal Mostafa <kamal@canonical.com>
>
> Ok, I've just gone through the fun of merging a set of backlight quirks a
> few weeks back. Then noticed that an awful lot of machines seem to be
> affected and later on read about a few interesting bits in the
> documentation. Turns out the hw is all good, it's just the driver totally
> mishandling the backlight.
>
> To cut things short: This time around I want more justification for the
> quirk than just "this makes this one machine work somehow".
> -Daniel
>
> > ---
> > drivers/gpu/drm/i915/i915_drv.c | 6 ++++++
> > drivers/gpu/drm/i915/i915_drv.h | 1 +
> > drivers/gpu/drm/i915/intel_panel.c | 12 ++++++++++++
> > 3 files changed, 19 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> > index ae8a64f..ddb947b 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.c
> > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > @@ -112,6 +112,12 @@ module_param_named(i915_enable_ppgtt, i915_enable_ppgtt, int, 0600);
> > MODULE_PARM_DESC(i915_enable_ppgtt,
> > "Enable PPGTT (default: true)");
> >
> > +int i915_enable_backlight __read_mostly = -1;
> > +module_param_named(enable_backlight, i915_enable_backlight, int, 0644);
> > +MODULE_PARM_DESC(enable_backlight,
> > + "Enable backlight control and the intel_backlight interface. "
> > + "(default: -1 (auto))");
> > +
> > static struct drm_driver driver;
> > extern int intel_agp_enabled;
> >
> > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> > index 5fabc6c..6e52a42 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.h
> > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > @@ -1087,6 +1087,7 @@ extern int i915_enable_rc6 __read_mostly;
> > extern int i915_enable_fbc __read_mostly;
> > extern bool i915_enable_hangcheck __read_mostly;
> > extern int i915_enable_ppgtt __read_mostly;
> > +extern int i915_enable_backlight __read_mostly;
> >
> > extern int i915_suspend(struct drm_device *dev, pm_message_t state);
> > extern int i915_resume(struct drm_device *dev);
> > diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
> > index 48177ec..fcecbd2 100644
> > --- a/drivers/gpu/drm/i915/intel_panel.c
> > +++ b/drivers/gpu/drm/i915/intel_panel.c
> > @@ -259,6 +259,9 @@ void intel_panel_disable_backlight(struct drm_device *dev)
> > {
> > struct drm_i915_private *dev_priv = dev->dev_private;
> >
> > + if (!i915_enable_backlight)
> > + return;
> > +
> > dev_priv->backlight_enabled = false;
> > intel_panel_actually_set_backlight(dev, 0);
> > }
> > @@ -267,6 +270,9 @@ void intel_panel_enable_backlight(struct drm_device *dev)
> > {
> > struct drm_i915_private *dev_priv = dev->dev_private;
> >
> > + if (!i915_enable_backlight)
> > + return;
> > +
> > if (dev_priv->backlight_level == 0)
> > dev_priv->backlight_level = intel_panel_get_max_backlight(dev);
> >
> > @@ -333,6 +339,9 @@ int intel_panel_setup_backlight(struct drm_device *dev)
> > struct backlight_properties props;
> > struct drm_connector *connector;
> >
> > + if (!i915_enable_backlight)
> > + return 0;
> > +
> > intel_panel_init_backlight(dev);
> >
> > if (dev_priv->int_lvds_connector)
> > @@ -368,6 +377,9 @@ void intel_panel_destroy_backlight(struct drm_device *dev)
> > #else
> > int intel_panel_setup_backlight(struct drm_device *dev)
> > {
> > + if (!i915_enable_backlight)
> > + return;
> > +
> > intel_panel_init_backlight(dev);
> > return 0;
> > }
> > --
> > 1.7.5.4
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2012-05-14 18:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-25 17:28 [PATCH 1/2] drm/i915: i915.enable_backlight=0 disables intel_backlight Kamal Mostafa
2012-04-25 17:28 ` [PATCH 2/2] drm/i915: quirk disable i915 backlight on Dell XPS 13z Kamal Mostafa
2012-04-27 20:56 ` Kamal Mostafa
2012-04-27 21:25 ` Daniel Vetter
2012-04-27 21:55 ` Kamal Mostafa
2012-05-14 18:54 ` Kamal Mostafa
2012-04-26 20:07 ` [PATCH 1/2] drm/i915: i915.enable_backlight=0 disables intel_backlight Daniel Vetter
2012-04-27 20:55 ` Kamal Mostafa
2012-05-14 18:53 ` Kamal Mostafa [this message]
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=1337021630.8218.22.camel@fourier \
--to=kamal@canonical.com \
--cc=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.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