Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 02d69294 authored by Ilia Mirkin's avatar Ilia Mirkin Committed by Ben Skeggs
Browse files

drm/nva3-/disp: fix hda eld writing, needs to be padded

Commits 0a9e2b95 (drm/nvd0/disp: move HDA codec setup to core) and
a4feaf4e (drm/nva3/disp: move hda codec handling to core) moved code
around but neglected to fill data up to 0x60 as before. This caused
/proc/asound/cardN/eld#3.0 to show eld_valid as 0. With this patch, that
file is again populated with the correct data.

See https://bugs.freedesktop.org/show_bug.cgi?id=67051



Reported-and-tested-by: default avatarAlex <alupu01@gmail.com>
Signed-off-by: default avatarIlia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 18f35fa6
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -36,6 +36,8 @@ nva3_hda_eld(struct nv50_disp_priv *priv, int or, u8 *data, u32 size)
	if (data && data[0]) {
		for (i = 0; i < size; i++)
			nv_wr32(priv, 0x61c440 + soff, (i << 8) | data[i]);
		for (; i < 0x60; i++)
			nv_wr32(priv, 0x61c440 + soff, (i << 8));
		nv_mask(priv, 0x61c448 + soff, 0x80000003, 0x80000003);
	} else
	if (data) {
+2 −0
Original line number Diff line number Diff line
@@ -41,6 +41,8 @@ nvd0_hda_eld(struct nv50_disp_priv *priv, int or, u8 *data, u32 size)
	if (data && data[0]) {
		for (i = 0; i < size; i++)
			nv_wr32(priv, 0x10ec00 + soff, (i << 8) | data[i]);
		for (; i < 0x60; i++)
			nv_wr32(priv, 0x10ec00 + soff, (i << 8));
		nv_mask(priv, 0x10ec10 + soff, 0x80000003, 0x80000003);
	} else
	if (data) {