summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nvif
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2022-06-01 13:46:33 +0300
committerBen Skeggs <bskeggs@redhat.com>2022-11-09 01:22:02 +0300
commita9f5d7721923f6016578167640b8dd5cb0c5a698 (patch)
tree07f170e31e4473800610d5db1663084c05e140d7 /drivers/gpu/drm/nouveau/nvif
parentf530bc60a30bee47ff51b7fb71511fdd058b774a (diff)
downloadlinux-a9f5d7721923f6016578167640b8dd5cb0c5a698.tar.xz
drm/nouveau/disp: move HDA ELD method
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvif')
-rw-r--r--drivers/gpu/drm/nouveau/nvif/outp.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvif/outp.c b/drivers/gpu/drm/nouveau/nvif/outp.c
index 987bc3a9e7bf..3a7c2d573e69 100644
--- a/drivers/gpu/drm/nouveau/nvif/outp.c
+++ b/drivers/gpu/drm/nouveau/nvif/outp.c
@@ -26,6 +26,27 @@
#include <nvif/class.h>
int
+nvif_outp_hda_eld(struct nvif_outp *outp, int head, void *data, u32 size)
+{
+ struct {
+ struct nvif_outp_hda_eld_v0 mthd;
+ u8 data[128];
+ } args;
+ int ret;
+
+ if (WARN_ON(size > ARRAY_SIZE(args.data)))
+ return -EINVAL;
+
+ args.mthd.version = 0;
+ args.mthd.head = head;
+
+ memcpy(args.data, data, size);
+ ret = nvif_mthd(&outp->object, NVIF_OUTP_V0_HDA_ELD, &args, sizeof(args.mthd) + size);
+ NVIF_ERRON(ret, &outp->object, "[HDA_ELD head:%d size:%d]", head, size);
+ return ret;
+}
+
+int
nvif_outp_infoframe(struct nvif_outp *outp, u8 type, struct nvif_outp_infoframe_v0 *args, u32 size)
{
int ret;