From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (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 E731233E34E for ; Fri, 14 Aug 2026 23:58:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786751929; cv=none; b=eB74Ufk/+QvqeMQZxJQ0nabi+Cdub+mspCbOCZ6p1Aot+AGCLzU9oO6d8v5XBJsQo8L4nHwBaqZ0DA+MpKxI/wSYKKhxiwmibTtGmi4T7j8Jf5xBxoCq3LfAVf0zVil4RgyESvS+c/Q9IOa3CQcJe2+nzgD2F2kx2dqKpiOJ6K8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786751929; c=relaxed/simple; bh=2rQIsiu//nIZ4PZ+lW1xEvu8WfHghQl9uHU5hMerP9g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=D9IufjOIyxaJWQATEP7r5pTik+85s8C+57u010boEnOUI2rby70s5qu332cSgOTH85ESGD+lUvxG3+E8s+3+2lf+GxdtjDOsdK0/GucgPTiNB/aw6e6GTQGMgAU9p7Tj8gHAI5IKzXLN2ATKdhyMrG/c+c8HeszgTUjvy8S9HsQ= 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=ac2Zokx/; arc=none smtp.client-ip=209.85.128.45 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="ac2Zokx/" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-49978908b35so12696635e9.0 for ; Fri, 14 Aug 2026 16:58:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786751926; x=1787356726; 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=YPXxPr49E5YFipy1o/O5phwWh+kr0p/UDA08jPQpFV4=; b=ac2Zokx/2Iou3NN2sEr+go8rjBGHoBpA7I4V8sdy71KZkWeCShKHn8Cq7p0ycUcWp8 bDTsDFSZNi1ed1A0SDq0yXxmE2t1kjXn8EHlc+yHxEcRidgTEnk7GBaoD3btzMG7N95j bv8w5DhmbOdFgpOP5cUVsi1GofrvxmaZ6BakS8TBqhWShlgO6OznDM3am9vg5Omybd/0 SXivf5tcyBUS7uYLkVmdW+8jgFV3u5UzBRb/4m03b370F5bN4lICVMxskFp9+KrQmHox t/f5PSH63gQ4fGEccivlVQbP7eWaxUcrkupba+G4qj5J6Vqc/o3mY9yeY9RorugysqRS oRyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786751926; x=1787356726; 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=YPXxPr49E5YFipy1o/O5phwWh+kr0p/UDA08jPQpFV4=; b=ZHzTz1gsnKTAKgRjxbfTMnXG5yAIuKvmnyqY6GODwWk4oRy1m4amInxZrTQXJvkB5y 2jRVwRWXQGIYp+EeM2ggkCZyBkCRfsyKw4+JyOnYiX68gyjMDd0OeJHXpLl0IgDfdAmh sw6fHSFkyqdzS9pEQiSDrTk6dJ/+q7ebiFWwB8e9fk61640BlPJJNSmL8mChtoxy/EtC 2IfXfQMfvSD6LBukkq/UqH82miTZPTwytCthpLUsNk5AYPuQcBrET5+H5PNdwfG9I858 zZtNOPk1xts0pFU8NaxXFoy7s3w1qZPzdX71hPJtHKkYfKQF8yOD4ouR4CSOELxGsKIl VYEw== X-Gm-Message-State: AOJu0YwYazBXZrct36FQphfGBW2mpnLnYMSh2TRm9m4t5ZAo8ZIq2fVi GkcFlpP+07Cx9jAPo+YIxHVpjcZ6TFx09nGqgcmgrw2BpzPMY/bXAn2TSq9niuKror0= X-Gm-Gg: AR+sD12fvEWm/6MHCG4B+P5yqo//PHHRg5L8+CRwcEFhFDvH9j8fmE6UpehzAaenWhv fqDqBnqYBZ9HJ/mMROMawARhGmmz316SraCryjlS+lpohkJGJpYThNZV9qz9/lIE1tV288fu+g0 u0U/Og1LiLeuiNO+Dy1vKhInukiPJY4lIQUmlynbWOGlfF36pmlyiUKha9Wpj6RQiL7bBtRBbd7 A6VGKt2pZ0xhdNeCXgqUD+KVfihFL+aCH2NWzNushFebcpfJqoLS822ee3QrdYFZwvfilaxgvYF fb7P6WLViU9h5fhFxllHqavW+qT/OzR8fTDzqWywMzSAY00Bx/UoTCEj6uKvs8dNkxeLIlBwIuO WStnKYOa9YF11n4J1OdDgHmRMnJW3T9UOIoj0H0RiFx42wMNxTVVaz/cMWFfHF4XPN6Sk/fFpmU XP2GEEdZaKOj77OGQz7PmJMk4ogdM3UQoJVj4QeyVzcbjGDEaLWnPFuNzYx9D1AFqb5CQ= X-Received: by 2002:a05:600c:6051:b0:499:737c:8a8b with SMTP id 5b1f17b1804b1-49987980774mr83702945e9.12.1786751926216; Fri, 14 Aug 2026 16:58:46 -0700 (PDT) Received: from fedora ([5.31.134.170]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-499899753ccsm77751245e9.0.2026.08.14.16.58.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Aug 2026 16:58:45 -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 2/7] nouveau/gsp: fix HDMI vendor infoframes on GB20x Date: Sat, 15 Aug 2026 03:57:00 +0400 Message-ID: <20260814235705.59132-3-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 The GSP path reuses the GV100 direct-MMIO infoframe writers on every chip. On GB20x that is only half right as while the legacy SF AVI unit is unchanged, the legacy VSI unit at 0x6f0100 was removed, so gv100_sor_hdmi_infoframe_vsi() writes into a reserved area and no vendor infoframe ever reaches the wire. This affects HDMI-VIC signalling which can impact some 4K modes for legacy HDMI 1.4 sinks. Select the SOR functions per GPU family in r535_sor_new(), keyed on the display root class from the RM GPU table and use the new generic-infoframe VSI writer on GB20x. Everything else stays on the r535 table. Signed-off-by: Mohamed Ahmed --- .../nouveau/nvkm/subdev/gsp/rm/r535/disp.c | 29 ++++++++++++++++++- 1 file changed, 28 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 1155f079b0c3..96febd01da78 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 @@ -36,6 +36,8 @@ #include +#include + #include #include "nvrm/disp.h" @@ -587,6 +589,16 @@ r535_sor_hdmi = { .audio = r535_sor_hdmi_audio, }; +static const struct nvkm_ior_func_hdmi +gb202_sor_hdmi = { + .ctrl = r535_sor_hdmi_ctrl, + /* 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, + .frl_train = r535_sor_frl_train, +}; + static const struct nvkm_ior_func r535_sor = { .hdmi = &r535_sor_hdmi, @@ -595,10 +607,25 @@ r535_sor = { .bl = &r535_sor_bl, }; +static const struct nvkm_ior_func +gb202_sor = { + .hdmi = &gb202_sor_hdmi, + .dp = &r535_sor_dp, + .hda = &r535_sor_hda, + .bl = &r535_sor_bl, +}; + static int r535_sor_new(struct nvkm_disp *disp, int id) { - return nvkm_ior_new_(&r535_sor, disp, SOR, id, true/*XXX: hda cap*/); + const struct nvkm_rm_gpu *gpu = disp->engine.subdev.device->gsp->rm->gpu; + const struct nvkm_ior_func *func = &r535_sor; + + /* NVD5.0 (GB20x and later) reorganised the SF HDMI packet units. */ + if (gpu->disp.class.root >= GB202_DISP) + func = &gb202_sor; + + return nvkm_ior_new_(func, disp, SOR, id, true/*XXX: hda cap*/); } static int -- 2.55.0