From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (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 4BB61307ACA for ; Thu, 25 Sep 2025 15:17:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758813454; cv=none; b=Q3JmPn1uYKrR9Hlk+44/XuklNk1t2AN5uBssNt6V3UfAf0y2LeJcgnbFrKZ9WjpZDOHLsbwWvjjqUHPFv/tzkSfr36wRukRJt8JQrtKP07DZPdMbtotUy9wBJnODIQLMXg7b7hV5NY/a1a7VE3ncKFWMc/txsugsv2IUJ+cr0PI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758813454; c=relaxed/simple; bh=+vaguLiscLlY2wui/x0Pc+b0HHHunb2rL7xeIcPuIcw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OnD6+qCS9mS7m5/JRhtIa50xeWtOWZl5CmJRdEmsWfMX1XK1Jb1/3Tj/5xGoDZ11ibL/QxPyeD32ViXm2Ot7y6ZEl66jo7xC29pLHdcfIuSHiCTfWAq8HcIdXSCc1S5eTFHKsBmP16PRc6Hkd/GA0cEJ/Avr3OwAmDF0KICegLA= 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.42 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-f42.google.com with SMTP id 2adb3069b0e04-57a960fe78fso1169239e87.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=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=ail+cW0Gz56QrX5TPKHEjFKvRD3uxGHCIyxyHhV7EpaoIHy0mZ1JfCK8J+Us+YSMlh mv6ti6xReSsPEmN/izPc6zPW8EmKZ82Hgbm6itkN3enp6A0T5a18BAogSSmrBTDO/r6v cNC/SFJ7/61258nP/bO4lN5nOF9Z/YpDWfafy0dQ95zjn/UQZD6j28tNLGSxQ7kZiB0K rLRM98gMOVo+ckF5Rlymq+6qmYNoFgnWMuweBEoGtfm+AFRfiv3FlQm9yQiUrzzv6QFx d6x3zgk8lgB1lj8y65r1vuMYVIhPL5reKcC3uTbWU/VdvLIsdDFUdKP32M/+xAKQypY6 Xf1Q== X-Forwarded-Encrypted: i=1; AJvYcCUM1mqUGKBhshcW9iD0+nWt9u+dyx4v7qJ4OYGzflllN5jPi5cNSA0YOohCMP1N7v93a1unJc3iba8x@vger.kernel.org X-Gm-Message-State: AOJu0YzRim+DcDAwGAibP87CBpk7+BQqzpcHlgAggE5bAFLn5p84HMc+ OoKbsSG4OE1zi2Zu77Tg9KohnjPSMLp0DuAcGeEp45tc++wCnoQovtzh X-Gm-Gg: ASbGncvu1pvmJMdwBQlx3VMKTFNFSpSBGf41ERZcB7W8V2u2I2l1IkZOLHWy4tlJoUb 9pjZM0sbsrd1J9UugC7JDAatRJMyfC+WHZjLEWeS2bt5EXsq6Sh+t4CMnKjVs/vg2sQ6lNFeCEt 2DrZJLCzqZOAEanUUJggeEJ7TBvDGW/YQdZOIW6gD8eeLY8C+VnpYiOg4eNIzcsL+5LJp6EEUhy rtCQKBCYIfGQSBBEzCi8XMePy2lD8OomzNxcMSBYumZPRFFmE3g3AZxxgfd0PpuegOYiugUXAeD xDLt26hSusB70uc5Ux7qSFcubLEfnOl30ClSKDPvQ/S9o1iAhQJLO/Bbiy9DZk31dg4ouDg6OdX GGp/7KwuyRPsauA== 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-gpio@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