From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (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 281272F6162 for ; Wed, 8 Oct 2025 07:31:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759908698; cv=none; b=lZO+K9un/W99cPqmhCFDfDvwsoYScsmFQ1eEJl8tdhRAdxVWzVbVK54YLCQHUTS/lyEDivMmY0jIILCKbsONQ43FKINB/K6tyCBqAUnN7YVRIHr0etRVHRRUOn+NFYOfLg4o1UZeTod1QzfGDklsXv7uLXA3CAUQNyuPguQbRoE= 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.44 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-f44.google.com with SMTP id 2adb3069b0e04-586883eb9fbso2494919e87.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=V8n0TFckhc5Q8+zo71xxZiuVraUHQVVMGGu0p7lwmAyhLcs2NFDSbaOaT+UFSYcwbo QMY1416DrgOYO6yWTZ19ZWsH6Y0C6txG62tQuDa4kgBjvJy0o5xJCgWuvCX2Mp4q2k6R YD3uwb3fRNdUqLgOgr5lo6G+mcdCarj5zoA6dyIOB6qSusfU3FVQIT/Kuq9e3RdBef4r B3SFFBSo7WnQ3WwE9KGF+PWl4U8sRztHVuo9vJS3UjmXzDFuhfl8QeqgMdEqvgievM/V gDBy5Rm32U+sDSviWZR52nbLlWnJvqRWB1v+mFdrxP4LW6Sz+G2xyjg8Kh2L6kwLF+YY HCtg== X-Forwarded-Encrypted: i=1; AJvYcCXCec5tlrhmCvkOlD0zqx+fov7a73jgQ7qCDounuZoNxGuQGMScZ85VKBVOFIOrbt8pJfGUJFZlWQM=@vger.kernel.org X-Gm-Message-State: AOJu0YwcVW6fFv+cXkjM16yOjZ9ZQQ/rKIVkTjtlmyoE9YxxZ5EkMuIu v2PxFwiA1OzW1LSyncR/d28gqgTHTGooiA2Eycx2FFA5Zn3BtqFiLlMS X-Gm-Gg: ASbGncsvuwrsqX1xR6A4q7RKr3oOY3+o9baatqlQ86c7MNWTGsjMasZCmkQWFLETZef Cbhf3dYQgRseGhHVN9/Igs3DoPSUHSRcNfPXEIrpAa/sPFvCrtsT2adGeaxZm5JjKRnx7Dh5LPM OMJwaa47P2WkqP1nxe8Lqj4RcPMrmR5TeQ7JOEhIsrWgIBI4/xd1TzKpXW7/E9aLbLwaAQ7WfXR hBSerfDfQNEkUlXZL0oOWVUyTybyx6GY/syO64DQfpc6rA4dni3Irmq9Ug7z76tVwCxGL36EcLb EkPdMXpryfvFTk+Jgd1PHJ6poFeCOoxth06+FMMzTI+iyFb+8IgxakT47kaIOmFVdKV4FB8KHiw RRXshml2gy2iIz1hOLM0b/OcqwWqbXe4wG2A1wB+34teklWEI 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: linux-clk@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