From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.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 1C62F2F617A for ; Wed, 8 Oct 2025 07:31:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759908701; cv=none; b=m1KoyluAZuvoupquXYgDdDVX8eb/nPOcjrK5vYN4xuZz3u9xoifmglJC7FeheSQM2YJvPb/Th8tCLuMp9TuBJOwjKlM0mZlosfY6znSbo2ACrsUznjBuF4R1fvxvoU4xOF7uVrJhQESdbVaL9v9GdVbaFB13j5Qy8LGuFMdXPGc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759908701; c=relaxed/simple; bh=agB7R+9Nc7Xa8r3mTLDJWLHmPOIdfJpdAOkijSJe8u0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UXh/qqff81YJflJIddp5t/pHEPqD7Uyk5LCrcft6Ojc5InKnwW6xN/x593L4vUdxma4Ev8fEjZ7TwmPceg9z6/5DK1meDQWUQzO9TG05k/4iQxedaX3/nS+fOzW971a4VyD+hApk2DGhBIn9DhkdoMnvf6nHXzBuEYZAh8C4miY= 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=LK4et3lI; arc=none smtp.client-ip=209.85.167.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="LK4et3lI" Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-578ecc56235so4635550e87.0 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=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=HjfbTYrP5NC68URbVh+FkOk1JtMEk1EsAcXdfuuQgaU=; b=LK4et3lIQ3k0ypg+anpLISWmlqUoKAz0HL4vQfyMLGos5md7SJtw4KR70pKp6+sLRg mn9o7MI40OV6gG8ENS+Bj17mDzxKZj/T+MHGJqtVp+6ytNHah4hWF1MwggN5C7cjdmSx MGvxUWAs9jPjeCCm7GDjroc4D5xrKjW4RlJJzspXEd9zkzHLox1VLotorDm4R/9GnzIL aFydZ+aNtCN8eK1Hc4nO80xEAh15GHIPgtdV29DhnxFgaIQAZSGpJjgM1OJgIQa5JMLi GneovLAV4t1pdq5BMHJKEwu13Qq0p4GWuHd4c0X56lHM9i6mtFGfSSPLDJcqppXJTQ0n CXqA== 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=uoMr3vtCbk+XizAKuLOd3r6sumyugPBylTA/ZUZVFj2JB6vaTcKk0GWldkFKQ3KrtF /D51qnRLLxooI8k/3aDvtG1w0gPN/1Ed8fKIubDrKrWJF68hNB58f9kFY3LZwPz24aEh QuiC68zsfnIHJn/fkHBtyH+zlwr+x9Ilg7ULDmIPMBaUEk0vsdI6OBqBFsK6lkiot9yZ ShfLFmZ89mAo67PQ8FfLvxAqXUCFV2lNZzSb+tPuO6S2OrTcss2tzkmwauCzO/lWLyRc 8mZ6B7bAtEqR4bhFDEVP3+LUrnhsCBOYJGtgZVsoAQkBHTHUEDDarLfzIUG0j3tKnpfM dd3g== X-Forwarded-Encrypted: i=1; AJvYcCXUF1dOGbVoXY9dR926MGdy2lIun+iLznEYMqGDW7lnXhOO5BCa30sD0fkDrrvQWY/vIeoj0L3KQL2q8T+a@lists.linux.dev X-Gm-Message-State: AOJu0YwkUd8wr3fO4E2z1MQgDAtI1qR/8a54+oScU4h6OTRvCrgIsbzQ CyXknmtvvg7dbTJYmC0aSp5Hq9+p0d2/TbCnkU46TxqdXSv7zqKbVeJU X-Gm-Gg: ASbGncsIwXUD8mozrfoQ1ck0/2SGozbX7NKwiDL0in1of0rRbNaWzxWtcDfDCi/45rf Mb0utxLwMHARhfIdlupF99sMmHtjhiocuN8AKBb5Taa/T7tG5br3kO5eoVsEwzq2M8eD5/fc5i4 8MTwJBvy0aLS4Ga3J4pBVq0hPgPGx8PfnvhqkOyP8z5Tk5JFLumENwErpwbtZXMJbVsMT9sDnM4 Ux4BrkA4HpoxYCb7LuYqd3NPKcSuofatS/gqn2uGqc1LP2Op2EzHxxwjMZ32rtRQBg52T/ACQTl YF8avz3qkRmsS8jyf248KfOpZ7mearwKuvl+MfsxIJ4peO6YIV1qm0Obi4L9FLOKCmRXgs5uEyj xc5YDuBa5e5iTVmq2livTdzdZXWj09Xil8zmgtiODlL94MR0G 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-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. 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