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 C087B34D906 for ; Wed, 22 Oct 2025 14:21:41 +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=1761142908; cv=none; b=cnJ6XiHGKfgw2tXvfgorDFb9aU+9M6RYQ655yZngV8v6ej9efFVyJFztTWxe80cgQGq/l+kNVwc2KAgmcyHvjiXHrui4TBrqPC/G6AxDWEpGvO0tp1F6j0Gk1x4P02GpTIg6nKnYYG+xj0LeiVmHFZpSQMiuypNcr81zrLsrAuM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761142908; c=relaxed/simple; bh=7DUsOFoVCFhnISr6T30XN5C30PUazq1SDzgaHc4SD18=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=F9WMd2CyspzB+ZkdZpOMJ9+ntV6aNtDeDCjM1Yp8B1CbFe1Qj0iRtacXnhefMGyc0szAjsnvMhHz5kSLdMqEkw6f3KKKUFRY9Ivc9diT8wO6y0469goMdEix6eyDo1YfxGmvtUUkioKpCp4h/A07jE49+myui8Pqg3+H9o3yf7Q= 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=JF88d6aA; 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="JF88d6aA" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-4710022571cso58946035e9.3 for ; Wed, 22 Oct 2025 07:21:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761142899; x=1761747699; 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=HrGwv1CVN38vvDG/Y9Rp7ol0PB58C3nZK56qBv8o/FI=; b=JF88d6aAOTdzsiJnET3PmBt2vsMuyZ/NooHo1IEKzi7Qkr66C3D1nYhiu147bCtYAJ PKYWTZ1Ok58RaF9T7kN+fF0srZIG5sBwmPtBF/byr7WArGeLFXFs7pom/Fz6uqxajjem 0rJVieT5+PkGpoQHUSg5qvO1Nxn4OQa9WiyKODF1G8VodknB5n2NrARdf2BhPJvJM+Ix QR6SupmpgB0GQFbYnxhQxOgD6GbHSk5cwZc02DX8FT7BDOd6H0QOWKPG/JQ7E3K7WkDT qZqaJAjGhgkEvh5mjAvDRCDnZE/J7vSXpTKlMe7ZQFpA1Wd+NanQVHrVlMdO3ICMxpL5 oV6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761142899; x=1761747699; 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=HrGwv1CVN38vvDG/Y9Rp7ol0PB58C3nZK56qBv8o/FI=; b=MaeGEPAHb8scaVEL+usklsvfbM7hHrPObLFkoTFJuECubmdo3sV7M+tiuqg0zAGk61 go8ozlohXYJK2ztYO5P8Ua+rIQEKBtCt8LDKK/2WLeRjLi920Y72iBIVVZ6QpDBAEScf lHCLOxIglc+8Gz8OMYwyNvqFIB652PUIX6xsSVtqXpB4E6wV0jkEJR+FsjyXn88U5vhC ygw8CnVnLpUSsNTzTZrlK+VYmcgBJADBEZfhRGk2Uvqhy9G79tOdkqtSt3OGRIT06ito jW9Az4qHrpDbm36RcTZsyOtWCYWCCR16kd5lQ8OIcJ+thjmP0b99U93+BXC7J+LK+gZ9 KYNg== X-Forwarded-Encrypted: i=1; AJvYcCWJnLuUeusNA+1kXgZWhelNwTh7kB26E+5wvpo5nZsNE8/Yorykh9qpu/cgu6VnWmfwSGYABvKxT4hG@vger.kernel.org X-Gm-Message-State: AOJu0YwB7bx7t35zWSsIikMKH1cHzD3Zh44wKAdbeyhfC/f/JrA5vQHv B6tnmBERI8CfkcwO9RIibdCrQGYmod1CFHEwkcV5MsDYGwcyGDUcKXQm X-Gm-Gg: ASbGncuZitwqfCtrBntz9xcAwrhEzbSQX3Df3aFIzm81wT7yI6gKm1U4S1OvSJAt3Jv tEzUW0albIDia1y2IzuLwLY+aPXozoWUn7konuoHyToIKpLi2BMivTtUykF2Fj61iUqVU7tiueV f9mKgMdJveiXf/hXIznViBkoKbRhrBpVEOweJ2lHhkwJ7TYeRic23nCPZQoACmoTGE2xtEnuHxP KEkR6IjYLOnQ8Y0ksRhNMHB0++MTtHuFRGQHRHSuW1IH/c5wN1rDkXyDjPiur8//+pf1tqYpCvF hW5ngjlNyBEObRhLfhEkTryC6WZ/m+b8FL63qs+UYthfO9pTUsNO3GTkFF/dkjOiEgk05wU/1NS ue8Qg5oeohc2oe92WOetgIWGZOxxa61k1MaCAuUIbyAegfcOL8Vnt7cHo0/dShdS+bxZL/4KvM+ KP/g== X-Google-Smtp-Source: AGHT+IHpqvHOi5DS7ZRtt0ui2sF/8epf8OOXmHyl8ipQfjW1K3ZzLwnjTLVcaO31cwis54j1XfqyvA== X-Received: by 2002:a05:600c:4fc1:b0:471:b5d:2db7 with SMTP id 5b1f17b1804b1-4711790697amr135554505e9.24.1761142899118; Wed, 22 Oct 2025 07:21:39 -0700 (PDT) Received: from xeon.. ([188.163.112.61]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-427ea5b3d4csm24803518f8f.19.2025.10.22.07.21.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Oct 2025 07:21:38 -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 , 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-staging@lists.linux.dev Subject: [PATCH v5 09/23] gpu: host1x: convert MIPI to use operation function pointers Date: Wed, 22 Oct 2025 17:20:37 +0300 Message-ID: <20251022142051.70400-10-clamor95@gmail.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20251022142051.70400-1-clamor95@gmail.com> References: <20251022142051.70400-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 Acked-by: Mikko Perttunen --- 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