From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6A5E1E67A97 for ; Tue, 3 Mar 2026 08:43:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 96D3810E67C; Tue, 3 Mar 2026 08:43:00 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="LrpZAFVz"; dkim-atps=neutral Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3E82D10E670 for ; Tue, 3 Mar 2026 08:42:59 +0000 (UTC) Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-389f200c26eso78696251fa.0 for ; Tue, 03 Mar 2026 00:42:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772527377; x=1773132177; darn=lists.freedesktop.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=dHYmVbbfQfaP2yj99KiW+/UkO3tcLecvvnP/w5d/X6U=; b=LrpZAFVzrOE/5e4ze8lvzM+IDr8lzpSzBJ+qkuYtt5H4KAOYykqb4gXJVQUtOVVJ1E tFLS80XnOfwk8yOBz5UcNr4CK8qHgLd7kuVDEPEPmwOMUaCk/kpallsGMLDilcHaKBPE zHLg/G0Jy44GRalsCKW0lEorcCtvHAP2YaIIkSCR+4l3/nbbYRF79kUExeqOzmNqEbsP lMRiAsc9KpLvN0+DHik8Ytxcd2NYm2LVj7vieEezCIIP5YhQwPCr/jFDfKz5Gm39W/zr ZB2JuMKVBjTadG9qh3gnAx3g8Qqg4OXXw3KtRn8Ovt7ujfs2gP5hN7WwoO9ysdf3dvWw ZUJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772527378; x=1773132178; 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=dHYmVbbfQfaP2yj99KiW+/UkO3tcLecvvnP/w5d/X6U=; b=Fyi/eB0YO6NRyFJ8B5XMxaR2UMBLeCZkrM9E8hksN166mAG7OMCC7M6wyAKsNAfMpi 1ZZNVAIpccZc+22n8pfhttLnEhXxa//Bw4xh5SFtmKrIxiFBImCmY7FRFSVk5suLwhJr xjnn9tV7smthUQCYge1+Kd9+uoIZOqsjZpZJ2cmHkAHlMJNAkPMmcUTJMDfY/SwlAHmY JIkI8EpjwA3fnvdZ9w/KLvHuTr42aNkNioBC0GXGShK6SMMcdAIipQ5Egjj3Zt7Q5KZP a1KYbU08lQynDBlv5c/B8YWY3bOql2k3JqxqQjme9eQWZRkayXW3tik5037Lf4tEmL/F lkcA== X-Forwarded-Encrypted: i=1; AJvYcCXgCWqwRwmBllmw/ofx3Gqpto+ixUY9ud6owSHxuT8uRKkXxiSrK+uUd8c/REu25NIQ0iitE+B1czI=@lists.freedesktop.org X-Gm-Message-State: AOJu0Yx4yjboy3Wa2OGJuqCUL+XuQ73UpenlC1vB4IQsDhZg+om4I1oT kVE22e0Ba1FxvgZQdEtlNUBnhFo5KiaA/lKUJhcCoiGIHMb+iryb2DMS X-Gm-Gg: ATEYQzwphO2OvE63b9qXCvBcB1ekObJ+H1vPpGcvmZc+QCBIVjotHDevLBWpc/lKGv/ Ilw6KfPzMy+99QpNQw1+mhtyxe/mk1EcdhvfZTULfWqXVIElqOJB3qdESQDhPvW6PZHyhMshZOU pfzwb6CQ9G7BH+6a8ef60QJKgnQ0vDRqMYF7NDmOM0F84j26eNPQH06kF1k3r5HXA8K9SSuE9Yd QrllS8G2RhtlXW6Nx9l2+UhlbREBOIQ+UTDKC+y5kqog9aA7+4ZhwuS4+qfBD/3LhQhKWM6E8id APFnZI928XWPhtKE9NaRFy+HOWruYZq64un2+LgpHuZdivzY4GCWBgK1YZ1QbM0JTkmWfhb9voe 1CvJFIoRcZp8SsqpKrB4RUDMY9fbvX41ILyO9p/mlvN/htXgd2M6G4AkZNf+jehSPc1Km6ppc96 u3vOwllFstNBov X-Received: by 2002:a2e:a106:0:b0:389:fb7f:3e0c with SMTP id 38308e7fff4ca-389ff15f371mr102458851fa.21.1772527377130; Tue, 03 Mar 2026 00:42:57 -0800 (PST) Received: from xeon ([188.163.112.72]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-389f30227a9sm32599471fa.42.2026.03.03.00.42.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Mar 2026 00:42:56 -0800 (PST) From: Svyatoslav Ryhel To: Thierry Reding , 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 v7 05/15] gpu: host1x: convert MIPI to use operation function pointers Date: Tue, 3 Mar 2026 10:42:28 +0200 Message-ID: <20260303084239.15007-6-clamor95@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260303084239.15007-1-clamor95@gmail.com> References: <20260303084239.15007-1-clamor95@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 | 592 +++++------------------- 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, 666 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 2c5aefe9621a..7f25c50621c9 100644 --- a/drivers/gpu/drm/tegra/dsi.c +++ b/drivers/gpu/drm/tegra/dsi.c @@ -14,6 +14,7 @@ #include #include #include +#include #include