From: Chris Wilson <chris@chris-wilson.co.uk>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Jani Nikula <jani.nikula@intel.com>,
intel-gfx <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 2/4] drm/i915: protect backlight registers and data with a spinlock
Date: Mon, 15 Apr 2013 21:49:38 +0100 [thread overview]
Message-ID: <20130415204938.GC4106@cantiga.alporthouse.com> (raw)
In-Reply-To: <CAKMK7uHrAasyoueABg0xtk1GfgSQuLPX=GHGrbqnDkotP01f7g@mail.gmail.com>
On Mon, Apr 15, 2013 at 06:59:58PM +0200, Daniel Vetter wrote:
> On Mon, Apr 15, 2013 at 6:38 PM, Jani Nikula <jani.nikula@intel.com> wrote:
> > On Mon, 15 Apr 2013, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> >> On Fri, Apr 12, 2013 at 03:18:37PM +0300, Jani Nikula wrote:
> >>> Backlight data and registers are fiddled through LVDS/eDP modeset
> >>> enable/disable hooks, backlight sysfs files, asle interrupts, and register
> >>> save/restore. Protect the backlight related registers and driver private
> >>> fields using a spinlock.
> >>>
> >>> The locking in register save/restore covers a little more than is strictly
> >>> necessary, including non-modeset case, for simplicity.
> >>>
> >>> v2: Cover register access, save/restore, i915_read_blc_pwm_ctl() and code
> >>> paths leading there.
> >>>
> >>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> >>
> >> Looks reasonable.
> >>
> >> intel_panel_actually_set_backlight() should have a WARN_ON(!spinlocked);
> >>
> >> The irqness of the register writes scares me slightly - since the IRQ in
> >> question is from ACPI and we have a few bug reports along the lines of
> >> "backlight makes the entire system sluggish" i.e. commonly associated
> >> with bad interrupt handling. Whilst you are looking at updating the
> >> backlight programming, can you look at pushing the writes from out
> >> of the interrupt handler?
> >
> > So, add a work to do the register writes, and change the spinlock into a
> > mutex while at it? Should be fairly simple, if you think that's the way
> > to go.
>
> I think I'll go ahead with the spinlock fix here for 3.10 and we can
> look into offloading this all for 3.11. Also, Chris do you remember
> one of these reports - I've kinda never noticed that particular kind
> of suck?
I maybe way off the mark and the cause is likely just to be a sucky ACPI
firmware:
https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1019370
spinlock -> mutex + workqueue would mitigate against any bad firmware
being run under irq context.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
next prev parent reply other threads:[~2013-04-15 20:49 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-12 12:18 [PATCH 0/4] drm/i915: backlight locking, cleanup Jani Nikula
2013-04-12 12:18 ` [PATCH 1/4] drm/i915: keep max backlight internal to intel_panel.c Jani Nikula
2013-04-12 12:32 ` Chris Wilson
2013-04-12 12:18 ` [PATCH 2/4] drm/i915: protect backlight registers and data with a spinlock Jani Nikula
2013-04-15 13:03 ` Chris Wilson
2013-04-15 16:38 ` Jani Nikula
2013-04-15 16:59 ` Daniel Vetter
2013-04-15 20:49 ` Chris Wilson [this message]
2013-04-15 21:40 ` Daniel Vetter
2013-04-25 12:13 ` Daniel Vetter
2013-04-12 12:18 ` [PATCH 3/4] drm/i915: ensure single initialization and cleanup of backlight device Jani Nikula
2013-04-15 6:33 ` Jani Nikula
2013-04-15 7:33 ` Daniel Vetter
2013-04-12 12:18 ` [PATCH 4/4] drm/i915: hsw backlight registers need transcoder instead of pipe Jani Nikula
2013-04-25 13:14 ` Imre Deak
2013-04-25 13:34 ` Daniel Vetter
2013-04-25 13:45 ` Daniel Vetter
2013-04-25 13:49 ` [PATCH v2] " Jani Nikula
2013-04-25 14:07 ` Imre Deak
2013-04-25 14:13 ` Daniel Vetter
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=20130415204938.GC4106@cantiga.alporthouse.com \
--to=chris@chris-wilson.co.uk \
--cc=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.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