From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C12B533E34E for ; Fri, 14 Aug 2026 23:58:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786751936; cv=none; b=rbRjRoQXspLf6ZV/9DfJSPsyjVrYZ4La31WtIEJy1Hms2YnYQXOZbFf+CIuz0vQs5VHJjN4yQT0MruGkN3iZ85SQsWIIVVwjU4W/19Cx1kEccoGPSwklVxaAObrcSDbUc4B2TjSYpdABxzXd6nv7ZruIcw6cxp0vzZm/8rE5hqY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786751936; c=relaxed/simple; bh=8U+wR9b0Fbmuhj204HqoHlWwQJ3Pvuxo0+bvY8LdjgY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bE1tRngEGPVvOHBzTzeqsLPbUuQTW6eeHvTPDL2t0CcalZe/Q0DzcsG5Z5P8xvCt06kT457U88BTcirDuIZy4sxWqoMS/OOA0zwVBQHXlnpVuKGHT7yjbXFGvCmZc8TlbFycb4rn3CvtT9wLPuZNGLB3p+nJYuad7F8/awqOT3w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=aHgSS5Mk; arc=none smtp.client-ip=209.85.128.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="aHgSS5Mk" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4995b0343c1so15150685e9.3 for ; Fri, 14 Aug 2026 16:58:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786751931; x=1787356731; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=R6DVPxscTkaYxlbTz2TUJ+2+zTnJDWDA7fd5WXD5WOU=; b=aHgSS5Mk4k7uJkicpkAPWR88hncPvK+AzZaVh1IKI+Vf/kZONSmd3R/6/Cru8N5osp JVR+/FdldZv6N47mzH3kmieRS/SqZPZJFhM2pgYGEGokd8I9i/RrrGULBvKLIICMV7NS zqh95Mn3xPPU6yt47s2ctGPm20jPHwmADgNMKUgq0vPM3Si/DxHxdRse+Lf/H1CmqqUw 6FUFMiLZqxXFLRssQStXMA+IQ824AiwEogQU//3YShYnpQxXQ+VV1/Az2dQPGDVVEc+Q 12abdMyHuVWIjyM+UTY4R/MaNGqDswMRKH6FQQF4xa7prLC2hN0MFYiWqFd/oC2noLBs o59Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786751931; x=1787356731; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=R6DVPxscTkaYxlbTz2TUJ+2+zTnJDWDA7fd5WXD5WOU=; b=Njxh2dDbbPXgqeAzYq4P1cQ8SWkv4cwn4GV36MTVTB84A/5lGTpCJ1ovVPTCqjzFmJ /cnXeIfSxA0UyeHYvR9CiFLvL+YLne3tj5R77UeCJAJ+xcjL7OI4BMoXdGRi6Rxh7AzG mW6vSiixxEqCvi5pSUN1/cXxQGQ9xFF5xmDfXBfAAQBgQh8CTviau7tsiZxyCd4iilR/ lB6LSEMtG+lUIFcCzoGnr9K/i3GxkIxCtWYW4M+bmxeNnxWpobkceBGnFobQjE60hfVu TLE4nCjd/5APVP3MDVXsnq/x9FLLJjQpzLyTv0LIvWMs7p+KPIIklzfNdsOAXmNvx50j FM5Q== X-Gm-Message-State: AOJu0YxxOZpTJuo25ZB3vjz6W5jk+8rxdTOjMH4Mgsq64TmM3syETOjP 8Apln2bp9+pqvD3Zg/EMWemxA3oeT35V7K4e3pfz+f8OIVWOeBHoVKb+CO5cT0VLFOw= X-Gm-Gg: AR+sD12Rz8DDFHE3Od+//xSAsDbVSVQJz0DQiSf97Qt7TwSoCpYlkEFFHUCFmDsNixP Jnj0OqsbHmZrUP9tajoRME/TaweoipNUZ4ycjAUmhI82KKt63p39YX7Sr6K6q8gj9em1vRu2xcm dxad3oc7m0/Ge4bTH9mE9r9ZcqwvUzjl+mQghGD0jLYLYQOfPTRKkjiZHEa9W2Aw73DY4gcSAeT F9Z+LcvZ1+Vf0TIkmFCCCXpZs8gqHJXc3H9C2QLxzOxEPPfh9x982qjz25e0Dg4pT8h0N5kzrkv cyaTDj+C8yd0K9KS64SKh464HRZM4MghXuo1GZVLzMCBiPHxrLuvSmbGoCzwJH+nx6u2BrR7I24 8VWx3iTJsiNBtWAsN1CL8CESXLft3norNAtIcYPcRskFq7FPuvGlHpvQ+1iHBOdgRrskrb7EKMP 9nt+km6iWNvai0NJFoCL9Vz1kaKk4OdiKo2n9U6fVy5kH+qTT9Y5nWymTAr5BYc2jMQUw= X-Received: by 2002:a05:600c:b99:b0:496:c379:b2a1 with SMTP id 5b1f17b1804b1-49987929903mr128849405e9.2.1786751931136; Fri, 14 Aug 2026 16:58:51 -0700 (PDT) Received: from fedora ([5.31.134.170]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-499899753ccsm77751245e9.0.2026.08.14.16.58.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Aug 2026 16:58:50 -0700 (PDT) From: Mohamed Ahmed To: linux-kernel@vger.kernel.org Cc: dri-devel@lists.freedesktop.org, Lyude Paul , Danilo Krummrich , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Mary Guillemard , nouveau@lists.freedesktop.org, Mohamed Ahmed Subject: [PATCH 3/7] nouveau/gsp: fix HDMI GCP AVMute register offsets on GB20x Date: Sat, 15 Aug 2026 03:57:01 +0400 Message-ID: <20260814235705.59132-4-mohamedahmedegypt2001@gmail.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260814235705.59132-1-mohamedahmedegypt2001@gmail.com> References: <20260814235705.59132-1-mohamedahmedegypt2001@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit r535_sor_hdmi_audio() brackets audio enablement with a General Control Packet AVMute toggle written through the legacy GCP unit at 0x6f00c0/0x6f00cc. On GB20x the SF packet units were compacted and the old generic and audio-infoframe units are gone and the GCP unit moved from slot 3 to slot 1 (control 0x6f0040 and subpack 0x6f004c from NVIDIA's published clc971.h. The same offsets are also used by OpenRM's hdmiWriteGeneralCtrlPacketC871() on these chips). The old addresses are reserved on GB20x, so the AVMute writes were silent no-ops and mitigated only by the equivalent GCP this function already sends through the SET_OD_PACKET RM control. Add a GB20x variant of the audio function using the new offsets, keeping the direct MMIO path in sync with the hardware as on earlier chips. Signed-off-by: Mohamed Ahmed --- .../drm/nouveau/nvkm/subdev/gsp/rm/r535/disp.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/disp.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/disp.c index 96febd01da78..f51ad7c754d8 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/disp.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/disp.c @@ -559,6 +559,21 @@ r535_sor_hdmi_audio(struct nvkm_ior *sor, int head, bool enable) nvkm_mask(device, 0x6f00c0 + hdmi, 0x00000001, 0x00000001); } +static void +gb202_sor_hdmi_audio(struct nvkm_ior *sor, int head, bool enable) +{ + struct nvkm_device *device = sor->disp->engine.subdev.device; + const u32 hdmi = head * 0x400; + + r535_sor_hdmi_ctrl_audio(sor->asy.outp, enable); + r535_sor_hdmi_ctrl_audio_mute(sor->asy.outp, !enable); + + /* General Control (GCP): the unit moved to slot 1 on NVD5.0. */ + nvkm_mask(device, 0x6f0040 + hdmi, 0x00000001, 0x00000000); + nvkm_wr32(device, 0x6f004c + hdmi, !enable ? 0x00000001 : 0x00000010); + nvkm_mask(device, 0x6f0040 + hdmi, 0x00000001, 0x00000001); +} + static void r535_sor_hdmi_ctrl(struct nvkm_ior *sor, int head, bool enable, u8 max_ac_packet, u8 rekey) { @@ -595,7 +610,7 @@ gb202_sor_hdmi = { /* The legacy AVI unit is unchanged on GB20x. */ .infoframe_avi = gv100_sor_hdmi_infoframe_avi, .infoframe_vsi = gb202_sor_hdmi_infoframe_vsi, - .audio = r535_sor_hdmi_audio, + .audio = gb202_sor_hdmi_audio, .frl_train = r535_sor_frl_train, }; -- 2.55.0