Displaying 20 results from an estimated 21 matches for "has_mux".
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 May 27
3
[PATCH 4/4] drm/nouveau/acpi: fix lockup with PCIe runtime PM
...+ return false;
> +
> + ad = ACPI_COMPANION(&parent_pdev->dev);
> + if (!ad)
> + return false;
> +
> + return ad->power.flags.power_resources;
> +}
> +
> static void nouveau_dsm_pci_probe(struct pci_dev *pdev, bool *has_mux,
> - bool *has_opt, bool *has_opt_flags)
> + bool *has_opt, bool *has_opt_flags,
> + bool *has_power_resources)
> {
> acpi_handle dhandle;
> bool supports_mux;
> @@...
2016 May 24
0
[PATCH 3/4] drm/nouveau/acpi: check for function 0x1B before using it
...ool dsm_detected;
bool optimus_detected;
+ bool optimus_flags_detected;
acpi_handle dhandle;
acpi_handle rom_handle;
} nouveau_dsm_priv;
@@ -212,7 +213,7 @@ static const struct vga_switcheroo_handler nouveau_dsm_handler = {
};
static void nouveau_dsm_pci_probe(struct pci_dev *pdev, bool *has_mux,
- bool *has_opt)
+ bool *has_opt, bool *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;...
2016 Jul 07
0
[PATCH v2 3/4] drm/nouveau/acpi: check for function 0x1B before using it
...detected;
+ bool optimus_flags_detected;
acpi_handle dhandle;
acpi_handle rom_handle;
} nouveau_dsm_priv;
@@ -212,7 +213,8 @@ static const struct vga_switcheroo_handler nouveau_dsm_handler = {
};
static void nouveau_dsm_pci_probe(struct pci_dev *pdev, acpi_handle *dhandle_out,
- bool *has_mux, bool *has_opt)
+ bool *has_mux, bool *has_opt,
+ bool *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 = !!op...
2016 Jul 15
0
[PATCH v3 3/4] drm/nouveau/acpi: check for function 0x1B before using it
...detected;
+ bool optimus_flags_detected;
acpi_handle dhandle;
acpi_handle rom_handle;
} nouveau_dsm_priv;
@@ -212,7 +213,8 @@ static const struct vga_switcheroo_handler nouveau_dsm_handler = {
};
static void nouveau_dsm_pci_probe(struct pci_dev *pdev, acpi_handle *dhandle_out,
- bool *has_mux, bool *has_opt)
+ bool *has_mux, bool *has_opt,
+ bool *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 = !!op...
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 30
2
[PATCH 4/4] drm/nouveau/acpi: fix lockup with PCIe runtime PM
...PANION(&parent_pdev->dev);
>> > + if (!ad)
>> > + return false;
>> > +
>> > + return ad->power.flags.power_resources;
>> > +}
>> > +
>> > static void nouveau_dsm_pci_probe(struct pci_dev *pdev, bool *has_mux,
>> > - bool *has_opt, bool *has_opt_flags)
>> > + bool *has_opt, bool *has_opt_flags,
>> > + bool *has_power_resources)
>> > {
>> > acpi_handle dhan...
2016 May 24
0
[PATCH 4/4] drm/nouveau/acpi: fix lockup with PCIe runtime PM
...parent_pdev = pci_upstream_bridge(pdev);
+ struct acpi_device *ad;
+
+ if (!parent_pdev)
+ return false;
+
+ ad = ACPI_COMPANION(&parent_pdev->dev);
+ if (!ad)
+ return false;
+
+ return ad->power.flags.power_resources;
+}
+
static void nouveau_dsm_pci_probe(struct pci_dev *pdev, bool *has_mux,
- bool *has_opt, bool *has_opt_flags)
+ bool *has_opt, bool *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 =...
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 Jul 07
0
[PATCH v2 1/4] drm/nouveau/acpi: ensure matching ACPI handle and supported functions
...the ACPI handle that is set in nouveau_dsm_pci_probe.
As there are no machines with a MUX function on just one PCI device and
an Optimus on another, there should not be a functional impact. This
change however makes this implicit assumption more obvious.
Convert int to bool and rename has_dsm to has_mux while at it. Let the
caller set nouveau_dsm_priv.dhandle as needed.
v2: pass dhandle to the caller.
Signed-off-by: Peter Wu <peter at lekensteyn.nl>
---
drivers/gpu/drm/nouveau/nouveau_acpi.c | 58 +++++++++++++++-------------------
1 file changed, 26 insertions(+), 32 deletions(-)
diff...
2016 Jul 15
0
[PATCH v3 1/4] drm/nouveau/acpi: ensure matching ACPI handle and supported functions
...the ACPI handle that is set in nouveau_dsm_pci_probe.
As there are no machines with a MUX function on just one PCI device and
an Optimus on another, there should not be a functional impact. This
change however makes this implicit assumption more obvious.
Convert int to bool and rename has_dsm to has_mux while at it. Let the
caller set nouveau_dsm_priv.dhandle as needed.
v2: pass dhandle to the caller.
Reviewed-by: Hans de Goede <hdegoede at redhat.com>
Signed-off-by: Peter Wu <peter at lekensteyn.nl>
---
drivers/gpu/drm/nouveau/nouveau_acpi.c | 58 +++++++++++++++-------------------...
2016 May 27
0
[PATCH 4/4] drm/nouveau/acpi: fix lockup with PCIe runtime PM
...; > + ad = ACPI_COMPANION(&parent_pdev->dev);
> > + if (!ad)
> > + return false;
> > +
> > + return ad->power.flags.power_resources;
> > +}
> > +
> > static void nouveau_dsm_pci_probe(struct pci_dev *pdev, bool *has_mux,
> > - bool *has_opt, bool *has_opt_flags)
> > + bool *has_opt, bool *has_opt_flags,
> > + bool *has_power_resources)
> > {
> > acpi_handle dhandle;
> >...
2016 Jul 07
0
[PATCH v2 4/4] drm/nouveau/acpi: fix lockup with PCIe runtime PM
...(!parent_pdev)
+ return false;
+
+ parent_adev = ACPI_COMPANION(&parent_pdev->dev);
+ if (!parent_adev)
+ return false;
+
+ return acpi_has_method(parent_adev->handle, "_PR3");
+}
+
static void nouveau_dsm_pci_probe(struct pci_dev *pdev, acpi_handle *dhandle_out,
bool *has_mux, bool *has_opt,
- bool *has_opt_flags)
+ 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_...
2016 May 30
0
[PATCH 4/4] drm/nouveau/acpi: fix lockup with PCIe runtime PM
...gt; >> > + if (!ad)
> >> > + return false;
> >> > +
> >> > + return ad->power.flags.power_resources;
> >> > +}
> >> > +
> >> > static void nouveau_dsm_pci_probe(struct pci_dev *pdev, bool *has_mux,
> >> > - bool *has_opt, bool *has_opt_flags)
> >> > + bool *has_opt, bool *has_opt_flags,
> >> > + bool *has_power_resources)
> >> > {
> >> >...
2020 Apr 23
1
[PATCH 1/1] drm/nouveau: Use generic helper to check _PR3 presence
...PANION(&parent_pdev->dev);
- if (!parent_adev)
- return false;
-
- return parent_adev->power.flags.power_resources &&
- acpi_has_method(parent_adev->handle, "_PR3");
-}
-
static void nouveau_dsm_pci_probe(struct pci_dev *pdev, acpi_handle *dhandle_out,
bool *has_mux, bool *has_opt,
bool *has_opt_flags, bool *has_pr3)
@@ -250,6 +219,16 @@ static void nouveau_dsm_pci_probe(struct pci_dev *pdev, acpi_handle *dhandle_out
acpi_handle dhandle;
bool supports_mux;
int optimus_funcs;
+ struct pci_dev *parent_pdev;
+
+ *has_pr3 = false;
+ parent_pdev = pci_...
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 change...
2016 May 24
0
[PATCH 2/4] drm/nouveau/acpi: return supported DSM functions
...<< NOUVEAU_DSM_OPTIMUS_CAPS);
+ if (result & 1 && result & (1 << NOUVEAU_DSM_OPTIMUS_CAPS))
+ return result;
+ return 0;
}
static int nouveau_dsm(acpi_handle handle, int func, int arg)
@@ -214,7 +216,7 @@ static void nouveau_dsm_pci_probe(struct pci_dev *pdev, bool *has_mux,
{
acpi_handle dhandle;
bool supports_mux;
- bool supports_opt;
+ int optimus_funcs;
dhandle = ACPI_HANDLE(&pdev->dev);
if (!dhandle)
@@ -225,17 +227,17 @@ static void nouveau_dsm_pci_probe(struct pci_dev *pdev, bool *has_mux,
supports_mux = acpi_check_dsm(dhandle, nouveau_dsm...
2015 May 25
15
[PATCH 1/8] acpi: Rename v1 DSM to mux to avoid ambiguity
...ool dsm_detected;
+ bool mux_detected;
bool optimus_detected;
acpi_handle dhandle;
acpi_handle rom_handle;
@@ -53,15 +53,15 @@ bool nouveau_is_optimus(void) {
return nouveau_dsm_priv.optimus_detected;
}
-bool nouveau_is_v1_dsm(void) {
- return nouveau_dsm_priv.dsm_detected;
+bool nouveau_has_mux(void) {
+ return nouveau_dsm_priv.mux_detected;
}
#define NOUVEAU_DSM_HAS_MUX 0x1
#define NOUVEAU_DSM_HAS_OPT 0x2
#ifdef CONFIG_VGA_SWITCHEROO
-static const char nouveau_dsm_muid[] = {
+static const char nouveau_mux_dsm_muid[] = {
0xA0, 0xA0, 0x95, 0x9D, 0x60, 0x00, 0x48, 0x4D,
0xB3, 0x...
2016 Jul 07
0
[PATCH v2 2/4] drm/nouveau/acpi: return supported DSM functions
...R);
- supports_opt = nouveau_check_optimus_dsm(dhandle);
+ optimus_funcs = nouveau_dsm_get_optimus_functions(dhandle);
/* Does not look like a Nvidia device. */
- if (!supports_mux && !supports_opt)
+ if (!supports_mux && !optimus_funcs)
return;
*dhandle_out = dhandle;
*has_mux = supports_mux;
- *has_opt = supports_opt;
+ *has_opt = !!optimus_funcs;
- if (supports_opt) {
+ if (optimus_funcs) {
uint32_t result;
nouveau_optimus_dsm(dhandle, NOUVEAU_DSM_OPTIMUS_CAPS, 0,
&result);
--
2.9.0
2016 Jul 15
0
[PATCH v3 2/4] drm/nouveau/acpi: return supported DSM functions
...R);
- supports_opt = nouveau_check_optimus_dsm(dhandle);
+ optimus_funcs = nouveau_dsm_get_optimus_functions(dhandle);
/* Does not look like a Nvidia device. */
- if (!supports_mux && !supports_opt)
+ if (!supports_mux && !optimus_funcs)
return;
*dhandle_out = dhandle;
*has_mux = supports_mux;
- *has_opt = supports_opt;
+ *has_opt = !!optimus_funcs;
- if (supports_opt) {
+ if (optimus_funcs) {
uint32_t result;
nouveau_optimus_dsm(dhandle, NOUVEAU_DSM_OPTIMUS_CAPS, 0,
&result);
--
2.9.0