public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Meyer <thomas@m3y3r.de>
To: Joe Perches <joe@perches.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Jesse Barnes <jbarnes@virtuousgeek.org>,
	Eric Anholt <eric@anholt.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"Rafael J. Wysocki" <rjw@sisk.pl>
Subject: Re: [PATCH] i915: slow acpi_lid_open() causes flickering
Date: Tue, 02 Feb 2010 18:33:15 +0100	[thread overview]
Message-ID: <1265131995.5910.8.camel@localhost.localdomain> (raw)
In-Reply-To: <1265069248.25140.407.camel@Joe-Laptop.home>

Am Montag, den 01.02.2010, 16:07 -0800 schrieb Joe Perches:
> On Mon, 2010-02-01 at 14:33 -0800, Andrew Morton wrote:
> > On Mon, 01 Feb 2010 19:20:53 +0100
> > Thomas Meyer <thomas@m3y3r.de> wrote:
> > > acpi_lid_open() could take up to 10ms on my computer.
> > > Some component is calling the drm GETCONNECTOR ioctl many times in a row.
> > > This results in flickering (for example, when starting a video).
> > > Fix it by assuming an always connected lid status.
> > > 
> > > This fixes bug http://bugzilla.kernel.org/show_bug.cgi?id=14670
> > > 
> > > ---
> > >  drivers/gpu/drm/i915/intel_lvds.c |   15 ++++++++++++++-
> > >  1 files changed, 14 insertions(+), 1 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
> > > index aa74e59..0f0779c 100644
> > > --- a/drivers/gpu/drm/i915/intel_lvds.c
> > > +++ b/drivers/gpu/drm/i915/intel_lvds.c
> []
> > > @@ -643,7 +655,8 @@ static enum drm_connector_status intel_lvds_detect(struct drm_connector *connect
> > >  {
> > >  	enum drm_connector_status status = connector_status_connected;
> > >  
> > > -	if (!acpi_lid_open() && !dmi_check_system(bad_lid_status))
> > > +	if (!dmi_check_system(slow_lid_status) && !dmi_check_system(bad_lid_status))
> > > +	    if (!acpi_lid_open())
> > >  		status = connector_status_disconnected;
> > >  
> > >  	return status;
> 
> Shouldn't this use an && test instead of a 4 space indent of a new statement?
> 
> +	if (!dmi_check_system(slow_lid_status) && !dmi_check_system(bad_lid_status) &&
> +	    !acpi_lid_open())
> 

Won't this lead to the execution of dmi_check_system() AND
dmi_check_system() AND acpi_lid_open() every time the
intel_lvds_detect() function is called?

And this is what I want to prevent: Do not call acpi_lid_open(), when
the system is found in the dmi table.

What do you think?

mfg
thomas



  reply	other threads:[~2010-02-02 17:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-01 18:20 [PATCH] i915: slow acpi_lid_open() causes flickering Thomas Meyer
2010-02-01 22:33 ` Andrew Morton
2010-02-02  0:00   ` Justin P. Mattock
2010-02-02 17:30     ` Thomas Meyer
2010-02-02  0:07   ` Joe Perches
2010-02-02 17:33     ` Thomas Meyer [this message]
2010-02-04 15:43 ` Eric Anholt

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=1265131995.5910.8.camel@localhost.localdomain \
    --to=thomas@m3y3r.de \
    --cc=akpm@linux-foundation.org \
    --cc=eric@anholt.net \
    --cc=jbarnes@virtuousgeek.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    /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