From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (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 4EF89309EE7 for ; Thu, 25 Sep 2025 15:17:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758813457; cv=none; b=ro2PB4Zabvh39MsSaAPQ0HYkPIhe/G9s2SOGgP/XcyOV1Tb3QLmU1a7rEdDta8vGg745bC6wOpkXmtNOlZgShkwYmuDLET0HRh91/uMj47JsANvbYOqu3O4/kq+CQpQTgxZxfvoaoScNflWqOyIOT6S93mUiM6GkMOlWxFSBVD0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758813457; c=relaxed/simple; bh=+vaguLiscLlY2wui/x0Pc+b0HHHunb2rL7xeIcPuIcw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OmTbJmBsxQbKukpZKh7iv4SvxeWXFVHrT/htl2qEjGe2AtftbKDH/EPbleHY2mTuMuhHgNbXDXAjhHaRuhA8oE3b0DGzY/JECWbGmRXAUsRpLJhb/JeyXXYY9Xwqo9D600/3kaD0mYurYmVdk0EsXGE1zzoA1PC+0flw0h7M0zA= 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=CuuJLZPW; arc=none smtp.client-ip=209.85.167.47 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="CuuJLZPW" Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-57a960fe78fso1169246e87.2 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=lists.linux.dev; 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=CuuJLZPW7BWnjV3BkvDolzLbks1HtDzFlgl5Phdl/iBUzEwovot1B0XPhlldFBdrjl TgmhHbn+ScdepPclB7jPNEG+zfb+6jnOTZtp5ZrTPcB4ky0sVV3a1k4/7X0qrszsE+O/ rfbFQbAT72h/m1uqNVgGCy7ddtve8C/a/3mxysxFhgJaZ0Z041FEG7UAi86ZVzlIcMlm x2guuxnmqZbP+xXbJ42QhFukUBeuJoZRyBZ4jEbkYZdpkhigwG+RVRp3c75Krf17cNru CsOJXrd3jfuaXvxAoB8Q+jc/oKqiQM6RidWD6OqVJA2bmf8D0Sh18fWdZ6BrEYCuKJTj hbjQ== 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=jvNM8bpIUclBZtnpq4xWsbi+UxW4kKWn+e/p8hdIbvL9A0RBVWcwAYcMkmGinuF0oF FQhI1AAY3wRkOLQR+Hsd7ESF0hxrJQz9zxX+i6De7ciWwxFUnu4ouYzE/tm7eKuBXNcS YnUrGhzXA1t1davv582hOdkoi1fx3h9N6koaDkmJpnbOHyB6NxHKGaozJVQ37LotUOgd AFNowZmAq7Lb8u1Aa/vdpK47XwxTyFx19v36rD78ereQIym3U95zS3/j1A6TgyyXaaWI 8dV4X6uicwKApAQx/E0iphSDgF9cGnRnPRir/lL13+SKccMlX/xGhrM3OAdYCkdX6zED PoyA== X-Forwarded-Encrypted: i=1; AJvYcCWq/+UJtwPnuUBVf0eNpHFpmyaE42+eIX+ttGFabiaJPUAY00tcks/yIGPOH4wdxr3vclpyzPNN7u6vEiB6@lists.linux.dev X-Gm-Message-State: AOJu0Yxc9JnT3CClL/XWOvQQ+KqWAb6jJ2hgSqdU6BLi4UFaqFKezGZN TAJNAQ2eSdqskt4GtKvJu6/SexHpF1K5LgUhgatYuc+iYX6fOqQQwhAA X-Gm-Gg: ASbGnctkUK1Hur+4Q+71UpZr8bQ9rB4D4Y9h35Zi13hDOspMvjAn3v5a7woQ/xySu0I ckEW9mqZ19TCt5SUro9JEMKDkYG2LxUyqJ8zj9yss3lNbcDGnkSWtkcGLjaOnhH/dFIjV5FOozU 0BRa2NlzXVJUpV3uN8ViPDuCtfE12j6l3Yfwcn4daPStPFLn4ceZl1mqnNboCRNBIsYrdqAK/OS ZX5niL1MLx5aMdINY4ydwwUk4BruYxIWJM06wL4NQ6C8Z9Erf5kXCGJcf4ub+R4gMfUouwIbH9E U3FGP9iz0KSrjOu1PP5H89WOG/tA8bNE/IxjmimfGnzAQyGJjF+fHW23F9YetJdPgRQC6qxTWlc wut3f8Q8kjHDIag== 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-staging@lists.linux.dev 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