Code Review
/
kvmfornfv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Upgrade to 4.4.50-rt62
[kvmfornfv.git]
/
kernel
/
drivers
/
gpu
/
drm
/
radeon
/
radeon_atpx_handler.c
diff --git
a/kernel/drivers/gpu/drm/radeon/radeon_atpx_handler.c
b/kernel/drivers/gpu/drm/radeon/radeon_atpx_handler.c
index
8bc7d0b
..
69ce955
100644
(file)
--- a/
kernel/drivers/gpu/drm/radeon/radeon_atpx_handler.c
+++ b/
kernel/drivers/gpu/drm/radeon/radeon_atpx_handler.c
@@
-10,6
+10,7
@@
#include <linux/slab.h>
#include <linux/acpi.h>
#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/acpi.h>
#include <linux/pci.h>
+#include <linux/delay.h>
#include "radeon_acpi.h"
#include "radeon_acpi.h"
@@
-255,6
+256,10
@@
static int radeon_atpx_set_discrete_state(struct radeon_atpx *atpx, u8 state)
if (!info)
return -EIO;
kfree(info);
if (!info)
return -EIO;
kfree(info);
+
+ /* 200ms delay is required after off */
+ if (state == 0)
+ msleep(200);
}
return 0;
}
}
return 0;
}
@@
-499,7
+504,7
@@
static int radeon_atpx_get_client_id(struct pci_dev *pdev)
return VGA_SWITCHEROO_DIS;
}
return VGA_SWITCHEROO_DIS;
}
-static struct vga_switcheroo_handler radeon_atpx_handler = {
+static
const
struct vga_switcheroo_handler radeon_atpx_handler = {
.switchto = radeon_atpx_switchto,
.power_state = radeon_atpx_power_state,
.init = radeon_atpx_init,
.switchto = radeon_atpx_switchto,
.power_state = radeon_atpx_power_state,
.init = radeon_atpx_init,
@@
-535,7
+540,7
@@
static bool radeon_atpx_detect(void)
if (has_atpx && vga_count == 2) {
acpi_get_name(radeon_atpx_priv.atpx.handle, ACPI_FULL_PATHNAME, &buffer);
if (has_atpx && vga_count == 2) {
acpi_get_name(radeon_atpx_priv.atpx.handle, ACPI_FULL_PATHNAME, &buffer);
- printk(KERN_INFO "
VGA
switcheroo: detected switching method %s handle\n",
+ printk(KERN_INFO "
vga_
switcheroo: detected switching method %s handle\n",
acpi_method_name);
radeon_atpx_priv.atpx_detected = true;
return true;
acpi_method_name);
radeon_atpx_priv.atpx_detected = true;
return true;