From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (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 274593074A7 for ; Thu, 25 Sep 2025 15:17:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758813455; cv=none; b=Zc81lbwR/sDyshnT2/lTeJymBntyQ1wxJJgL0QHXvv8HpT6AtzDDnyrVlZYGP03dtENX5AOgNJymnUMaRrEEpQb+1jSazyK7J0b2bHB+lBzyKFh0pwJ3IOVk/XOZNbCCeVL6BUWOjZDqLEtVaIJNl7Pxaet6ff1dQiiKpc1aTfA= 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.52 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-f52.google.com with SMTP id 2adb3069b0e04-57bd7f0e5baso1047508e87.3 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=YSosrmco4zAm4PNSCJPb83wOn/2OOqoULStM6C/nwyyaDkPhJwzJui/rnJJA+/ocYt SEW2OuPNDisoxGpner2XYcaCemtmadGUMpZsApKrRuR4UnE8dMqBfR5Tis1Xm4rUFvqD 4JG7Bb0n4l8Q256EIMPoVe/wbEXVyKnE76KWtqbNIDeRJoFyhoISf88+fcOc8FxMgrSj bbjzz1h7GrU1V4etDIHj9w6GBCk9vcMFbb1KQj5icZW1M8JY6nzwz2r4X6P0c8BBRjAs nxuQzmwn/F+AeP5N5iDpRXVGtseY0yww82xl233H2bS5eQ6qmeGNrXKGYBLse8VUkDLP VLOg== X-Forwarded-Encrypted: i=1; AJvYcCXGws1Nw3pPc8fMHQAL4/AN+5PWNVWlKaZ+A1ItuOhwwamjJPRSCHYc36J2P9uwWgOHBoFmKUIr+cba@vger.kernel.org X-Gm-Message-State: AOJu0YxOJns7L5IM0aPzE8jHjJLDDhMSCUwuBGEKJMnIzmG3MAlhbPIG 88CIdlH81MC2NOfb6I+LPx923kaD4EOej67ME4IxXVMo8rdqBT9zi1yN X-Gm-Gg: ASbGnctvfs19lgConNVke6sy3Sbm2RUW9FcneBM6n9kncp67pkn6EBiL9L18XyQMaIc ArTBJ8nx5cH7rFtr7jlNZfvYUXTl9qJFCpKRZEst0VH8gds5QBZJyb1ir6S87mt8kB0RXBiN4cm 67cq5m1dOhohNfoN/V0aKejhze/DnAlpz9Z2ESJHsOrblHxb0s3py68l8VKDU9rCGAmoqx1Crr9 kY6sq6vhL4TafmGqymSIL5jnH1JgJrudbjwtckfvcdszTZv40IoFTIrOd7DEMTUD5lc6KUmIRaM sVuyA1fZ/E+d8b/h+l4p0MUf4yKs0pGlXcst3IpIBUBOeBZiLJjUZZBFOd3h0l6lyF5eAArMwIT iAXDeMwwDnEc8jA== 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: devicetree@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