From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (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 6330937E30D for ; Fri, 30 Jan 2026 12:50:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769777407; cv=none; b=i+RVRdMyHOqEuX+oAQnW3ibIfNAuoWFI8aSRcYW1uhhrhSebAXgzUr3kYqy9irxxJFYCQAptk60HTZcmEuAwdu89z6PDs9jJuCoWWiAngkp8JpUiS4E2NFdtpfhC6bAEN9mZx8oZGcMiA+z7IoXhWW+OXVJx0ytkJcmUhcN5dAM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769777407; c=relaxed/simple; bh=oY85USD0gXJXDDNe9s6acMW/Ocv30mpMkYhRB0pufxk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Y2+quLCOmU7sQAWqY1bcfmmD8g0L8XaW1Tq+YQnJDwdD1tZjwAAE09LeQI3Rh+40a5/ln8MUGB8nGEjH4NkteYRYLdiUlXMKFVUOTBRoDIonpCar1gQpHvdakDBiTeu4pXUNzYsI4Om9OpmpWdywqOdg+yykLqnt5H7on+DSwfQ= 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=fl2eWpAM; arc=none smtp.client-ip=209.85.221.46 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="fl2eWpAM" Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-4327555464cso1608191f8f.1 for ; Fri, 30 Jan 2026 04:50:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769777400; x=1770382200; 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=izZNO3eL3oHzsJUrKxHV6Tqswim5VPWikLvVKcA1Uj0=; b=fl2eWpAMy6DBLJL0afQaEPJSDX+rvjK90kHHB8hBSOK9pQdZwMOIOdjMCMLgSm2H2T u6bkpYi32J0vnFHx/5PZdUU6n0RYj/NRCxIcK07MphxwIqOaUSrdHQV1B/4PpBxcbMqX J8g5unqyRJtp7yBMHq//39jUTpXa0oSU8qKZz45XiY2Ori7jBU7ei76DH3rOVrQswe0r l2BVv5CLR9eVkRKzXjCCgmeVYyiQ34jv0QPpYsRJKcZEAxBF+9sV+hnMjuUjaW13b8k+ f4OPsGb47FJIH+1kuTc9LtqROk1wfp/wZeJubBtVD+nrSG1dSl6rG9CZZmKDwloyBZGc 0G7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769777400; x=1770382200; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=izZNO3eL3oHzsJUrKxHV6Tqswim5VPWikLvVKcA1Uj0=; b=mEPis+MLzO4Y+ksEkoVkIUy5b6UBn+uhQHg2fI0nEhighfq3oc6TbBffnS8lY+fkpx SXrorcZhrIXyg1sP0u9l/9fKuqnrgi5NJ+qmFEzTrhtXfG6dCUpKjeVMGR1Hytt9NV1H AQp+ccYdt1DygADxKd6tVfChE72fZJBCShhZjxELp/zREGJSW2DqiNaWBIQ5glxVK8YU U6W8mzRBNrnHSTQzezkebsBbJS2UNbmO6v++u7JV4TQJ2PXRCkQ6+VF/BZzZLYoEbOpU 70O94lR5O8ASpUKxMol5XkH8VbMIKGxlqTS3npztfhjmN8MCE0YIVMm4+PTjNJidEy4s /xNw== X-Forwarded-Encrypted: i=1; AJvYcCWZgKnCh81T+LkpNAUnUIwIfDX1iney0mS20TVjc5Enh54YPyyKaqCpq4WTa2kNmgv4jLZu4/kDyitJUqfZ@lists.linux.dev X-Gm-Message-State: AOJu0YwY993wJtjcUo286kxQeNxeSnrEOLLE5n18DZZrqNJTnLsqloal f/0uA67uK/fCvoKQnRoAVaaRaFW59G2ZtEu3yF4dKD0HKdbklRCOFH6b X-Gm-Gg: AZuq6aLaTVv2jaRo3opd8OilxekRbmGakeUv5LKxtOgGb+mkv/XjwLflqz3XTFWRHjM TXUqQY/RuZmujCK51+OtCbNQReVIiLMSKsu7dQeG9SplBNomL4CDvAYz2ojyzRaXFLkhvEu7TR/ 6SLDTiOdmjASnHRRAG4+JJEia30PNQwhxgz+mjKW1DTyevH+e75ePl1QXRN5rDgN15xMtNH0Sov v2mV8cSGlz8P0IlTmlxBZ9fSexZM3epYSzBeblziItZyaX07WJ2UUYJt4TmNOGbs4GxacggT0uW VFwkrUnb5rKRUK6p1i3DkiGx5Z9mUSTPM5/kP/a5XRVboqAdndrZas0uyHkctmBJhxJlViR/dA4 1sGxGiy5wV+fJuaTZ1ntCdhsSwsbEjdoPExXzlKrs9qyG7VmOTnglhREycK6zyTMJ644zI76dHd wJ X-Received: by 2002:a05:6000:2404:b0:430:fc63:8d3 with SMTP id ffacd0b85a97d-435f3aaa5bamr3926407f8f.30.1769777400075; Fri, 30 Jan 2026 04:50:00 -0800 (PST) Received: from xeon ([188.163.112.49]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435e10e4757sm22738783f8f.5.2026.01.30.04.49.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jan 2026 04:49:59 -0800 (PST) From: Svyatoslav Ryhel To: Thierry Reding , Mikko Perttunen , David Airlie , Simona Vetter , Jonathan Hunter , Sowjanya Komatineni , Luca Ceresoli , Mauro Carvalho Chehab , Greg Kroah-Hartman , Hans Verkuil , Svyatoslav Ryhel Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH v6 05/15] gpu: host1x: convert MIPI to use operation function pointers Date: Fri, 30 Jan 2026 14:49:22 +0200 Message-ID: <20260130124932.351328-6-clamor95@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260130124932.351328-1-clamor95@gmail.com> References: <20260130124932.351328-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. Tested-by: Luca Ceresoli # tegra20, parallel camera 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 8ee96b59fdbc..2735aa351d8b 100644 --- a/drivers/gpu/drm/tegra/dsi.c +++ b/drivers/gpu/drm/tegra/dsi.c @@ -14,6 +14,7 @@ #include #include #include +#include #include