From: Marco Chiappero <marco@xxxxxxxxxx>
Some Vaios come with both integrated and discrete graphics, plus a
switch for choosing one of the two. When the switch position is changed,
a notification is generated.
Signed-off-by: Marco Chiappero <marco@xxxxxxxxxx>
Signed-off-by: Mattia Dongili <malattia@xxxxxxxx>
---
drivers/platform/x86/sony-laptop.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
index 7f56f8d..48a1ca6 100644
--- a/drivers/platform/x86/sony-laptop.c
+++ b/drivers/platform/x86/sony-laptop.c
@@ -1223,7 +1223,8 @@ enum event_types {
HOTKEY = 1,
KILLSWITCH,
HDDSHOCK,
- ALS
+ ALS,
+ GFX_SWITCH
};
static void sony_nc_notify(struct acpi_device *device, u32 event)
{
@@ -1310,6 +1311,24 @@ static void sony_nc_notify(struct acpi_device *device, u32 event)
ev_type = ALS;
break;
+ case 0x0128:
+ case 0x0146:
+ /* Hybrid GFX switching */
+ sony_call_snc_handle(handle, 0x0000, &result);
+ dprintk("GFX switch event received (reason: %s)\n",
+ (result & 0x01) ?
+ "switch change" : "unknown");
+
+ /* verify the switch state
+ * 1: discrete GFX
+ * 0: integrated GFX
+ */
+ sony_call_snc_handle(handle, 0x0100, &result);
+
+ ev_type = GFX_SWITCH;
+ real_ev = result & 0xff;
+ break;
+
default:
dprintk("Unknown event 0x%x for handle 0x%x\n",
event, handle);
--
1.7.10
--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Free Online Dating]
[Linux Kernel]
[Linux SCSI]
[XFree86]