Displaying 20 results from an estimated 27 matches for "nouveau_dsm_detect".
Did you mean:
nouveau_dp_detect
2015 May 25
15
[PATCH 1/8] acpi: Rename v1 DSM to mux to avoid ambiguity
...ck_dsm(dhandle, nouveau_dsm_muid, 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...
2015 May 28
12
[PATCH v2 1/9] acpi: Rename v1 DSM to mux to avoid ambiguity
This is especially true when variables or functions are just called dsm without
specifying the v1.
Changes since v1:
* Fix typo in commit explanation
* Change has_dsm to has_mux in nouveau_dsm_detect
Signed-off-by: Pierre Moreau <pierre.morrow at free.fr>
---
drm/nouveau/nouveau_acpi.c | 72 +++++++++++++++++++++++-----------------------
drm/nouveau/nouveau_acpi.h | 4 +--
drm/nouveau/nouveau_drm.c | 4 +--
drm/nouveau/nouveau_vga.c | 10 +++----
4 files changed, 45 insertions(+), 4...
2015 Jan 17
0
[PATCH RFC] nouveau: Add support for Gmux _DSM method
...veau_check_optimus_dsm(dhandle))
retval |= NOUVEAU_DSM_HAS_OPT;
+ if (nouveau_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 (re...
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 May 27
3
[PATCH 4/4] drm/nouveau/acpi: fix lockup with PCIe runtime PM
...ic 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...
2016 May 24
0
[PATCH 3/4] drm/nouveau/acpi: check for function 0x1B before using it
...m_pci_probe(struct pci_dev *pdev, bool *has_mux,
nouveau_dsm_priv.dhandle = dhandle;
*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 <...
2016 Jul 07
0
[PATCH v2 3/4] drm/nouveau/acpi: check for function 0x1B before using it
...dsm_pci_probe(struct pci_dev *pdev, acpi_handle *dhandle_out
*dhandle_out = dhandle;
*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 <&...
2016 Jul 15
0
[PATCH v3 3/4] drm/nouveau/acpi: check for function 0x1B before using it
...dsm_pci_probe(struct pci_dev *pdev, acpi_handle *dhandle_out
*dhandle_out = dhandle;
*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 <&...
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 4/4] drm/nouveau/acpi: fix lockup with PCIe runtime PM
...isabled",
(result & OPTIMUS_DYNAMIC_PWR_CAP) ? "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, &am...
2016 Jul 07
0
[PATCH v2 1/4] drm/nouveau/acpi: ensure matching ACPI handle and supported functions
...t pci_dev *pdev)
(result & OPTIMUS_DYNAMIC_PWR_CAP) ? "dynamic power, " : "",
(result & OPTIMUS_HDA_CODEC_MASK) ? "hda bios codec supported" : "");
}
- if (retval)
- nouveau_dsm_priv.dhandle = 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 =...
2016 Jul 15
0
[PATCH v3 1/4] drm/nouveau/acpi: ensure matching ACPI handle and supported functions
...t pci_dev *pdev)
(result & OPTIMUS_DYNAMIC_PWR_CAP) ? "dynamic power, " : "",
(result & OPTIMUS_HDA_CODEC_MASK) ? "hda bios codec supported" : "");
}
- if (retval)
- nouveau_dsm_priv.dhandle = 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 =...
2016 Jul 07
0
[PATCH v2 4/4] drm/nouveau/acpi: fix lockup with PCIe runtime PM
...t; : "disabled",
(result & OPTIMUS_DYNAMIC_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, &am...
2016 May 14
1
[PATCH] drm/nouveau: check function before using it
...ndle))
- retval |= NOUVEAU_DSM_HAS_OPT;
-
- if (retval & NOUVEAU_DSM_HAS_OPT) {
+ *optimus_funcs = nouveau_check_optimus_dsm(dhandle);
+ if (*optimus_funcs) {
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)...
2016 May 30
2
[PATCH 4/4] drm/nouveau/acpi: fix lockup with PCIe runtime PM
...(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;
>> &g...
2016 May 27
0
[PATCH 4/4] drm/nouveau/acpi: fix lockup with PCIe runtime PM
...t; > (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;...
2016 May 30
0
[PATCH 4/4] drm/nouveau/acpi: fix lockup with PCIe runtime PM
..._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;
> >> >...
2013 Oct 09
0
[PATCH] drm/nouveau: consider CLASS_DISPLAY_3D devices while detecting dsm/optimus
....c | 10 ++++++++++
1 file changed, 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;
+ }...
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