From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.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 0CE242F60DA for ; Wed, 8 Oct 2025 07:31:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759908698; cv=none; b=atAm8OzFeVHBbnVVtNOY9Q8wZEkGUA4AZxKP1QhDon29f1N6MFWg+fzTc2xsJT+X/07cMvccle9QLCb+HsF0LDfJvckYb9DG4I3qmS05tzQvuqLkRZiqJJIYAN3spaA3Tb2pZC0L3SLNqB37ZarLqdEDHpPfymy4zzCZtcNPzqg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759908698; c=relaxed/simple; bh=agB7R+9Nc7Xa8r3mTLDJWLHmPOIdfJpdAOkijSJe8u0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Rx184ZRGHl2JXc6Dzp0c2KXrohjJT09gg2oFky4DIp3jIC3Bt9HcQLJSrfTEalD5Nqz0YDdnRtTFJqDEAUBwpnJFtq4I/hkCcCjiQUkYoNod+mo7gIoPKcT2hSbGq1lriy9t5ErIniSynOJ8dLv7xblXX8LncqTs8Xvlepo28Xo= 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=JbSNVx/3; arc=none smtp.client-ip=209.85.167.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="JbSNVx/3" Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-586883eb9fbso2494924e87.1 for ; Wed, 08 Oct 2025 00:31:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759908691; x=1760513491; 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=HjfbTYrP5NC68URbVh+FkOk1JtMEk1EsAcXdfuuQgaU=; b=JbSNVx/3vgAE5JYnNTDP6cRHFjz3mNYJSPMogccCJKYimOhb5FjlQPJlYv/TPBG+e1 jOzkWqbTiIJK0st/kSob/rE8g/t2mSEuQh+EqswgoI13fLg20Z4NJD14tudunXso1JNm JmmF2jSQK1rVILufK7abfiy/ydzBcQ+cbyaz2htHYu3D/OblU/mDNsDoK+nE0pVi4Aln dOJ+/cdC4kF6lW2ls7oWJ6y569CRbVdI8DK/F52pvyIEt4Lprn0oSArA31vSCdcRRTb/ 6HqSnQzh67C4dATT60Z/ylYOqhbVxcxx3Yh3u0VHCbY0T6abTqXoiIhbKdE1hrfzsJ35 3/uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759908691; x=1760513491; 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=HjfbTYrP5NC68URbVh+FkOk1JtMEk1EsAcXdfuuQgaU=; b=pDAWdoIz1QnX8TtTX13VT/owvG53IK4RsyHTPLd1ER61G5nfsG745TmZ5mCuPhBEXY I9f3I/a+FMDNG65Xtttf6ihGjoBn9olUce2euucMZqghVOSOUbj4u2QISjrrOQwP1a3O 2a/hWLlFX6v9ZE+YoImp+Sru07lNi0KpBeN/Ci5HfNmgNAuHz8DILyFnUOWxOJQ3nths yT93UNdOy0R5Skq43HfDmgtk/tjUcryQ4KQm9myjN1YNCmTy9OyHrYfReVubuWCYI2sT XdpXc7dILiyaB5OTCZ6zZbhr1Mc6ATzQayz7m685R+j1HXvUdrBSiq4LP65wtt7IJIGK HtqQ== X-Forwarded-Encrypted: i=1; AJvYcCU/00VVIcepSlm+Lp5GwUq3I3u1mH4rE11yWFGsvbHATn5ltnj3ly69KWcGg2TM0dy+IqsoN6SmKubQ@vger.kernel.org X-Gm-Message-State: AOJu0Yxm9dGzPJZ9MPZ9YfMl0h/uJ5iKs2qMUR90qGxq3OhL+YGtn24k RO4Mdnpf1LIbDmduM+R2MWkxA2pj4XTmS20wB/e3swyHz5eFKUaExXF+ X-Gm-Gg: ASbGncvO+nUypsPh0IwmIPYANvQQfm+Fb0Wg9UeSyvzi7JLJMLT+AMlhg07LVwAVSc7 kucxRI/uwfqs9vMcIVavWwLWtMMjEPyTF+NKsFHZXoCC0rM7ZDlURmvL+iZ5Z55XCbrzF/PUYrm 7CeHqvVYcuDjEEga7bJ6V2pzgqLDtwNTY/B057Tw4G7MrbN3SJZlorSbpseZVXyUVmG2C5ddsl5 iJnZeDa44wxWONiDIu9wWc0u2W/o9MBPo6XnJFxaEit0Ie4tOe+c+mpQnGvps23KFhNsaLC5VDw uNQsFFjKDHqk9g03T5w7Sg/jVhfwyCz9l4n303f8nzZa/9BJzdgvmHxJ3kI7gIUqcheNcOikhOd XxNYtD2HWtyPjZxW5m8Vymp9qMa7rSPHBikuRmZ7w9bzAhQAy X-Google-Smtp-Source: AGHT+IETtdmf56ce+7Z3ftCfXMuKxbhwZIseoAqxwQmPEelWoPazk+ptpkpQKYNp5AKBFl0Ltnq3xA== X-Received: by 2002:ac2:4e0a:0:b0:55f:503c:d328 with SMTP id 2adb3069b0e04-5906d8edab9mr669369e87.36.1759908690575; Wed, 08 Oct 2025 00:31:30 -0700 (PDT) Received: from xeon.. ([188.163.112.70]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-58b0118d22bsm6911016e87.85.2025.10.08.00.31.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Oct 2025 00:31:30 -0700 (PDT) From: Svyatoslav Ryhel To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , 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 v4 10/24] gpu: host1x: convert MIPI to use operation function pointers Date: Wed, 8 Oct 2025 10:30:32 +0300 Message-ID: <20251008073046.23231-11-clamor95@gmail.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20251008073046.23231-1-clamor95@gmail.com> References: <20251008073046.23231-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/mipi.c | 525 +++--------------------- 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 | 57 +++ 7 files changed, 599 insertions(+), 479 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 b2046f6ea515..502f0cd0ce53 100644 --- a/drivers/gpu/drm/tegra/dsi.c +++ b/drivers/gpu/drm/tegra/dsi.c @@ -14,6 +14,7 @@ #include #include #include +#include #include