All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Aaron Lu <aaron.lu@intel.com>, Zhang Rui <rui.zhang@intel.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <lenb@kernel.org>, Dave Airlie <airlied@redhat.com>,
	Ben Skeggs <bskeggs@redhat.com>
Cc: linux-acpi@vger.kernel.org, stable@vger.kernel.org,
	Jani Nikula <jani.nikula@linux.intel.com>
Subject: Re: [PATCH] acpi-video: Add use native backlight quirk for the ThinkPad W530
Date: Thu, 15 May 2014 11:34:39 +0200	[thread overview]
Message-ID: <53748A2F.5020608@redhat.com> (raw)
In-Reply-To: <53748148.2020402@redhat.com>

Hi,

On 05/15/2014 10:56 AM, Hans de Goede wrote:

<snip>

>>> So maybe we should simply drop the backlight_device_registered(raw) check?
>>
>> Unfortunately, there are indeed systems that with Intel GFX do not have
>> a GPU backlight control interface:
>>
>> commit c675949ec58ca50d5a3ae3c757892f1560f6e896
>> Author: Jani Nikula <jani.nikula@intel.com>
>> Date:   Wed Apr 9 11:31:37 2014 +0300
>>
>>     drm/i915: do not setup backlight if not available according to VBT
>>
>> And I remembered last time when we push the use_native default to 1
>> without checking if a raw interface is available, there are people
>> complaining about no backlight interface is created on his system(and
>> the only working interface is acpi_video on his Win8 system). So simply
>> dropping this check doesn't seem like a good idea.
> 
> Hmm, ok. So any smart ideas how to deal with the ordering problem we've
> here ?
> 
> Note this also plays into the proposal I'm about to send to unify and
> simplify backlight control selection. Which besides just trying to
> clean things up also tries to get rid of various module load ordering
> issues.
> 
> ... <this represent me thinking for half an hour trying to come up with a clever solution>
> 
> So I think we really need some clean and generic way to deal with this,
> which is not prone to module loading ordering issues, any suggestions?

Ok, after yet more thinking about this I think I've what is likely going
to be the best solution for this:

1) Add a callback to the backlight core which allows interested parties
to get notified if a backlight device gets registered / unregistered

2) make acpi/video.c listen to these events and on these events re-check
acpi_video_verify_backlight_support, and if it returns something
different then the current situation (un)register the acpi_video#
backlight devices

This means that we will have ping-ponging of backlight interfaces which
I really wanted to avoid, but given all the interdepencies that
seems unavoidable. This will also simplify my cleanup proposal since
if we accept the ping-ponging all the quirks can stay in the vendor
specific firmware backlight control drivers.

So, good or bad idea ?

Regards,

Hans

      reply	other threads:[~2014-05-15  9:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-12  7:57 [PATCH] acpi-video: Add use native backlight quirk for the ThinkPad W530 Hans de Goede
2014-05-12  8:16 ` Aaron Lu
2014-05-12 11:02   ` Hans de Goede
2014-05-14 11:09     ` Hans de Goede
2014-05-14 12:07       ` Rafael J. Wysocki
2014-05-14 13:03         ` Hans de Goede
2014-05-15  1:45       ` Aaron Lu
2014-05-15  8:56         ` Hans de Goede
2014-05-15  9:34           ` Hans de Goede [this message]

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=53748A2F.5020608@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=aaron.lu@intel.com \
    --cc=airlied@redhat.com \
    --cc=bskeggs@redhat.com \
    --cc=jani.nikula@linux.intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=rui.zhang@intel.com \
    --cc=stable@vger.kernel.org \
    /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.