Displaying 20 results from an estimated 26 matches for "acpi_object".
2017 May 04
0
[PATCH v1] ACPI: Switch to use generic UUID API
...t; +++ 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;
> -...
2017 May 04
12
[PATCH v1] ACPI: Switch to use generic UUID API
...2ea4dc2080..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 << EXTLOG_FN_ADDR))
+ if (!...
2016 May 19
2
[PATCH] gpu/nouveau/nouveau_acpi.c: Fix Type Mismatch ACPI warning
...--- a/drivers/gpu/drm/nouveau/nouveau_acpi.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c
> @@ -73,22 +73,10 @@ static const char nouveau_op_dsm_muid[] = {
>
> static int nouveau_optimus_dsm(acpi_handle handle, int func, int arg, uint32_t *result)
> {
> - int i;
> union acpi_object *obj;
> - char args_buff[4];
> - union acpi_object argv4 = {
> - .buffer.type = ACPI_TYPE_BUFFER,
> - .buffer.length = 4,
> - .buffer.pointer = args_buff
> - };
> -
> - /* ACPI is little endian, AABBCCDD becomes {DD,CC,BB,AA} */
> - for (i = 0; i < 4; i++)
> - a...
2020 Jul 27
0
[PATCH 1/4] drm: retrieve EDID via ACPI _DDC method
...switcheroo(struct drm_connector *connector,
}
EXPORT_SYMBOL(drm_get_edid_switcheroo);
+#if defined(CONFIG_ACPI) && defined(CONFIG_PCI)
+static u64 *get_dod_entries(acpi_handle handle, int *count)
+{
+ acpi_status status;
+ struct acpi_buffer buf = { ACPI_ALLOCATE_BUFFER, NULL };
+ union acpi_object *dod;
+ int i;
+ u64 *ret = NULL;
+
+ *count = 0;
+
+ status = acpi_evaluate_object(handle, "_DOD", NULL, &buf);
+
+ if (ACPI_FAILURE(status))
+ return NULL;
+
+ dod = buf.pointer;
+
+ if (dod == NULL || dod->type != ACPI_TYPE_PACKAGE)
+ goto done;
+
+ ret = kmalloc_array(dod->...
2020 Jul 27
6
[PATCH 0/4] drm: add support for retrieving EDID via ACPI _DDC
Some notebook systems provide the EDID for the internal panel via the
_DDC method in ACPI, instead of or in addition to providing the EDID via
DDC on LVDS/eDP. Add a DRM helper to search for an ACP _DDC method under
the ACPI namespace for each VGA/3D controller, and return the first EDID
successfully retrieved via _DDC. Update the i915, nouveau, and radeon
DRM-KMS drivers to fall back to
2015 Jan 17
0
[PATCH RFC] nouveau: Add support for Gmux _DSM method
...le handle, int func, int arg, uint32_t *result)
{
int i;
@@ -212,6 +225,63 @@ static struct vga_switcheroo_handler nouveau_dsm_handler = {
.get_client_id = nouveau_dsm_get_client_id,
};
+static int nouveau_gmux_dsm(acpi_handle handle, int func, int arg, uint32_t *result)
+{
+ int i;
+ union acpi_object *obj;
+ char args_buff[4];
+ union acpi_object argv4 = {
+ .buffer.type = ACPI_TYPE_BUFFER,
+ .buffer.length = 4,
+ .buffer.pointer = args_buff
+ };
+
+ /* ACPI is little endian, AABBCCDD becomes {DD,CC,BB,AA} */
+ for (i = 0; i < 4; i++)
+ args_buff[i] = (arg >> i * 8) & 0xFF;
+
+...
2016 May 20
0
[PATCH] gpu/nouveau/nouveau_acpi.c: Fix Type Mismatch ACPI warning
...gt; > +++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c
> > @@ -73,22 +73,10 @@ static const char nouveau_op_dsm_muid[] = {
> >
> > static int nouveau_optimus_dsm(acpi_handle handle, int func, int arg,
> uint32_t *result)
> > {
> > - int i;
> > union acpi_object *obj;
> > - char args_buff[4];
> > - union acpi_object argv4 = {
> > - .buffer.type = ACPI_TYPE_BUFFER,
> > - .buffer.length = 4,
> > - .buffer.pointer = args_buff
> > - };
> > -
> > - /* ACPI is lit...
2015 May 25
15
[PATCH 1/8] acpi: Rename v1 DSM to mux to avoid ambiguity
...c int nouveau_check_optimus_dsm(acpi_handle handle)
return result & 1 && result & (1 << NOUVEAU_DSM_OPTIMUS_CAPS);
}
-static int nouveau_dsm(acpi_handle handle, int func, int arg)
+static int nouveau_mux_dsm(acpi_handle handle, int func, int arg)
{
int ret = 0;
union acpi_object *obj;
@@ -137,7 +137,7 @@ static int nouveau_dsm(acpi_handle handle, int func, int arg)
.integer.value = arg,
};
- obj = acpi_evaluate_dsm_typed(handle, nouveau_dsm_muid, 0x00000102,
+ obj = acpi_evaluate_dsm_typed(handle, nouveau_mux_dsm_muid, 0x00000102,
func, &argv4, ACPI_T...
2017 May 04
0
[PATCH v1] ACPI: Switch to use generic UUID API
...gt; +static const uuid_le intel_dsm_guid =
> + UUID_LE(0x7ed873d3, 0xc2d0, 0x4e4f,
> + 0xa8, 0x54, 0x0f, 0x13, 0x17, 0xb0, 0x1c, 0x2c);
>
> static char *intel_dsm_port_name(u8 id)
> {
> @@ -80,7 +76,7 @@ static void intel_dsm_platform_mux_info(void)
> int i;
> union acpi_object *pkg, *connector_count;
>
> - pkg = acpi_evaluate_dsm_typed(intel_dsm_priv.dhandle, intel_dsm_guid,
> + pkg = acpi_evaluate_dsm_typed(intel_dsm_priv.dhandle, &intel_dsm_guid,
> INTEL_DSM_REVISION_ID, INTEL_DSM_FN_PLATFORM_MUX_INFO,
> NULL, ACPI_TYPE_PACKAGE);
> if...
2015 May 28
12
[PATCH v2 1/9] acpi: Rename v1 DSM to mux to avoid ambiguity
...c int nouveau_check_optimus_dsm(acpi_handle handle)
return result & 1 && result & (1 << NOUVEAU_DSM_OPTIMUS_CAPS);
}
-static int nouveau_dsm(acpi_handle handle, int func, int arg)
+static int nouveau_mux_dsm(acpi_handle handle, int func, int arg)
{
int ret = 0;
union acpi_object *obj;
@@ -137,7 +137,7 @@ static int nouveau_dsm(acpi_handle handle, int func, int arg)
.integer.value = arg,
};
- obj = acpi_evaluate_dsm_typed(handle, nouveau_dsm_muid, 0x00000102,
+ obj = acpi_evaluate_dsm_typed(handle, nouveau_mux_dsm_muid, 0x00000102,
func, &argv4, ACPI_T...
2009 Sep 20
1
[PATCH 1/2] drm/nouveau: unify logging format with DRM core
Change NV_PRINTK() to use DRM_NAME and DRIVER_NAME, making it
essentially generic. Print DRM_NAME in brackets, just like core DRM
logging macros do.
Convert two printk()'s into NV_* logging macro calls.
Signed-off-by: Pekka Paalanen <pq at iki.fi>
---
drivers/gpu/drm/nouveau/nouveau_acpi.c | 2 +-
drivers/gpu/drm/nouveau/nouveau_drv.h | 8 ++++++--
2023 Dec 22
11
nouveau GSP fixes
This is a collection of nouveau debug prints, memory leak, a very
annoying race condition causing system hangs with prime scenarios,
and a fix from Lyude to get the panel on my laptop working.
I'd like to get these into 6.7,
Dave.
2012 Feb 23
7
[PATCH 2/2] RFC: Xen pad logic
...&op);
+ if (ret)
+ return ret;
+
+ *num_cpus = op.u.core_parking.idle_nums;
+ return 0;
+}
+
+/*
+ * Query firmware how many CPUs should be idle
+ * return -1 on failure
+ */
+static int xen_acpi_pad_pur(acpi_handle handle)
+{
+ struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+ union acpi_object *package;
+ int num = -1;
+
+ if (ACPI_FAILURE(acpi_evaluate_object(handle, "_PUR", NULL, &buffer)))
+ return num;
+
+ if (!buffer.length || !buffer.pointer)
+ return num;
+
+ package = buffer.pointer;
+
+ if (package->type == ACPI_TYPE_PACKAGE &&
+ package->package.c...
2018 Nov 28
0
4.20.0-rc3 nouveau/Quadro P2000 Mobile: runpm causing ACPI errors, lockups
...> not a package: IIRC Index (decoded C-style here as []) can apply
> to either.
>
> Am I maybe misunderstanding the warning?
It looks like coming from the nouveau driver (assuming I'm reading it right).
drivers/gpu/drm/nouveau/nouveau_acpi.c::nouveau_optimus_dsm()
union acpi_object argv4 = {
.buffer.type = ACPI_TYPE_BUFFER,
.buffer.length = 4,
.buffer.pointer = args_buff
};
...
obj = acpi_evaluate_dsm_typed(handle, &nouveau_op_dsm_muid, 0x00000100,
func, &ar...
2018 Nov 28
2
4.20.0-rc3 nouveau/Quadro P2000 Mobile: runpm causing ACPI errors, lockups
On Tue, Nov 27, 2018 at 11:36:50AM +0200, Mika Westerberg wrote:
> +linux-acpi
>
> Hi Michael,
>
> On Mon, Nov 26, 2018 at 10:53:26PM -0500, Michael S. Tsirkin wrote:
> > So a new thinkpad:
> > 01:00.0 VGA compatible controller: NVIDIA Corporation GP107GLM [Quadro P2000 Mobile] (rev a1)
> >
> > Hangs whenever I try to poke at the card. It starts happily
2020 Aug 08
2
[PATCH 1/4] drm: retrieve EDID via ACPI _DDC method
...x/slab.h>
> #include <linux/vga_switcheroo.h>
> +#include <linux/pci.h>
Nit: Alphabetic ordering.
> +static u64 *get_dod_entries(acpi_handle handle, int *count)
> +{
> + acpi_status status;
> + struct acpi_buffer buf = { ACPI_ALLOCATE_BUFFER, NULL };
> + union acpi_object *dod;
> + int i;
> + u64 *ret = NULL;
Nits: Reverse christmas tree.
"ret" is a poor name, I'd suggest "entries" or something like that.
The spec says that _DOD is a list of 32-bit values, not 64-bit.
> + status = acpi_evaluate_object(handle, "_DOD", NULL...
2018 Nov 28
2
4.20.0-rc3 nouveau/Quadro P2000 Mobile: runpm causing ACPI errors, lockups
...yle here as []) can apply
> > to either.
> >
> > Am I maybe misunderstanding the warning?
>
> It looks like coming from the nouveau driver (assuming I'm reading it right).
>
> drivers/gpu/drm/nouveau/nouveau_acpi.c::nouveau_optimus_dsm()
>
> union acpi_object argv4 = {
> .buffer.type = ACPI_TYPE_BUFFER,
> .buffer.length = 4,
> .buffer.pointer = args_buff
> };
>
> ...
>
> obj = acpi_evaluate_dsm_typed(handle, &nouveau_op_dsm_muid, 0x00000100,
>...
2017 Feb 28
0
[PATCH 3/3] gpu: drm: drivers: Convert printk(KERN_<LEVEL> to pr_<level>
..._handle, NULL, &rom_arg, &buffer);
if (ACPI_FAILURE(status)) {
- printk(KERN_INFO "failed to evaluate ROM got %s\n", acpi_format_exception(status));
+ pr_info("failed to evaluate ROM got %s\n",
+ acpi_format_exception(status));
return -ENODEV;
}
obj = (union acpi_object *)buffer.pointer;
diff --git a/drivers/gpu/drm/nouveau/nouveau_vga.c b/drivers/gpu/drm/nouveau/nouveau_vga.c
index eef22c6b9665..ccb597eac538 100644
--- a/drivers/gpu/drm/nouveau/nouveau_vga.c
+++ b/drivers/gpu/drm/nouveau/nouveau_vga.c
@@ -41,13 +41,13 @@ nouveau_switcheroo_set_state(struct pci_de...
2017 Feb 28
8
[PATCH 2/2] gpu: drm: Convert printk(KERN_<LEVEL> to pr_<level>
...uffer);
> if (ACPI_FAILURE(status)) {
> - printk(KERN_INFO "failed to evaluate ROM got %s\n", acpi_format_exception(status));
> + pr_info("failed to evaluate ROM got %s\n",
> + acpi_format_exception(status));
> return -ENODEV;
> }
> obj = (union acpi_object *)buffer.pointer;
> diff --git a/drivers/gpu/drm/nouveau/nouveau_vga.c b/drivers/gpu/drm/nouveau/nouveau_vga.c
> index eef22c6b9665..ccb597eac538 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_vga.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_vga.c
> @@ -41,13 +41,13 @@ nouveau_switchero...
2020 Oct 17
10
[RFC] treewide: cleanup unreachable breaks
...y);
return 0;
- break;
}
if (sh_psize > min_t(u32, buf_size, max_size))
return 0;
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index 838b719ec7ce..d5411a166685 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -102,11 +102,10 @@ acpi_extract_package(union acpi_object *package,
printk(KERN_WARNING PREFIX "Invalid package element"
" [%d]: got number, expecting"
" [%c]\n",
i, format_string[i]);
return AE_BAD_DATA;
- break;
}
break;
case ACPI_TYPE_STRING:
case ACPI_TYPE_B...