Displaying 20 results from an estimated 57 matches for "dhandle".
Did you mean:
handle
2016 Jul 07
0
[PATCH v2 1/4] drm/nouveau/acpi: ensure matching ACPI handle and supported functions
...s 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 --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/...
2016 Jul 15
0
[PATCH v3 1/4] drm/nouveau/acpi: ensure matching ACPI handle and supported functions
...s 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 +++++++++++++++-------------------
1 file changed, 26 insertions(+), 32 deletions(-)
diff...
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 14
1
[PATCH] drm/nouveau: check function before using it
.../drivers/gpu/drm/nouveau/nouveau_acpi.c
index cdf5227..002371a 100644
--- a/drivers/gpu/drm/nouveau/nouveau_acpi.c
+++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c
@@ -45,6 +45,7 @@
static struct nouveau_dsm_priv {
bool dsm_detected;
bool optimus_detected;
+ bool flags_func_detected;
acpi_handle dhandle;
acpi_handle rom_handle;
} nouveau_dsm_priv;
@@ -58,7 +59,6 @@ bool nouveau_is_v1_dsm(void) {
}
#define NOUVEAU_DSM_HAS_MUX 0x1
-#define NOUVEAU_DSM_HAS_OPT 0x2
#ifdef CONFIG_VGA_SWITCHEROO
static const char nouveau_dsm_muid[] = {
@@ -110,9 +110,9 @@ static int nouveau_optimus_dsm(acpi_h...
2023 Aug 25
1
[PATCH 2/5] ALSA: hda/intel: Use pci_get_base_class() to reduce duplicated code
...--------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index a21b61ad08d1..811a149584f2 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1429,17 +1429,11 @@ static bool atpx_present(void)
acpi_handle dhandle, atpx_handle;
acpi_status status;
- while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev)) != NULL) {
- dhandle = ACPI_HANDLE(&pdev->dev);
- if (dhandle) {
- status = acpi_get_handle(dhandle, "ATPX", &atpx_handle);
- if (ACPI_SUCCESS(status)) {
- pci...
2016 Jul 07
0
[PATCH v2 3/4] drm/nouveau/acpi: check for function 0x1B before using it
...ivers/gpu/drm/nouveau/nouveau_acpi.c
index 572ac30..ad273ad 100644
--- a/drivers/gpu/drm/nouveau/nouveau_acpi.c
+++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c
@@ -45,6 +45,7 @@
static struct nouveau_dsm_priv {
bool dsm_detected;
bool optimus_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,
+...
2016 Jul 15
0
[PATCH v3 3/4] drm/nouveau/acpi: check for function 0x1B before using it
...ivers/gpu/drm/nouveau/nouveau_acpi.c
index 572ac30..ad273ad 100644
--- a/drivers/gpu/drm/nouveau/nouveau_acpi.c
+++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c
@@ -45,6 +45,7 @@
static struct nouveau_dsm_priv {
bool dsm_detected;
bool optimus_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,
+...
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 30
2
[PATCH 4/4] drm/nouveau/acpi: fix lockup with PCIe runtime PM
...eau/nouveau_acpi.c
>> > @@ -46,6 +46,7 @@ static struct nouveau_dsm_priv {
>> > bool dsm_detected;
>> > bool optimus_detected;
>> > bool optimus_flags_detected;
>> > + bool optimus_skip_dsm;
>> > acpi_handle dhandle;
>> > acpi_handle rom_handle;
>> > } nouveau_dsm_priv;
>> > @@ -212,8 +213,26 @@ static const struct vga_switcheroo_handler nouveau_dsm_handler = {
>> > .get_client_id = nouveau_dsm_get_client_id,
>> > };
>> >
>> > +/*...
2015 May 25
15
[PATCH 1/8] acpi: Rename v1 DSM to mux to avoid ambiguity
...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) {
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...
2023 Aug 25
7
[PATCH 0/5] Add the pci_get_base_class() helper and use it
From: Sui Jingfeng <suijingfeng at loongson.cn>
There is no function that can be used to get all PCI(e) devices in a
system by matching against its the PCI base class code only, while keep
the sub-class code and the programming interface ignored. Therefore, add
the pci_get_base_class() function to suit the need.
For example, if an application want to process all PCI(e) display devices
in a
2016 May 24
0
[PATCH 2/4] drm/nouveau/acpi: return supported DSM functions
...US_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_muid, 0x00000102,...
2014 Mar 26
3
[PATCH] acpi: allow non-optimus setups to load vbios from acpi
.../nouveau_acpi.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drm/nouveau_acpi.c b/drm/nouveau_acpi.c
index 83face3..2792069 100644
--- a/drm/nouveau_acpi.c
+++ b/drm/nouveau_acpi.c
@@ -389,9 +389,6 @@ bool nouveau_acpi_rom_supported(struct pci_dev *pdev)
acpi_status status;
acpi_handle dhandle, rom_handle;
- if (!nouveau_dsm_priv.dsm_detected && !nouveau_dsm_priv.optimus_detected)
- return false;
-
dhandle = ACPI_HANDLE(&pdev->dev);
if (!dhandle)
return false;
--
1.8.3.2
2016 May 24
0
[PATCH 3/4] drm/nouveau/acpi: check for function 0x1B before using it
...ivers/gpu/drm/nouveau/nouveau_acpi.c
index 71d5e6a..df9f73e 100644
--- a/drivers/gpu/drm/nouveau/nouveau_acpi.c
+++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c
@@ -45,6 +45,7 @@
static struct nouveau_dsm_priv {
bool 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 dhan...
2016 Jul 07
0
[PATCH v2 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, acpi_handle *dhandle_out
{
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, acpi_handle *dhandle_out
supports_mux = acpi_check_dsm(dhandle...
2016 Jul 15
0
[PATCH v3 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, acpi_handle *dhandle_out
{
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, acpi_handle *dhandle_out
supports_mux = acpi_check_dsm(dhandle...
2015 May 28
12
[PATCH v2 1/9] acpi: Rename v1 DSM to mux to avoid ambiguity
...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) {
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...
2016 May 30
0
[PATCH 4/4] drm/nouveau/acpi: fix lockup with PCIe runtime PM
...t; > @@ -46,6 +46,7 @@ static struct nouveau_dsm_priv {
> >> > bool dsm_detected;
> >> > bool optimus_detected;
> >> > bool optimus_flags_detected;
> >> > + bool optimus_skip_dsm;
> >> > acpi_handle dhandle;
> >> > acpi_handle rom_handle;
> >> > } nouveau_dsm_priv;
> >> > @@ -212,8 +213,26 @@ static const struct vga_switcheroo_handler nouveau_dsm_handler = {
> >> > .get_client_id = nouveau_dsm_get_client_id,
> >> > };
> &...
2016 May 27
3
[PATCH 4/4] drm/nouveau/acpi: fix lockup with PCIe runtime PM
...nouveau/nouveau_acpi.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c
> @@ -46,6 +46,7 @@ static struct nouveau_dsm_priv {
> bool dsm_detected;
> bool optimus_detected;
> bool optimus_flags_detected;
> + bool optimus_skip_dsm;
> acpi_handle dhandle;
> acpi_handle rom_handle;
> } nouveau_dsm_priv;
> @@ -212,8 +213,26 @@ static const struct vga_switcheroo_handler nouveau_dsm_handler = {
> .get_client_id = nouveau_dsm_get_client_id,
> };
>
> +/* Firmware supporting Windows 8 or later do not use _DSM to put...