search for: nouveau_dsm_optimus_flags

Displaying 20 results from an estimated 20 matches for "nouveau_dsm_optimus_flags".

2016 May 14
1
[PATCH] drm/nouveau: check function before using it
...(nouveau_dsm_priv.dhandle, ACPI_FULL_PATHNAME, &buffer); printk(KERN_INFO "VGA switcheroo: detected Optimus DSM method %s handle\n", acpi_method_name); nouveau_dsm_priv.optimus_detected = true; + nouveau_dsm_priv.flags_func_detected = + optimus_funcs & (1 << NOUVEAU_DSM_OPTIMUS_FLAGS); ret = true; } else if (vga_count == 2 && has_dsm && guid_valid) { acpi_get_name(nouveau_dsm_priv.dhandle, ACPI_FULL_PATHNAME, @@ -324,8 +324,9 @@ void nouveau_switcheroo_optimus_dsm(void) if (!nouveau_dsm_priv.optimus_detected) return; - nouveau_optimus_dsm(nouveau_...
2016 May 24
0
[PATCH 3/4] drm/nouveau/acpi: check for function 0x1B before using it
...*has_opt_flags) { acpi_handle dhandle; bool supports_mux; @@ -236,6 +237,7 @@ static void nouveau_dsm_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...
2016 Jul 07
0
[PATCH v2 3/4] drm/nouveau/acpi: check for function 0x1B before using it
...l *has_opt_flags) { acpi_handle dhandle; bool supports_mux; @@ -236,6 +238,7 @@ static void nouveau_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...
2016 Jul 15
0
[PATCH v3 3/4] drm/nouveau/acpi: check for function 0x1B before using it
...l *has_opt_flags) { acpi_handle dhandle; bool supports_mux; @@ -236,6 +238,7 @@ static void nouveau_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...
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
2020 Apr 23
1
[PATCH 1/1] drm/nouveau: Use generic helper to check _PR3 presence
...ci_d3cold_disable(pdev); + } dhandle = ACPI_HANDLE(&pdev->dev); if (!dhandle) @@ -270,7 +249,6 @@ static void nouveau_dsm_pci_probe(struct pci_dev *pdev, acpi_handle *dhandle_out *has_mux = supports_mux; *has_opt = !!optimus_funcs; *has_opt_flags = optimus_funcs & (1 << NOUVEAU_DSM_OPTIMUS_FLAGS); - *has_pr3 = false; if (optimus_funcs) { uint32_t result; @@ -280,8 +258,6 @@ static void nouveau_dsm_pci_probe(struct pci_dev *pdev, acpi_handle *dhandle_out (result & OPTIMUS_ENABLED) ? "enabled" : "disabled", (result & OPTIMUS_DYNAMIC_PWR_CAP) ? &qu...
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).
2019 May 07
2
[PATCH 1/5] drm: don't set the pci power state if the pci subsystem handles the ACPI bits
...heroo_optimus_dsm(void) > { > u32 result = 0; > if (!nouveau_dsm_priv.optimus_detected || > nouveau_dsm_priv.optimus_skip_dsm) > - return; > + return false; > > if (nouveau_dsm_priv.optimus_flags_detected) > nouveau_optimus_dsm(nouveau_dsm_priv.dhandle, > NOUVEAU_DSM_OPTIMUS_FLAGS, > @@ -371,7 +371,7 @@ void nouveau_switcheroo_optimus_dsm(void) > > nouveau_optimus_dsm(nouveau_dsm_priv.dhandle, > NOUVEAU_DSM_OPTIMUS_CAPS, > NOUVEAU_DSM_OPTIMUS_SET_POWERDOWN, &result); > - > + return true; > } > > void nouveau_unregister_dsm_handler...
2015 May 25
15
[PATCH 1/8] acpi: Rename v1 DSM to mux to avoid ambiguity
...TE 0x00 -#define NOUVEAU_DSM_POWER_SPEED 0x01 -#define NOUVEAU_DSM_POWER_STAMINA 0x02 +#define NOUVEAU_DSM_MUX_POWER 0x03 +#define NOUVEAU_DSM_MUX_POWER_STATE 0x00 +#define NOUVEAU_DSM_MUX_POWER_SPEED 0x01 +#define NOUVEAU_DSM_MUX_POWER_STAMINA 0x02 #define NOUVEAU_DSM_OPTIMUS_CAPS 0x1A #define NOUVEAU_DSM_OPTIMUS_FLAGS 0x1B @@ -43,7 +43,7 @@ #define OPTIMUS_HDA_CODEC_MASK (2 << 27) /* hda bios control */ static struct nouveau_dsm_priv { - bool dsm_detected; + bool mux_detected; bool optimus_detected; acpi_handle dhandle; acpi_handle rom_handle; @@ -53,15 +53,15 @@ bool nouveau_is_optimus(void) {...
2016 May 27
3
[PATCH 4/4] drm/nouveau/acpi: fix lockup with PCIe runtime PM
...; acpi_handle dhandle; > bool supports_mux; > @@ -238,6 +257,7 @@ static void nouveau_dsm_pci_probe(struct pci_dev *pdev, bool *has_mux, > *has_mux = supports_mux; > *has_opt = !!optimus_funcs; > *has_opt_flags = optimus_funcs & (1 << NOUVEAU_DSM_OPTIMUS_FLAGS); > + *has_power_resources = false; > > if (optimus_funcs) { > uint32_t result; > @@ -247,6 +267,8 @@ static void nouveau_dsm_pci_probe(struct pci_dev *pdev, bool *has_mux, > (result & OPTIMUS_ENABLED) ? "enabled&quot...
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 30
2
[PATCH 4/4] drm/nouveau/acpi: fix lockup with PCIe runtime PM
...bool supports_mux; >> > @@ -238,6 +257,7 @@ static void nouveau_dsm_pci_probe(struct pci_dev *pdev, bool *has_mux, >> > *has_mux = supports_mux; >> > *has_opt = !!optimus_funcs; >> > *has_opt_flags = optimus_funcs & (1 << NOUVEAU_DSM_OPTIMUS_FLAGS); >> > + *has_power_resources = false; >> > >> > if (optimus_funcs) { >> > uint32_t result; >> > @@ -247,6 +267,8 @@ static void nouveau_dsm_pci_probe(struct pci_dev *pdev, bool *has_mux, >> >...
2016 May 24
0
[PATCH 4/4] drm/nouveau/acpi: fix lockup with PCIe runtime PM
...ool *has_opt_flags, + bool *has_power_resources) { acpi_handle dhandle; bool supports_mux; @@ -238,6 +257,7 @@ static void nouveau_dsm_pci_probe(struct pci_dev *pdev, bool *has_mux, *has_mux = supports_mux; *has_opt = !!optimus_funcs; *has_opt_flags = optimus_funcs & (1 << NOUVEAU_DSM_OPTIMUS_FLAGS); + *has_power_resources = false; if (optimus_funcs) { uint32_t result; @@ -247,6 +267,8 @@ static void nouveau_dsm_pci_probe(struct pci_dev *pdev, bool *has_mux, (result & OPTIMUS_ENABLED) ? "enabled" : "disabled", (result & OPTIMUS_DYNAMIC_PWR_CAP) ? &...
2019 May 04
0
[PATCH 1/5] drm: don't set the pci power state if the pci subsystem handles the ACPI bits
...u_switcheroo_optimus_dsm(void) +bool nouveau_switcheroo_optimus_dsm(void) { u32 result = 0; if (!nouveau_dsm_priv.optimus_detected || nouveau_dsm_priv.optimus_skip_dsm) - return; + return false; if (nouveau_dsm_priv.optimus_flags_detected) nouveau_optimus_dsm(nouveau_dsm_priv.dhandle, NOUVEAU_DSM_OPTIMUS_FLAGS, @@ -371,7 +371,7 @@ void nouveau_switcheroo_optimus_dsm(void) nouveau_optimus_dsm(nouveau_dsm_priv.dhandle, NOUVEAU_DSM_OPTIMUS_CAPS, NOUVEAU_DSM_OPTIMUS_SET_POWERDOWN, &result); - + return true; } void nouveau_unregister_dsm_handler(void) diff --git a/drm/nouveau/nouveau_acpi.h b/d...
2016 Jul 07
0
[PATCH v2 4/4] drm/nouveau/acpi: fix lockup with PCIe runtime PM
...+ bool *has_opt_flags, bool *has_pr3) { acpi_handle dhandle; bool supports_mux; @@ -239,6 +257,7 @@ static void nouveau_dsm_pci_probe(struct pci_dev *pdev, acpi_handle *dhandle_out *has_mux = supports_mux; *has_opt = !!optimus_funcs; *has_opt_flags = optimus_funcs & (1 << NOUVEAU_DSM_OPTIMUS_FLAGS); + *has_pr3 = false; if (optimus_funcs) { uint32_t result; @@ -248,6 +267,8 @@ static void nouveau_dsm_pci_probe(struct pci_dev *pdev, acpi_handle *dhandle_out (result & OPTIMUS_ENABLED) ? "enabled" : "disabled", (result & OPTIMUS_DYNAMIC_PWR_CAP) ? &qu...
2015 May 28
12
[PATCH v2 1/9] acpi: Rename v1 DSM to mux to avoid ambiguity
...TE 0x00 -#define NOUVEAU_DSM_POWER_SPEED 0x01 -#define NOUVEAU_DSM_POWER_STAMINA 0x02 +#define NOUVEAU_DSM_MUX_POWER 0x03 +#define NOUVEAU_DSM_MUX_POWER_STATE 0x00 +#define NOUVEAU_DSM_MUX_POWER_SPEED 0x01 +#define NOUVEAU_DSM_MUX_POWER_STAMINA 0x02 #define NOUVEAU_DSM_OPTIMUS_CAPS 0x1A #define NOUVEAU_DSM_OPTIMUS_FLAGS 0x1B @@ -43,7 +43,7 @@ #define OPTIMUS_HDA_CODEC_MASK (2 << 27) /* hda bios control */ static struct nouveau_dsm_priv { - bool dsm_detected; + bool mux_detected; bool optimus_detected; acpi_handle dhandle; acpi_handle rom_handle; @@ -53,15 +53,15 @@ bool nouveau_is_optimus(void) {...
2019 May 07
0
[PATCH 1/5] drm: don't set the pci power state if the pci subsystem handles the ACPI bits
...veau_dsm_priv.optimus_detected || > > nouveau_dsm_priv.optimus_skip_dsm) > > - return; > > + return false; > > > > if (nouveau_dsm_priv.optimus_flags_detected) > > nouveau_optimus_dsm(nouveau_dsm_priv.dhandle, > > NOUVEAU_DSM_OPTIMUS_FLAGS, > > @@ -371,7 +371,7 @@ void nouveau_switcheroo_optimus_dsm(void) > > > > nouveau_optimus_dsm(nouveau_dsm_priv.dhandle, > > NOUVEAU_DSM_OPTIMUS_CAPS, > > NOUVEAU_DSM_OPTIMUS_SET_POWERDOWN, &result); > > - > > + return true; >...
2016 May 27
0
[PATCH 4/4] drm/nouveau/acpi: fix lockup with PCIe runtime PM
...ndle; > > bool supports_mux; > > @@ -238,6 +257,7 @@ static void nouveau_dsm_pci_probe(struct pci_dev *pdev, bool *has_mux, > > *has_mux = supports_mux; > > *has_opt = !!optimus_funcs; > > *has_opt_flags = optimus_funcs & (1 << NOUVEAU_DSM_OPTIMUS_FLAGS); > > + *has_power_resources = false; > > > > if (optimus_funcs) { > > uint32_t result; > > @@ -247,6 +267,8 @@ static void nouveau_dsm_pci_probe(struct pci_dev *pdev, bool *has_mux, > > (result & OPTIMUS...
2016 May 30
0
[PATCH 4/4] drm/nouveau/acpi: fix lockup with PCIe runtime PM
...s_mux; > >> > @@ -238,6 +257,7 @@ static void nouveau_dsm_pci_probe(struct pci_dev *pdev, bool *has_mux, > >> > *has_mux = supports_mux; > >> > *has_opt = !!optimus_funcs; > >> > *has_opt_flags = optimus_funcs & (1 << NOUVEAU_DSM_OPTIMUS_FLAGS); > >> > + *has_power_resources = false; > >> > > >> > if (optimus_funcs) { > >> > uint32_t result; > >> > @@ -247,6 +267,8 @@ static void nouveau_dsm_pci_probe(struct pci_dev *pdev, bool *has_mux, > >&g...
2019 May 04
10
[PATCH 0/5] Potential fix for runpm issues on various laptops
While investigating the runpm issues on my GP107 I noticed that something inside devinit makes runpm break. If Nouveau loads up to the point right before doing devinit, runpm works without any issues, if devinit is ran, not anymore. Out of curiousity I even tried to "bisect" devinit by not running it on vbios provided signed PMU image, but on the devinit parser we have inside Nouveau.