search for: acpi_handl

Displaying 20 results from an estimated 70 matches for "acpi_handl".

Did you mean: acpi_handle
2017 May 04
0
[PATCH v1] ACPI: Switch to use generic UUID API
...gt; --- a/drivers/acpi/acpi_extlog.c > +++ b/drivers/acpi/acpi_extlog.c > @@ -182,17 +182,17 @@ static int extlog_print(struct notifier_block *nb, unsigned long val, > > static bool __init extlog_get_l1addr(void) > { > - u8 uuid[16]; > + uuid_le uuid; > acpi_handle handle; > union acpi_object *obj; > > - acpi_str_to_uuid(extlog_dsm_uuid, uuid); > - > + if (uuid_le_to_bin(extlog_dsm_uuid, &uuid)) > + return false; > if (ACPI_FAILURE(acpi_get_handle(NULL, "\\_SB", &handle))) >...
2017 May 04
12
[PATCH v1] ACPI: Switch to use generic UUID API
.../acpi/acpi_extlog.c index 502ea4dc2080..69d6140b6afa 100644 --- a/drivers/acpi/acpi_extlog.c +++ b/drivers/acpi/acpi_extlog.c @@ -182,17 +182,17 @@ static int extlog_print(struct notifier_block *nb, unsigned long val, static bool __init extlog_get_l1addr(void) { - u8 uuid[16]; + uuid_le uuid; acpi_handle handle; union acpi_object *obj; - acpi_str_to_uuid(extlog_dsm_uuid, uuid); - + if (uuid_le_to_bin(extlog_dsm_uuid, &uuid)) + return false; if (ACPI_FAILURE(acpi_get_handle(NULL, "\\_SB", &handle))) return false; - if (!acpi_check_dsm(handle, uuid, EXTLOG_DSM_REV, 1 <...
2016 May 14
1
[PATCH] drm/nouveau: check function before using it
...eau_acpi.c b/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_d...
2015 May 25
15
[PATCH 1/8] acpi: Rename v1 DSM to mux to avoid ambiguity
...M_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) { 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 NOUVEA...
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).
2020 Apr 23
1
[PATCH 1/1] drm/nouveau: Use generic helper to check _PR3 presence
...n false; - } - - parent_adev = ACPI_COMPANION(&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; + + *h...
2016 Jul 07
0
[PATCH v2 2/4] drm/nouveau/acpi: return supported DSM functions
...d, 9 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c index 886a67c..572ac30 100644 --- a/drivers/gpu/drm/nouveau/nouveau_acpi.c +++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c @@ -107,7 +107,7 @@ static int nouveau_optimus_dsm(acpi_handle handle, int func, int arg, uint32_t * * requirements on the fourth parameter, so a private implementation * instead of using acpi_check_dsm(). */ -static int nouveau_check_optimus_dsm(acpi_handle handle) +static int nouveau_dsm_get_optimus_functions(acpi_handle handle) { int result; @@...
2016 Jul 15
0
[PATCH v3 2/4] drm/nouveau/acpi: return supported DSM functions
...d, 9 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c index 886a67c..572ac30 100644 --- a/drivers/gpu/drm/nouveau/nouveau_acpi.c +++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c @@ -107,7 +107,7 @@ static int nouveau_optimus_dsm(acpi_handle handle, int func, int arg, uint32_t * * requirements on the fourth parameter, so a private implementation * instead of using acpi_check_dsm(). */ -static int nouveau_check_optimus_dsm(acpi_handle handle) +static int nouveau_dsm_get_optimus_functions(acpi_handle handle) { int result; @@...
2015 May 28
12
[PATCH v2 1/9] acpi: Rename v1 DSM to mux to avoid ambiguity
...M_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) { 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 NOUVEA...
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 2/4] drm/nouveau/acpi: return supported DSM functions
...d, 9 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c index 45fa9b2..71d5e6a 100644 --- a/drivers/gpu/drm/nouveau/nouveau_acpi.c +++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c @@ -107,7 +107,7 @@ static int nouveau_optimus_dsm(acpi_handle handle, int func, int arg, uint32_t * * requirements on the fourth parameter, so a private implementation * instead of using acpi_check_dsm(). */ -static int nouveau_check_optimus_dsm(acpi_handle handle) +static int nouveau_dsm_get_optimus_functions(acpi_handle handle) { int result; @@...
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
0
[PATCH v2 3/4] drm/nouveau/acpi: check for function 0x1B before using it
..._acpi.c b/drivers/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 *h...
2016 Jul 15
0
[PATCH v3 3/4] drm/nouveau/acpi: check for function 0x1B before using it
..._acpi.c b/drivers/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 *h...
2023 Aug 25
1
[PATCH 2/5] ALSA: hda/intel: Use pci_get_base_class() to reduce duplicated code
...16 +++++----------- 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)) {...
2014 Mar 26
3
[PATCH] acpi: allow non-optimus setups to load vbios from acpi
...pply). drm/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 Jul 07
0
[PATCH v2 4/4] drm/nouveau/acpi: fix lockup with PCIe runtime PM
...m/nouveau/nouveau_acpi.c index ad273ad..38a6445 100644 --- a/drivers/gpu/drm/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,9 +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 the device into + * D3cold, they ins...
2015 Jan 17
0
[PATCH RFC] nouveau: Add support for Gmux _DSM method
...GS_CHANGED) +#define NOUVEAU_DSM_GMUX_UNK7 0x7 + /* result of the optimus caps function */ #define OPTIMUS_ENABLED (1 << 0) #define OPTIMUS_STATUS_MASK (3 << 3) @@ -45,6 +47,7 @@ static struct nouveau_dsm_priv { bool dsm_detected; bool optimus_detected; + bool gmux_detected; acpi_handle dhandle; acpi_handle rom_handle; } nouveau_dsm_priv; @@ -57,8 +60,13 @@ bool nouveau_is_v1_dsm(void) { return nouveau_dsm_priv.dsm_detected; } -#define NOUVEAU_DSM_HAS_MUX 0x1 -#define NOUVEAU_DSM_HAS_OPT 0x2 +bool nouveau_has_gmux_dsm(void) { + return nouveau_dsm_priv.gmux_detected; +} +...
2015 May 25
2
[PATCH 5/8] acpi: Check returned object type by Optimus _DSM locally
...le changed, 12 insertions(+), 3 deletions(-) > > diff --git a/drm/nouveau/nouveau_acpi.c b/drm/nouveau/nouveau_acpi.c > index 073f7d7..7aeaf7d 100644 > --- a/drm/nouveau/nouveau_acpi.c > +++ b/drm/nouveau/nouveau_acpi.c > @@ -88,12 +88,12 @@ static int nouveau_evaluate_optimus_dsm(acpi_handle handle, int func, int arg, u > for (i = 0; i < 4; i++) > args_buff[i] = (arg >> i * 8) & 0xFF; > > - obj = acpi_evaluate_dsm_typed(handle, nouveau_op_dsm_muid, nouveau_op_dsm_rid, > - func, &argv4, AC...
2023 Dec 05
0
[PATCH] nouveau/gsp: drop some acpi related debug
...diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c index 6c0a8fbf0061..1dba7c49bd9a 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c @@ -1100,16 +1100,12 @@ r535_gsp_acpi_caps(acpi_handle handle, CAPS_METHOD_DATA *caps) if (!obj) return; - printk(KERN_ERR "nvop: obj type %d\n", obj->type); - printk(KERN_ERR "nvop: obj len %d\n", obj->buffer.length); - if (WARN_ON(obj->type != ACPI_TYPE_BUFFER) || WARN_ON(obj->buffer.length != 4)) re...