All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthias Hopf <mhopf@suse.de>
To: Zhang Rui <rui.zhang@intel.com>, Len Brown <lenb@kernel.org>,
	Matthew Garrett <mjg@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Julia Lawall <julia@diku.dk>,
	Oliver
Cc: linux-acpi@vger.kernel.org, linux-pm@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ACPI / PM: Traverse video_device_list for backlight restoration
Date: Tue, 3 Aug 2010 12:11:57 +0200	[thread overview]
Message-ID: <20100803101157.GA29721@suse.de> (raw)
In-Reply-To: <20100803100505.GA26948@suse.de>

A bit of background about this patch:


acpi_video_bus_get_devices() explicitly calls acpi_video_device_enumerate()
before acpi_video_bus_get_one_device(), which does acpi_video_device_bind().

In _enumerate(), active_list[] is created, with .bind_info explicitly set to
NULL, while the related .bind_info entry in video_device_list is set to the
acpi_video_device ptr in _bind().

The .bind_info is later used in acpi_video_resume() to re-set the backlight
- but it's only evaluated on the active_list[], on which all .bind_info are
NULL by construction.  This results in backlight not being restored, if the
BIOS doesn't do this by itself already.


The patch resolves this by replacing the active_list[] traversal by a
video_device_list traversal, but due to the nature of the issue I'm unsure
whether the original issue isn't of more principal quality.  I don't understand
why the list is (partially) transformed into an array in the first place,
especially as both the array *and* the list are used in the code...


Thanks

Matthias

-- 
Matthias Hopf <mhopf@suse.de>      __        __   __
Maxfeldstr. 5 / 90409 Nuernberg   (_   | |  (_   |__          mat@mshopf.de
Phone +49-911-74053-715           __)  |_|  __)  |__  R & D   www.mshopf.de

WARNING: multiple messages have this Message-ID (diff)
From: Matthias Hopf <mhopf@suse.de>
To: Zhang Rui <rui.zhang@intel.com>, Len Brown <lenb@kernel.org>,
	Matthew Garrett <mjg@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Julia Lawall <julia@diku.dk>, Oliver Neukum <oneukum@suse.de>
Cc: linux-acpi@vger.kernel.org, linux-pm@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ACPI / PM: Traverse video_device_list for backlight restoration
Date: Tue, 3 Aug 2010 12:11:57 +0200	[thread overview]
Message-ID: <20100803101157.GA29721@suse.de> (raw)
In-Reply-To: <20100803100505.GA26948@suse.de>

A bit of background about this patch:


acpi_video_bus_get_devices() explicitly calls acpi_video_device_enumerate()
before acpi_video_bus_get_one_device(), which does acpi_video_device_bind().

In _enumerate(), active_list[] is created, with .bind_info explicitly set to
NULL, while the related .bind_info entry in video_device_list is set to the
acpi_video_device ptr in _bind().

The .bind_info is later used in acpi_video_resume() to re-set the backlight
- but it's only evaluated on the active_list[], on which all .bind_info are
NULL by construction.  This results in backlight not being restored, if the
BIOS doesn't do this by itself already.


The patch resolves this by replacing the active_list[] traversal by a
video_device_list traversal, but due to the nature of the issue I'm unsure
whether the original issue isn't of more principal quality.  I don't understand
why the list is (partially) transformed into an array in the first place,
especially as both the array *and* the list are used in the code...


Thanks

Matthias

-- 
Matthias Hopf <mhopf@suse.de>      __        __   __
Maxfeldstr. 5 / 90409 Nuernberg   (_   | |  (_   |__          mat@mshopf.de
Phone +49-911-74053-715           __)  |_|  __)  |__  R & D   www.mshopf.de

  reply	other threads:[~2010-08-03 10:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-03 10:05 [PATCH] ACPI / PM: Traverse video_device_list for backlight restoration Matthias Hopf
2010-08-03 10:11 ` Matthias Hopf [this message]
2010-08-03 10:11   ` Matthias Hopf
2010-08-04  1:27   ` Zhang Rui
2010-08-04  1:27   ` Zhang Rui
2010-08-04 11:00     ` Matthias Hopf
2010-08-04 11:00     ` Matthias Hopf
2010-08-03 10:11 ` Matthias Hopf
  -- strict thread matches above, loose matches on Subject: below --
2010-08-03 10:05 Matthias Hopf

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=20100803101157.GA29721@suse.de \
    --to=mhopf@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=julia@diku.dk \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=mjg@redhat.com \
    --cc=rui.zhang@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.