All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Aaron Lu <aaron.lu@intel.com>, "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: linux-acpi@vger.kernel.org, intel-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"Matthew Garrett" <matthew.garrett@nebula.com>,
	"Seth Forshee" <seth.forshee@canonical.com>,
	"Lee Chun-Yi" <joeyli.kernel@gmail.com>,
	"Richard Purdie" <rpurdie@rpsys.net>,
	"Igor Gnatenko" <i.gnatenko.brain@gmail.com>,
	"Yves-Alexis Perez" <corsac@debian.org>,
	"Felipe Contreras" <felipe.contreras@gmail.com>,
	"Ben Jencks" <ben@bjencks.net>,
	"Steven Newbury" <steve@snewbury.org.uk>,
	"James Hogan" <james@albanarts.com>,
	"Kamal Mostafa" <kamal@canonical.com>,
	"Joerg Platte" <jplatte@naasa.net>,
	"Kalle Valo" <kvalo@adurom.com>,
	"Martin Steigerwald" <Martin@lichtvoll.de>,
	"Jörg Otte" <jrg.otte@gmail.com>,
	"Mike Galbraith" <bitbucket@online.de>,
	platform-driver-x86@vger.kernel.org,
	"Mika Westerberg" <mika.westerberg@linux.intel.com>
Subject: Re: [PATCH v4 1/4] backlight: introduce backlight_device_registered
Date: Thu, 10 Oct 2013 08:23:02 +0300	[thread overview]
Message-ID: <874n8p66o9.fsf@intel.com> (raw)
In-Reply-To: <525632AE.2080909@intel.com>

On Thu, 10 Oct 2013, Aaron Lu <aaron.lu@intel.com> wrote:
> On 10/10/2013 12:29 PM, Jani Nikula wrote:
>> On Thu, 10 Oct 2013, Aaron Lu <aaron.lu@intel.com> wrote:
>>> On 10/10/2013 08:25 AM, Rafael J. Wysocki wrote:
>>>> On Tuesday, October 08, 2013 02:39:58 PM Aaron Lu wrote:
>>>>> +bool backlight_device_registered(enum backlight_type type)
>>>>> +{
>>>>> +	bool found = false;
>>>>> +	struct backlight_device *bd;
>>>>> +
>>>>> +	mutex_lock(&bd_list_mutex);
>>>>> +	list_for_each_entry(bd, &bd_list_head, entry) {
>>>>> +		if (bd->props.type == type) {
>>>>> +			found = true;
>>>>> +			break;
>>>>> +		}
>>>>> +	}
>>>>
>>>> Isn't it useful to be able to register more than one backlight device of the
>>>> same type sometimes?
>>>
>>> I think so for some kind of computers. OTOH, the above function should
>>> be enough for the problem we are solving here, if someday we need to
>>> differentiate, we can enhance the code then.
>> 
>> Since both Baytrail and Haswell already have two backlight PWMs, this
>> may be needed sooner than you think. But we shouldn't let that block
>
> Do we need to differentiate which backlight PWM is registered to decide
> if ACPI video backlight interface should be skipped? My understanding is
> no.

That's correct. If things change, we can fix it then.

Jani.


>
> Thanks,
> Aaron
>
>> fixing the more urgent issue we have now. So I'm fine with this. It
>> doesn't prevent one from registering more than one device of the same
>> type anyway.
>> 
>> BR,
>> Jani.
>> 
>> 
>> 
>

-- 
Jani Nikula, Intel Open Source Technology Center

WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Aaron Lu <aaron.lu@intel.com>, "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: linux-acpi@vger.kernel.org, intel-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"Matthew Garrett" <matthew.garrett@nebula.com>,
	"Seth Forshee" <seth.forshee@canonical.com>,
	"Lee Chun-Yi" <joeyli.kernel@gmail.com>,
	"Richard Purdie" <rpurdie@rpsys.net>,
	"Igor Gnatenko" <i.gnatenko.brain@gmail.com>,
	"Yves-Alexis Perez" <corsac@debian.org>,
	"Felipe Contreras" <felipe.contreras@gmail.com>,
	"Ben Jencks" <ben@bjencks.net>,
	"Steven Newbury" <steve@snewbury.org.uk>,
	"James Hogan" <james@albanarts.com>,
	"Kamal Mostafa" <kamal@canonical.com>,
	"Joerg Platte" <jplatte@naasa.net>,
	"Kalle Valo" <kvalo@adurom.com>,
	"Martin Steigerwald" <Martin@lichtvoll.de>,
	"Jörg Otte" <jrg.otte@gmail.com>,
	"Mike Galbraith" <bitbucket@online.de>,
	platform-driver-x86@vger.kernel.org,
	"Mika Westerberg" <mika.westerberg@linux.intel.com>,
	"Henrique de Moraes Holschuh" <hmh@hmh.eng.br>
Subject: Re: [PATCH v4 1/4] backlight: introduce backlight_device_registered
Date: Thu, 10 Oct 2013 08:23:02 +0300	[thread overview]
Message-ID: <874n8p66o9.fsf@intel.com> (raw)
In-Reply-To: <525632AE.2080909@intel.com>

On Thu, 10 Oct 2013, Aaron Lu <aaron.lu@intel.com> wrote:
> On 10/10/2013 12:29 PM, Jani Nikula wrote:
>> On Thu, 10 Oct 2013, Aaron Lu <aaron.lu@intel.com> wrote:
>>> On 10/10/2013 08:25 AM, Rafael J. Wysocki wrote:
>>>> On Tuesday, October 08, 2013 02:39:58 PM Aaron Lu wrote:
>>>>> +bool backlight_device_registered(enum backlight_type type)
>>>>> +{
>>>>> +	bool found = false;
>>>>> +	struct backlight_device *bd;
>>>>> +
>>>>> +	mutex_lock(&bd_list_mutex);
>>>>> +	list_for_each_entry(bd, &bd_list_head, entry) {
>>>>> +		if (bd->props.type == type) {
>>>>> +			found = true;
>>>>> +			break;
>>>>> +		}
>>>>> +	}
>>>>
>>>> Isn't it useful to be able to register more than one backlight device of the
>>>> same type sometimes?
>>>
>>> I think so for some kind of computers. OTOH, the above function should
>>> be enough for the problem we are solving here, if someday we need to
>>> differentiate, we can enhance the code then.
>> 
>> Since both Baytrail and Haswell already have two backlight PWMs, this
>> may be needed sooner than you think. But we shouldn't let that block
>
> Do we need to differentiate which backlight PWM is registered to decide
> if ACPI video backlight interface should be skipped? My understanding is
> no.

That's correct. If things change, we can fix it then.

Jani.


>
> Thanks,
> Aaron
>
>> fixing the more urgent issue we have now. So I'm fine with this. It
>> doesn't prevent one from registering more than one device of the same
>> type anyway.
>> 
>> BR,
>> Jani.
>> 
>> 
>> 
>

-- 
Jani Nikula, Intel Open Source Technology Center

  reply	other threads:[~2013-10-10  5:26 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-08  6:39 [PATCH v4 0/4] Fix Win8 backlight issue Aaron Lu
2013-10-08  6:39 ` Aaron Lu
2013-10-08  6:39 ` [PATCH v4 1/4] backlight: introduce backlight_device_registered Aaron Lu
2013-10-08  6:39   ` Aaron Lu
2013-10-10  0:25   ` Rafael J. Wysocki
2013-10-10  0:25     ` Rafael J. Wysocki
2013-10-10  0:54     ` Aaron Lu
2013-10-10  0:54       ` Aaron Lu
2013-10-10  1:07       ` Rafael J. Wysocki
2013-10-10  1:07         ` Rafael J. Wysocki
2013-10-10  4:29       ` Jani Nikula
2013-10-10  4:29         ` Jani Nikula
2013-10-10  4:53         ` Aaron Lu
2013-10-10  4:53           ` Aaron Lu
2013-10-10  5:23           ` Jani Nikula [this message]
2013-10-10  5:23             ` Jani Nikula
2013-10-08  6:39 ` [PATCH v4 2/4] ACPI / video: seperate backlight control and event interface Aaron Lu
2013-10-08  6:39   ` Aaron Lu
2013-10-08  6:40 ` [PATCH v4 3/4] ACPI / video: Do not register backlight if win8 and native interface exists Aaron Lu
2013-10-08  6:40   ` Aaron Lu
2013-10-10  0:29   ` Rafael J. Wysocki
2013-10-10  0:29     ` Rafael J. Wysocki
2013-10-10  1:02     ` Aaron Lu
2013-10-10  1:02       ` Aaron Lu
2013-10-10 12:59       ` Rafael J. Wysocki
2013-10-10 12:59         ` Rafael J. Wysocki
2013-10-11  1:09         ` Aaron Lu
2013-10-11  1:09           ` Aaron Lu
2013-10-08  6:40 ` [PATCH v4 4/4] thinkpad-acpi: fix handle locate for video and query of _BCL Aaron Lu
2013-10-08  6:40   ` Aaron Lu

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=874n8p66o9.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=Martin@lichtvoll.de \
    --cc=aaron.lu@intel.com \
    --cc=ben@bjencks.net \
    --cc=bitbucket@online.de \
    --cc=corsac@debian.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=felipe.contreras@gmail.com \
    --cc=i.gnatenko.brain@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=james@albanarts.com \
    --cc=joeyli.kernel@gmail.com \
    --cc=jplatte@naasa.net \
    --cc=jrg.otte@gmail.com \
    --cc=kamal@canonical.com \
    --cc=kvalo@adurom.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew.garrett@nebula.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=rpurdie@rpsys.net \
    --cc=seth.forshee@canonical.com \
    --cc=steve@snewbury.org.uk \
    /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.