Displaying 20 results from an estimated 23 matches for "has_optimus".
2016 Jul 07
0
[PATCH v2 1/4] drm/nouveau/acpi: ensure matching ACPI handle and supported functions
...dhandle;
-
- return retval;
}
static bool nouveau_dsm_detect(void)
@@ -251,11 +251,11 @@ static bool nouveau_dsm_detect(void)
char acpi_method_name[255] = { 0 };
struct acpi_buffer buffer = {sizeof(acpi_method_name), acpi_method_name};
struct pci_dev *pdev = NULL;
- int has_dsm = 0;
- int has_optimus = 0;
+ acpi_handle dhandle = NULL;
+ bool has_mux = false;
+ bool has_optimus = false;
int vga_count = 0;
bool guid_valid;
- int retval;
bool ret = false;
/* lookup the MXM GUID */
@@ -268,32 +268,26 @@ static bool nouveau_dsm_detect(void)
while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_...
2016 Jul 15
0
[PATCH v3 1/4] drm/nouveau/acpi: ensure matching ACPI handle and supported functions
...dhandle;
-
- return retval;
}
static bool nouveau_dsm_detect(void)
@@ -251,11 +251,11 @@ static bool nouveau_dsm_detect(void)
char acpi_method_name[255] = { 0 };
struct acpi_buffer buffer = {sizeof(acpi_method_name), acpi_method_name};
struct pci_dev *pdev = NULL;
- int has_dsm = 0;
- int has_optimus = 0;
+ acpi_handle dhandle = NULL;
+ bool has_mux = false;
+ bool has_optimus = false;
int vga_count = 0;
bool guid_valid;
- int retval;
bool ret = false;
/* lookup the MXM GUID */
@@ -268,32 +268,26 @@ static bool nouveau_dsm_detect(void)
while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_...
2016 May 24
7
[PATCH 0/4] nouveau fixes for RPM/Optimus-related hangs
Hi,
Here are two patches to fix an issue reported on kernel bugzilla (infinite loop
due to unchecked function) and a more important fix to fix hanging Optimus
machines when runtime PM is enabled (with pm/pci patches).
An older (obsolete) patch for the first issue was tested by the reporter:
https://bugzilla.kernel.org/show_bug.cgi?id=104791#c11
(it is replaced by "check for function 0x1B
2016 Jul 07
6
[PATCH v2 0/4] nouveau RPM fixes for Optimus
Hi,
Here are two patches to fix an issue reported on kernel bugzilla (infinite loop
due to unchecked function) and a more important fix to fix hanging Optimus
machines when runtime PM is enabled (with pm/pci patches).
See the first version[1] for a background on the fixed problems. This is the
second revision of incorporating feedback from Emil Velikov (patch 1), Mika
Westerberg (patch 4).
2016 Jul 15
8
[PATCH v3 0/4] nouveau RPM fixes for Optimus (final)
Hi,
Here are two patches to fix an issue reported on kernel bugzilla (infinite loop
due to unchecked function) and a more important fix to fix hanging Optimus
machines when runtime PM is enabled (with pm/pci patches).
These are the final patches targeting v4.8. Changes compared to v2[1]:
collected R-b from Hans and Mika and fixed a minor comment style issue.
I recommend it to be merged before
2016 May 24
0
[PATCH 3/4] drm/nouveau/acpi: check for function 0x1B before using it
...*has_mux = supports_mux;
*has_opt = !!optimus_funcs;
+ *has_opt_flags = optimus_funcs & (1 << NOUVEAU_DSM_OPTIMUS_FLAGS);
if (optimus_funcs) {
uint32_t result;
@@ -255,6 +257,7 @@ static bool nouveau_dsm_detect(void)
struct pci_dev *pdev = NULL;
bool has_mux = false;
bool has_optimus = false;
+ bool has_optimus_flags = false;
int vga_count = 0;
bool guid_valid;
bool ret = false;
@@ -269,13 +272,15 @@ static bool nouveau_dsm_detect(void)
while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev)) != NULL) {
vga_count++;
- nouveau_dsm_pci_probe(pdev, &...
2016 Jul 07
0
[PATCH v2 3/4] drm/nouveau/acpi: check for function 0x1B before using it
...*has_mux = supports_mux;
*has_opt = !!optimus_funcs;
+ *has_opt_flags = optimus_funcs & (1 << NOUVEAU_DSM_OPTIMUS_FLAGS);
if (optimus_funcs) {
uint32_t result;
@@ -256,6 +259,7 @@ static bool nouveau_dsm_detect(void)
acpi_handle dhandle = NULL;
bool has_mux = false;
bool has_optimus = false;
+ bool has_optimus_flags = false;
int vga_count = 0;
bool guid_valid;
bool ret = false;
@@ -270,13 +274,15 @@ static bool nouveau_dsm_detect(void)
while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev)) != NULL) {
vga_count++;
- nouveau_dsm_pci_probe(pdev, &...
2016 Jul 15
0
[PATCH v3 3/4] drm/nouveau/acpi: check for function 0x1B before using it
...*has_mux = supports_mux;
*has_opt = !!optimus_funcs;
+ *has_opt_flags = optimus_funcs & (1 << NOUVEAU_DSM_OPTIMUS_FLAGS);
if (optimus_funcs) {
uint32_t result;
@@ -256,6 +259,7 @@ static bool nouveau_dsm_detect(void)
acpi_handle dhandle = NULL;
bool has_mux = false;
bool has_optimus = false;
+ bool has_optimus_flags = false;
int vga_count = 0;
bool guid_valid;
bool ret = false;
@@ -270,13 +274,15 @@ static bool nouveau_dsm_detect(void)
while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev)) != NULL) {
vga_count++;
- nouveau_dsm_pci_probe(pdev, &...
2016 May 14
1
[PATCH] drm/nouveau: check function before using it
...ncs) {
uint32_t result;
nouveau_optimus_dsm(dhandle, NOUVEAU_DSM_OPTIMUS_CAPS, 0,
&result);
@@ -252,7 +254,7 @@ static bool nouveau_dsm_detect(void)
struct acpi_buffer buffer = {sizeof(acpi_method_name), acpi_method_name};
struct pci_dev *pdev = NULL;
int has_dsm = 0;
- int has_optimus = 0;
+ uint32_t optimus_funcs = 0;
int vga_count = 0;
bool guid_valid;
int retval;
@@ -268,30 +270,28 @@ static bool nouveau_dsm_detect(void)
while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev)) != NULL) {
vga_count++;
- retval = nouveau_dsm_pci_probe(pdev);
+ retval...
2012 Mar 23
3
[PATCH 0/3] Prepare nouveau for other switcheroo handlers
While working on a vga_switcheroo handler for Apple's Macbook Pros I stumbled
upon a few bugs regarding the usage of nouveau with other switcheroo handlers
and module unloading, here are my fixes for them.
Andreas Heider (3):
drm/nouveau: Initialize has_optimus
drm/nouveau: Check dsm on switcheroo unregister
drm/nouveau: Unregister switcheroo client on exit
drivers/gpu/drm/nouveau/nouveau_acpi.c | 5 +++--
drivers/gpu/drm/nouveau/nouveau_state.c | 2 ++
2 files changed, 5 insertions(+), 2 deletions(-)
--
1.7.9.1
2016 May 27
3
[PATCH 4/4] drm/nouveau/acpi: fix lockup with PCIe runtime PM
...PTIMUS_HDA_CODEC_MASK) ? "hda bios codec supported" : "");
> +
> + *has_power_resources = nouveau_pr3_present(pdev);
> }
> }
>
> @@ -258,6 +280,7 @@ static bool nouveau_dsm_detect(void)
> bool has_mux = false;
> bool has_optimus = false;
> bool has_optimus_flags = false;
> + bool has_power_resources = false;
> int vga_count = 0;
> bool guid_valid;
> bool ret = false;
> @@ -273,14 +296,14 @@ static bool nouveau_dsm_detect(void)
> vga_count++;
>
&g...
2015 May 25
15
[PATCH 1/8] acpi: Rename v1 DSM to mux to avoid ambiguity
...uid, 0x00000102,
- 1 << NOUVEAU_DSM_POWER))
+ if (acpi_check_dsm(dhandle, nouveau_mux_dsm_muid, 0x00000102,
+ 1 << NOUVEAU_DSM_MUX_POWER))
retval |= NOUVEAU_DSM_HAS_MUX;
if (nouveau_check_optimus_dsm(dhandle))
@@ -285,7 +285,7 @@ static bool nouveau_dsm_detect(void)
has_optimus = 1;
}
- /* find the optimus DSM or the old v1 DSM */
+ /* find the optimus DSM or the mux DSM */
if (has_optimus == 1) {
acpi_get_name(nouveau_dsm_priv.dhandle, ACPI_FULL_PATHNAME,
&buffer);
@@ -296,9 +296,9 @@ static bool nouveau_dsm_detect(void)
} else if (vga_count == 2 &...
2015 May 28
12
[PATCH v2 1/9] acpi: Rename v1 DSM to mux to avoid ambiguity
..._HAS_MUX;
if (nouveau_check_optimus_dsm(dhandle))
@@ -251,7 +251,7 @@ static bool nouveau_dsm_detect(void)
char acpi_method_name[255] = { 0 };
struct acpi_buffer buffer = {sizeof(acpi_method_name), acpi_method_name};
struct pci_dev *pdev = NULL;
- int has_dsm = 0;
+ int has_mux = 0;
int has_optimus = 0;
int vga_count = 0;
bool guid_valid;
@@ -270,7 +270,7 @@ static bool nouveau_dsm_detect(void)
retval = nouveau_dsm_pci_probe(pdev);
if (retval & NOUVEAU_DSM_HAS_MUX)
- has_dsm |= 1;
+ has_mux |= 1;
if (retval & NOUVEAU_DSM_HAS_OPT)
has_optimus = 1;
}
@@ -280,12...
2016 May 30
2
[PATCH 4/4] drm/nouveau/acpi: fix lockup with PCIe runtime PM
...uot;);
>> > +
>> > + *has_power_resources = nouveau_pr3_present(pdev);
>> > }
>> > }
>> >
>> > @@ -258,6 +280,7 @@ static bool nouveau_dsm_detect(void)
>> > bool has_mux = false;
>> > bool has_optimus = false;
>> > bool has_optimus_flags = false;
>> > + bool has_power_resources = false;
>> > int vga_count = 0;
>> > bool guid_valid;
>> > bool ret = false;
>> > @@ -273,14 +296,14 @@ static bool nouveau_dsm_...
2015 Jan 17
0
[PATCH RFC] nouveau: Add support for Gmux _DSM method
...u_check_gmux_dsm(dhandle))
+ retval |= NOUVEAU_DSM_HAS_GMUX;
+
if (retval & NOUVEAU_DSM_HAS_OPT) {
uint32_t result;
nouveau_optimus_dsm(dhandle, NOUVEAU_DSM_OPTIMUS_CAPS, 0,
@@ -253,6 +326,7 @@ static bool nouveau_dsm_detect(void)
struct pci_dev *pdev = NULL;
int has_dsm = 0;
int has_optimus = 0;
+ int has_gmux = 0;
int vga_count = 0;
bool guid_valid;
int retval;
@@ -273,6 +347,8 @@ static bool nouveau_dsm_detect(void)
has_dsm |= 1;
if (retval & NOUVEAU_DSM_HAS_OPT)
has_optimus = 1;
+ if (retval & NOUVEAU_DSM_HAS_GMUX)
+ has_gmux = 1;
}
while ((pdev =...
2013 Oct 09
0
[PATCH] drm/nouveau: consider CLASS_DISPLAY_3D devices while detecting dsm/optimus
...anged, 10 insertions(+)
diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c
index d97f200..646d4e3 100644
--- a/drivers/gpu/drm/nouveau/nouveau_acpi.c
+++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c
@@ -289,6 +289,16 @@ static bool nouveau_dsm_detect(void)
has_optimus = 1;
}
+ while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_3D << 8, pdev)) != NULL) {
+ vga_count++;
+
+ retval = nouveau_dsm_pci_probe(pdev);
+ if (retval & NOUVEAU_DSM_HAS_MUX)
+ has_dsm |= 1;
+ if (retval & NOUVEAU_DSM_HAS_OPT)
+ has_optimus = 1;
+ }
+
/* find the optimu...
2016 May 24
0
[PATCH 4/4] drm/nouveau/acpi: fix lockup with PCIe runtime PM
...P) ? "dynamic power, " : "",
(result & OPTIMUS_HDA_CODEC_MASK) ? "hda bios codec supported" : "");
+
+ *has_power_resources = nouveau_pr3_present(pdev);
}
}
@@ -258,6 +280,7 @@ static bool nouveau_dsm_detect(void)
bool has_mux = false;
bool has_optimus = false;
bool has_optimus_flags = false;
+ bool has_power_resources = false;
int vga_count = 0;
bool guid_valid;
bool ret = false;
@@ -273,14 +296,14 @@ static bool nouveau_dsm_detect(void)
vga_count++;
nouveau_dsm_pci_probe(pdev, &has_mux, &has_optimus,
- &has_...
2016 Jul 07
0
[PATCH v2 4/4] drm/nouveau/acpi: fix lockup with PCIe runtime PM
...NAMIC_PWR_CAP) ? "dynamic power, " : "",
(result & OPTIMUS_HDA_CODEC_MASK) ? "hda bios codec supported" : "");
+
+ *has_pr3 = nouveau_pr3_present(pdev);
}
}
@@ -260,6 +281,7 @@ static bool nouveau_dsm_detect(void)
bool has_mux = false;
bool has_optimus = false;
bool has_optimus_flags = false;
+ bool has_power_resources = false;
int vga_count = 0;
bool guid_valid;
bool ret = false;
@@ -275,14 +297,14 @@ static bool nouveau_dsm_detect(void)
vga_count++;
nouveau_dsm_pci_probe(pdev, &dhandle, &has_mux, &has_optimus,
-...
2016 May 27
0
[PATCH 4/4] drm/nouveau/acpi: fix lockup with PCIe runtime PM
...codec supported" : "");
> > +
> > + *has_power_resources = nouveau_pr3_present(pdev);
> > }
> > }
> >
> > @@ -258,6 +280,7 @@ static bool nouveau_dsm_detect(void)
> > bool has_mux = false;
> > bool has_optimus = false;
> > bool has_optimus_flags = false;
> > + bool has_power_resources = false;
> > int vga_count = 0;
> > bool guid_valid;
> > bool ret = false;
> > @@ -273,14 +296,14 @@ static bool nouveau_dsm_detect(void)
> >...
2016 May 30
0
[PATCH 4/4] drm/nouveau/acpi: fix lockup with PCIe runtime PM
...; > + *has_power_resources = nouveau_pr3_present(pdev);
> >> > }
> >> > }
> >> >
> >> > @@ -258,6 +280,7 @@ static bool nouveau_dsm_detect(void)
> >> > bool has_mux = false;
> >> > bool has_optimus = false;
> >> > bool has_optimus_flags = false;
> >> > + bool has_power_resources = false;
> >> > int vga_count = 0;
> >> > bool guid_valid;
> >> > bool ret = false;
> >> > @@ -273,14 +296,...