From: joeyli <jlee@suse.com>
To: Luca Tettamanti <kronos.it@gmail.com>
Cc: Alex Deucher <alexander.deucher@amd.com>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/radeon: add new AMD ACPI header and update relevant code
Date: Sun, 29 Jul 2012 11:51:48 +0800 [thread overview]
Message-ID: <1343533908.6341.6.camel@linux-s257.site> (raw)
In-Reply-To: <20120728145626.GA6304@growl>
Hi Luca,
於 六,2012-07-28 於 16:56 +0200,Luca Tettamanti 提到:
> On Thu, Jul 26, 2012 at 03:42:26PM -0400, Alex Deucher wrote:
> > On Thu, Jul 26, 2012 at 3:33 PM, Luca Tettamanti <kronos.it@gmail.com> wrote:
> > > On Thu, Jul 26, 2012 at 11:35:25AM -0400, Alex Deucher wrote:
> > >> On Thu, Jul 26, 2012 at 8:58 AM, Luca Tettamanti <kronos.it@gmail.com> wrote:
> > >> > The other missing bit is how to actually change the brightness... Alex,
> > >> > do you know what registers to poke?
> > >>
> > >> You need to check if the GPU controls the backlight or the system
> > >> does. I think the attached patches should point you in the right
> > >> direction.
> > >
> > > Yep :)
> > >
> > > 0050: ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability :
> > > 0050: (union) ATOM_FIRMWARE_CAPABILITY sbfAccess :
> > > USHORT GPUControlsBL:1 = 0x0001 (1)
> > >
> > > The panel is using the INTERNAL_UNIPHY encoder, and I see the
> > > UNIPHYTransmitterControl command table.
> > >
> > > Interaction with video.ko is still a bit messy...
> > >
> > > Do you already have code for handling the notifications? I'll work on it
> > > in the weekend otherwise ;)
> >
> > I don't have patches for that. Please feel free to work on it :)
>
> I just found the first problem (probably a BIOS bug):
> ATIF_FUNCTION_GET_SYSTEM_PARAMETERS is implemented in the DSDT, but the
> corresponding bit ATIF_GET_SYSTEM_PARAMETERS_SUPPORTED is not set :(
> I intended to use the method to set up the notification handler but now
> my BIOS says that it's not there even if it is...
> Can I assume some default values (e.g. notifications are enabled and will
> use 0x81 unless ATIF_FUNCTION_GET_SYSTEM_PARAMETERS says something
> different)?
>
> thanks,
> Luca
>
Did you check your DSDT for there have some "Notify (VGA, 0x81)"
statement in AFN0..AFN15?
If YES, I think that means your machine in case the 0x81 is for ATI used
by default.
On the other hand,
I am also trying to write patch for avoid my AC-power problem. Like your
idea, I think just add radeon-acpi to acpi notifier chain then
acpi/video feed event to chain before issue KEY code like Matthew's code
for ACPI_VIDEO_NOTIFY_SWITCH with intel_opregion on 0x80.
The following code for reference:
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 1e0a9e1..fc138fd 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -91,6 +91,8 @@ static int acpi_video_bus_add(struct acpi_device *device);
static int acpi_video_bus_remove(struct acpi_device *device, int type);
static void acpi_video_bus_notify(struct acpi_device *device, u32 event);
+static u16 video_notify_block_map;
+
static const struct acpi_device_id video_device_ids[] = {
{ACPI_VIDEO_HID, 0},
{"", 0},
@@ -1457,7 +1459,8 @@ static void acpi_video_bus_notify(struct acpi_device *device, u32 event)
acpi_video_device_enumerate(video);
acpi_video_device_rebind(video);
acpi_bus_generate_proc_event(device, event, 0);
- keycode = KEY_SWITCHVIDEOMODE;
+ if (!acpi_notifier_call_chain(device, event, 0))
+ keycode = KEY_SWITCHVIDEOMODE;
break;
case ACPI_VIDEO_NOTIFY_CYCLE: /* Cycle Display output hotkey pressed. */
@@ -1479,7 +1482,8 @@ static void acpi_video_bus_notify(struct acpi_device *device, u32 event)
break;
}
- if (event != ACPI_VIDEO_NOTIFY_SWITCH)
+ if (event != ACPI_VIDEO_NOTIFY_SWITCH ||
+ event != ACPI_VIDEO_NOTIFY_PROBE)
acpi_notifier_call_chain(device, event, 0);
if (keycode) {
Thanks a lot!
Joey Lee
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2012-07-29 3:54 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-25 17:38 [PATCH] drm/radeon: add new AMD ACPI header and update relevant code alexdeucher
2012-07-26 12:58 ` Luca Tettamanti
2012-07-26 15:35 ` Alex Deucher
2012-07-26 19:33 ` Luca Tettamanti
2012-07-26 19:42 ` Alex Deucher
2012-07-26 19:58 ` Alex Deucher
2012-07-28 14:56 ` Luca Tettamanti
2012-07-28 21:29 ` Alex Deucher
2012-07-29 13:06 ` Luca Tettamanti
2012-07-30 14:20 ` Alex Deucher
2012-07-30 20:24 ` Luca Tettamanti
2012-07-30 20:30 ` Alex Deucher
2012-07-30 20:36 ` Luca Tettamanti
2012-07-30 20:45 ` Alex Deucher
2012-07-31 9:16 ` Luca Tettamanti
2012-07-31 13:58 ` Alex Deucher
2012-07-31 20:05 ` Luca Tettamanti
2012-07-31 21:33 ` Alex Deucher
2012-08-01 8:57 ` Luca Tettamanti
2012-08-01 13:56 ` Alex Deucher
2012-08-02 15:03 ` Alex Deucher
2012-08-02 16:31 ` Luca Tettamanti
2012-08-02 16:33 ` Alex Deucher
2012-08-02 20:54 ` Alex Deucher
2012-08-01 13:49 ` [PATCH/RFC] drm/radeon: ACPI: veto the keypress on ATIF events Luca Tettamanti
2012-08-01 14:02 ` Alex Deucher
2012-08-01 14:50 ` joeyli
2012-08-02 0:45 ` Zhang Rui
2012-08-02 13:46 ` Luca Tettamanti
2012-08-03 1:40 ` Zhang Rui
2012-08-03 1:45 ` Alex Deucher
2012-08-03 2:06 ` Zhang Rui
2012-07-29 19:33 ` [PATCH] drm/radeon: add new AMD ACPI header and update relevant code Luca Tettamanti
2012-07-30 14:29 ` Alex Deucher
2012-07-29 3:51 ` joeyli [this message]
2012-07-29 13:10 ` Luca Tettamanti
2012-07-30 8:32 ` joeyli
2012-07-30 14:16 ` Luca Tettamanti
2012-07-28 14:39 ` Pali Rohár
2012-07-27 2:50 ` joeyli
2012-07-27 3:31 ` Alex Deucher
2012-07-27 4:46 ` joeyli
2012-07-27 9:02 ` Luca Tettamanti
2012-07-27 13:21 ` Alex Deucher
2012-07-27 15:32 ` joeyli
2012-07-27 15:36 ` joeyli
2012-07-27 16:31 ` Alex Deucher
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=1343533908.6341.6.camel@linux-s257.site \
--to=jlee@suse.com \
--cc=alexander.deucher@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kronos.it@gmail.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.