From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) (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 273E03074A2 for ; Thu, 25 Sep 2025 15:17:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758813455; cv=none; b=QtFNjwUsza7oM/OFDCz0dn2rT2gJNRNmYMi54WAvd2zPjsVSkKm6FHoozwF5ZnC9f2pY0sDp0Gq+D0SD2hILhhF3RYUN0PEzuhrVMmz6GuFqdU9CKoCZp+c2c3tRTDBV5bzcwF9Gd/UzGP2Ct9qAvMpd1PHqRP5kRrAIOm9wsjw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758813455; c=relaxed/simple; bh=+vaguLiscLlY2wui/x0Pc+b0HHHunb2rL7xeIcPuIcw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sKhORKb4MLVvVMgdQueveYCQ6okFkBGoOs7v2rvMMo/jy9DAqoDMNW17ME7gMoHEQoQrLEnx/yoOg0dU5ZRBNLSi/0XrKWkm7GZnRl9etrgQA9+oMbITYkquyf4KyXo+F4Q9YU6Z65XZhq9pzHxlXQuDW0GkYjlbrKpM0suZoaQ= 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=OrGxSkdh; arc=none smtp.client-ip=209.85.167.48 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="OrGxSkdh" Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-57eef777d3eso1212735e87.1 for ; Thu, 25 Sep 2025 08:17:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1758813448; x=1759418248; 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; bh=T0Uqms/e6UmF0yeUD6oONuQebIlURzRqwaWDPzObW1o=; b=OrGxSkdh/bwlGnZOGtOyFGG8M0eUQT0QUnWwj2iLAt7VjLqtW14eHkyyuPOyGgdXkf dSQ+KpF9pd+Ubqt/aT8VYMYTAvPMuhkBrpv3OQ/wcMETEbYqRBh9ayLw9+MntHQR8s4F tlj1u7jAZQOzsEQ92DkVLEUIyRNUvTyPl9U0vEBjgkD3Jr04rI0mh7FCuMOrvxQj+0Qz 4PzD6ACE8iK0r4gw40wKDo3KhidURSonwUWJc98ujMAu1Uu6tB9xtCWfYW2VN8/mJxHx YT7BoXsxyugeSD2w8c6FlsDtJiXfdwmdRioZvT3p8+1HoVeogmYX2LAk3MUN0G/zaZzt 8Bgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758813448; x=1759418248; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=T0Uqms/e6UmF0yeUD6oONuQebIlURzRqwaWDPzObW1o=; b=PkYbgmGHH95szzUAKTKLp8lOrbfaHvjzAWsyliagQhOSBtloiYCLAQkD8XFTtr8P3s RvXqsJGr4H7/m6je01dv0shEtgj8Zy5pCw+mm/5s0VVR+ssaq5jqPyCJR0jo3UyaUrUw ouzngtbuguJ4pd3GuJ8fiZ7c6O1AtaRc5CjTXhj4uz5CZn/ntpeys+V8vcGw/IfeG5u0 tKd0C/n6+FJHznodjb5QLQn5BtlUNnHdW+QkCQpBlJGbjqfU4nQ1Y8fSTiDVk7Ex8Rz8 c8CKIVqeYeSJEqaSDJ+fAWV+XkHajz+c+8hQf6r+pzrFPAV20+kxD9FuHvC54MIOdIL/ +n1w== X-Forwarded-Encrypted: i=1; AJvYcCXQi25e2VWOjWOHWE4Ax4qPOEuvXfbHhrwTs8Wqhnb91kclOE48w3p7Bv+Kc7kfmLS49C4m8BfwAIyVCg==@vger.kernel.org X-Gm-Message-State: AOJu0Yx6op85wF+++FwMtJBswfN5AVyHp/Dvx5Kd5Oj7ym6hcEJI1ugA 9nlf4qmba+KR45Fu7DI+iB20h7Znq2omxA1FJfg8lX6bh4q/ab7dn3Lt X-Gm-Gg: ASbGnctH8zYPiUegfONPIlTnS+byLuW86pTshI4obwlKhyp1N0GZpyEW+b25XzYa3VD DIoJn7Ce0wb3P906+6ZxbZ5il0bTxYmfQjC4UCAurWuxlIhpfH2qQSyK3sD6Ku6xsBzKrZxzANU 0/4FvvFeWt9XFe8mh4piDt4w2zb86itTOv23D0g0CK0AiI+k9SWsD5InRx78CZ4N8hIkN8TMDC+ ZWOvbtyfm7vpetv/pMw2uXOxgAVMkD+6yzkv2t8kmI9sG3XjsgFiuEHe7t/Ve3nCTAvvzcb001i hRK3zg16rIHAWC41ikA6vU+Tw0HCgY6Ml6w7I5bWkgvhYj2n6XQ2W1TRXorYy5/byUcT4oMYqyT vLgYwkJi7OmnoJA== X-Google-Smtp-Source: AGHT+IFX1ZdY2cz58VocSZY1fSPcc1gcXq7OoXBGoQv9NhpHvkkKv4qu3+e0KtQDD4yCo/x14CJLXg== X-Received: by 2002:ac2:51c6:0:b0:573:8044:a98c with SMTP id 2adb3069b0e04-582d12fe24dmr1261609e87.18.1758813447316; Thu, 25 Sep 2025 08:17:27 -0700 (PDT) Received: from xeon.. ([188.163.112.70]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-58313430496sm870084e87.27.2025.09.25.08.17.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Sep 2025 08:17:26 -0700 (PDT) From: Svyatoslav Ryhel To: David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Luca Ceresoli , Prashant Gaikwad , Michael Turquette , Stephen Boyd , Mikko Perttunen , Linus Walleij , Mauro Carvalho Chehab , Greg Kroah-Hartman , Svyatoslav Ryhel , =?UTF-8?q?Jonas=20Schw=C3=B6bel?= , Dmitry Osipenko , Charan Pedumuru , Diogo Ivo , Aaron Kling , Arnd Bergmann Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH v3 09/22] gpu: host1x: convert MIPI to use operation function pointers Date: Thu, 25 Sep 2025 18:16:35 +0300 Message-ID: <20250925151648.79510-10-clamor95@gmail.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250925151648.79510-1-clamor95@gmail.com> References: <20250925151648.79510-1-clamor95@gmail.com> Precedence: bulk X-Mailing-List: linux-tegra@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Convert existing MIPI code to use operation function pointers, a necessary step for supporting Tegra20/Tegra30 SoCs. All common MIPI configuration that is SoC-independent remains in mipi.c, while all SoC-specific code is moved to tegra114-mipi.c (The naming matches the first SoC generation with a dedicated calibration block). Shared structures and function calls are placed into tegra-mipi-cal.h. Signed-off-by: Svyatoslav Ryhel --- drivers/gpu/drm/tegra/dsi.c | 1 + drivers/gpu/host1x/Makefile | 1 + drivers/gpu/host1x/dev.c | 2 + drivers/gpu/host1x/dev.h | 2 + drivers/gpu/host1x/mipi.c | 501 +++--------------------- drivers/gpu/host1x/tegra114-mipi.c | 483 +++++++++++++++++++++++ drivers/staging/media/tegra-video/csi.c | 1 + include/linux/host1x.h | 10 - include/linux/tegra-mipi-cal.h | 56 +++ 9 files changed, 594 insertions(+), 463 deletions(-) create mode 100644 drivers/gpu/host1x/tegra114-mipi.c create mode 100644 include/linux/tegra-mipi-cal.h diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c index 64f12a85a9dd..278bf2c85524 100644 --- a/drivers/gpu/drm/tegra/dsi.c +++ b/drivers/gpu/drm/tegra/dsi.c @@ -14,6 +14,7 @@ #include #include #include +#include #include