From: Aaron Lu <aaron.lu@intel.com>
To: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Cc: ACPI Devel Mailing List <linux-acpi@vger.kernel.org>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
Matthew Garrett <matthew.garrett@nebula.com>,
Seth Forshee <seth.forshee@canonical.com>,
"Lee, Chun-Yi" <joeyli.kernel@gmail.com>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Len Brown <lenb@kernel.org>,
Yves-Alexis Perez <corsac@debian.org>,
Felipe Contreras <felipe.contreras@gmail.com>,
Lee Chun-Yi <jlee@novell.com>,
Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Subject: Re: [PATCH 2/2] ACPI / video / i915: Remove ACPI backlight if firmware expects Windows 8
Date: Tue, 10 Sep 2013 13:42:13 +0800 [thread overview]
Message-ID: <522EB135.2060309@intel.com> (raw)
In-Reply-To: <1378790561.2160.1.camel@ThinkPad-X230.localdomain>
On 09/10/2013 01:22 PM, Igor Gnatenko wrote:
> On Tue, 2013-09-10 at 13:16 +0800, Aaron Lu wrote:
>> On 09/10/2013 01:13 PM, Igor Gnatenko wrote:
>>> On Tue, 2013-09-10 at 11:27 +0800, Aaron Lu wrote:
>>>> On 09/09/2013 07:44 PM, Igor Gnatenko wrote:
>>>>> On Mon, 2013-09-09 at 16:42 +0800, Aaron Lu wrote:
>>>>>> diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
>>>>>> index f466980..75fba17 100644
>>>>>> --- a/drivers/gpu/drm/i915/i915_dma.c
>>>>>> +++ b/drivers/gpu/drm/i915/i915_dma.c
>>>>>> @@ -1650,7 +1650,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
>>>>>> if (INTEL_INFO(dev)->num_pipes) {
>>>>>> /* Must be done after probing outputs */
>>>>>> intel_opregion_init(dev);
>>>>>> - acpi_video_register();
>>>>>> + __acpi_video_register(i915_take_over_backlight);
>>>>>> }
>>>>>>
>>>>>> if (IS_GEN5(dev))
>>>>>
>>>>> I can't compile:
>>>>>
>>>>>
>>>>> DEBUG: drivers/gpu/drm/i915/i915_dma.c: In function 'i915_driver_load':
>>>>> DEBUG: drivers/gpu/drm/i915/i915_dma.c:1661:3: error: implicit
>>>>> declaration of function
>>>>> '__acpi_video_register' [-Werror=implicit-function-declaration]
>>>>> DEBUG: __acpi_video_register(i915_take_over_backlight);
>>>>> DEBUG: ^
>>>>> DEBUG: cc1: some warnings being treated as errors
>>>>> DEBUG: make[4]: *** [drivers/gpu/drm/i915/i915_dma.o] Error 1
>>>>> DEBUG: make[3]: *** [drivers/gpu/drm/i915] Error 2
>>>>> DEBUG: make[2]: *** [drivers/gpu/drm] Error 2
>>>>> DEBUG: make[1]: *** [drivers/gpu] Error 2
>>>>> DEBUG: make: *** [drivers] Error 2
>>>>>
>>>>
>>>> The two patches are based on top of Rafael's linux-next tree. I just
>>>> tried it again, no compile problem for me. I also tried on today Linus'
>>>> master tree, as there are some updates from i915, two conflicts exist.
>>>> I've just resolved them and will update it in next revision.
>>>> If you want to try it now, please use:
>>>> https://github.com/aaronlu/linux acpi_video_rework
>>>>
>>>> Thanks,
>>>> Aaron
>>>
>>> Thanks. this patch fixes my problems w/ compilation. I've tested this
>>> two patches and after apply I have:
>>> $ tree /sys/class/backlight/
>>> /sys/class/backlight/
>>> |-- acpi_video0
>>> -> ../../devices/pci0000:00/0000:00:02.0/backlight/acpi_video0
>>> `-- intel_backlight
>>> -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight
>>>
>>> 2 directories, 0 files
>>>
>>> I think it's didn't unregistered.. I may forget. I need to apply one of
>>> patch from Matthew ?
>>
>> You need to specify i915.take_over_backlight=1 in kernel cmdline, that
>> module option is set to false by default for now.
>>
>> Thanks for the test.
>>
>> -Aaron
>>
>>>
>>> Some strings from logs:
>>> DMI: LENOVO 23205NG/23205NG, BIOS G2ET92WW (2.52 ) 02/22/2013
>>> thinkpad_acpi: Standard ACPI backlight interface available, not loading
>>> native one
>>>
>>
>
> Thanks for quick answer. Yes. This option do unregister. Thanks. but for
> this patch-set I also need "[PATCH 2/3] ACPI / video: Always call
> acpi_video_init_brightness() on init" from Matthew (for notifications in
> DE).
That patch is reverted as it cause problem for other system:
https://bugs.freedesktop.org/show_bug.cgi?id=68355
OTOH, the thinkpad-acpi module already has a call to _BCL except that
the tpacpi_acpi_handle_locate failed to locate video controller's handle:
https://bugzilla.kernel.org/show_bug.cgi?id=51231#c121
I'll see if I can figure out why.
Thanks,
Aaron
next prev parent reply other threads:[~2013-09-10 5:41 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-09 8:37 [PATCH 0/2] Rework ACPI video driver Aaron Lu
2013-09-09 8:40 ` [PATCH 1/2] ACPI / video: seperate backlight control and event interface Aaron Lu
2013-09-10 5:23 ` Igor Gnatenko
2013-09-09 8:42 ` [PATCH 2/2] ACPI / video / i915: Remove ACPI backlight if firmware expects Windows 8 Aaron Lu
2013-09-09 9:32 ` Daniel Vetter
2013-09-09 12:16 ` Rafael J. Wysocki
2013-09-09 15:21 ` Daniel Vetter
2013-09-09 15:38 ` Matthew Garrett
2013-09-09 20:23 ` Rafael J. Wysocki
2013-09-10 13:53 ` Jani Nikula
2013-09-10 13:56 ` Matthew Garrett
2013-09-10 14:21 ` Jani Nikula
2013-09-10 14:21 ` Matthew Garrett
2013-09-10 19:23 ` Rafael J. Wysocki
2013-09-11 1:32 ` Aaron Lu
2013-09-11 8:45 ` Jani Nikula
2013-09-11 8:45 ` Matthew Garrett
2013-09-11 9:09 ` Yves-Alexis Perez
2013-09-11 10:29 ` Jani Nikula
2013-09-11 10:30 ` Matthew Garrett
2013-09-12 2:26 ` Aaron Lu
2013-09-10 6:30 ` Aaron Lu
2013-09-09 11:44 ` Igor Gnatenko
2013-09-10 3:27 ` Aaron Lu
2013-09-10 5:13 ` Igor Gnatenko
2013-09-10 5:16 ` Aaron Lu
2013-09-10 5:22 ` Igor Gnatenko
2013-09-10 5:42 ` Aaron Lu [this message]
2013-09-10 5:23 ` Igor Gnatenko
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=522EB135.2060309@intel.com \
--to=aaron.lu@intel.com \
--cc=corsac@debian.org \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=felipe.contreras@gmail.com \
--cc=hmh@hmh.eng.br \
--cc=i.gnatenko.brain@gmail.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jlee@novell.com \
--cc=joeyli.kernel@gmail.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew.garrett@nebula.com \
--cc=rjw@sisk.pl \
--cc=seth.forshee@canonical.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