public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Kamal Mostafa <kamal@canonical.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Robert Hooker <robert.hooker@canonical.com>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 2/2] drm/i915: quirk disable i915 backlight on Dell XPS 13z
Date: Fri, 27 Apr 2012 13:56:09 -0700	[thread overview]
Message-ID: <1335560169.3877.99.camel@fourier> (raw)
In-Reply-To: <1335374922-7905-2-git-send-email-kamal@canonical.com>

On Thu, 2012-04-26 at 22:07 +0200, Daniel Vetter wrote:
> ...
> To cut things short: This time around I want more justification for the
> quirk than just "this makes this one machine work somehow".


A bit more detail...

On this Dell XPS 13z "Ultrabook" (sandybridge_m 0x0116) when
intel_backlight/brightness gets stuffed with any value except 0 or
max_brightness, the backlight cycles between flashing (like a strobe
light!) and then pulsating (bright to dim to bright).  That
flashing/pulsating cycle repeats continuously, about every 2 seconds.
The behavior is affected by the value stuffed into brightness more or
less along the lines of:

   0: very dim, totally stable
   1: flashes like crazy for about 1.5 sec, then pulsates for 0.5 sec
1000: flashes for about 0.5 sec, then pulsates for about 1.5 sec
2000: flashes very briefly, then pulsates for about 2 sec
3000: flickers, then pulsates for about 2 sec
4000  pulsates continuously, every 2 sec
4882: (max_brightness) full brightness, stable

This behavior manifests both in X and in a text VT, and occurs with or
without the presence of other backlight interfaces besides
intel_backlight.  It does not appear to me to be a userspace problem.

The additional wrinkle is that this machine presents an acpi_video0
backlight interface as well, and it even works properly -- but *only*
after you specifically stuff 0 into intel_backlight/brightness (or if
intel_backlight is disabled by the proposed quirk).

Any non-zero intel_backlight/brightness value prevents acpi_video0 from
working.  When intel_backlight is set to max_brightness (like at boot),
acpi_video0/brightness seems to have no effect at all; when
intel_backlight is set to other non-zero values, the flashing/pulsating
behavior occurs.

I'd be (quite) happy to test a proper intel_backlight fix, but in the
meantime disabling it by quirk seems appropriate for this machine, since
that allows the acpi_video0 interface to work out of the box.

Thanks for considering it,

 -Kamal


On Wed, 2012-04-25 at 10:28 -0700, Kamal Mostafa wrote:
> From: Robert Hooker <robert.hooker@canonical.com>
> 
> Dell XPS 13z exhibits problems (backlight flashing/pulsating) when
> intel_backlight is enabled at all, so disable it.
> 
> BugLink: https://launchpad.net/bugs/954661
> Signed-off-by: Robert Hooker <robert.hooker@canonical.com>
> Signed-off-by: Kamal Mostafa <kamal@canonical.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c |   17 +++++++++++++++++
>  1 files changed, 17 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 5908cd5..0c4cac4 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -9100,6 +9100,19 @@ static void quirk_ssc_force_disable(struct drm_device *dev)
>  	struct drm_i915_private *dev_priv = dev->dev_private;
>  	dev_priv->quirks |= QUIRK_LVDS_SSC_DISABLE;
>  }
> + 
> +/*
> + * Some machines (Dell XPS 13z) exhibit problems with i915 control of the
> + * backlight registers; Others may need the intel_backlight interface
> + * disabled for some other reason.
> + */
> +static void quirk_backlight_disable(struct drm_device *dev)
> +{
> +	if (i915_enable_backlight == -1) {
> +	    i915_enable_backlight = 0;
> +	    DRM_DEBUG_DRIVER("disabling intel_backlight interface via quirk\n");
> +	}
> +}
>  
>  struct intel_quirk {
>  	int device;
> @@ -9133,6 +9146,10 @@ struct intel_quirk intel_quirks[] = {
>  
>  	/* Sony Vaio Y cannot use SSC on LVDS */
>  	{ 0x0046, 0x104d, 0x9076, quirk_ssc_force_disable },
> +
> +	/* Dell XPS 13z needs to disable the intel_backlight interface
> +	   (LP: #954661) */
> +	{ 0x0116, 0x1028, 0x052e, quirk_backlight_disable },
>  };
>  
>  static void intel_init_quirks(struct drm_device *dev)

  reply	other threads:[~2012-04-27 20:56 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 [this message]
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

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=1335560169.3877.99.camel@fourier \
    --to=kamal@canonical.com \
    --cc=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=robert.hooker@canonical.com \
    /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