From patchwork Wed Apr 2 13:30:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 14036048 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 36E85C369A6 for ; Wed, 2 Apr 2025 13:37:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=p6wtw8Q0jF7qvle4bWEZgGO+Q63Aig728jE8v+uIBIQ=; b=HbJJW0Y2P3btt1 ZiPeOjb2zBPN6Wcp06b5pNDYJRxZQ1z63UG49xxn2hONsjO21NTr6AHQ+AJxdkrHXytsLr0/mGLiw dRfXo5PlYDC3E6vPCM6HnRxC3HXYuu9tTllJyOoWsu4oQcOzIkQjA21yFMGDLEYZG5kp4kwv27dQ6 JZH29nV6IKTNhuLG2iYu+srF2hREN7zfsELHlRS8D9AfLA/fKb2q987UpvvPQex+J1gFAMFqofrNj SQBuoZPNRabTeTrb+n5xXsfOMwjrfFsVdgOY9ZDKcXoeB1lKtPP8sWceSMkLszicROA8o0rvS7RTh 9f8N2xmJENZ3CdjjM5Kg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.1 #2 (Red Hat Linux)) id 1tzyHz-00000006GpL-40df; Wed, 02 Apr 2025 13:37:55 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.98.1 #2 (Red Hat Linux)) id 1tzyBo-00000006FFY-3Tf3 for linux-phy@lists.infradead.org; Wed, 02 Apr 2025 13:31:34 +0000 Received: from [127.0.1.1] (91-158-153-178.elisa-laajakaista.fi [91.158.153.178]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0252D25EC; Wed, 2 Apr 2025 15:29:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1743600579; bh=IIDKgphBR8Z+MRb90fam19Jh4edh+nhVkDzVKuQW/rY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ewM5tG4L4CyDBKjLkSnh7Rr31MZz7fmacUoHMQMziVAXkIX7yD4ZQ3F3N6n2wdbv/ HzBWmdmMDQX4K8btkW357qlv0EAC8avTWIiuEe+GPkZzs6wkWK/efBrhmIbzC16QJd yumSuguNH+GOaHJSTfiUiF4x9yycs/yfPj50xyts= From: Tomi Valkeinen Date: Wed, 02 Apr 2025 16:30:56 +0300 Subject: [PATCH v2 14/18] drm/bridge: cdns-dsi: Use videomode internally MIME-Version: 1.0 Message-Id: <20250402-cdns-dsi-impro-v2-14-4a093eaa5e27@ideasonboard.com> References: <20250402-cdns-dsi-impro-v2-0-4a093eaa5e27@ideasonboard.com> In-Reply-To: <20250402-cdns-dsi-impro-v2-0-4a093eaa5e27@ideasonboard.com> To: Jyri Sarha , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Vinod Koul , Kishon Vijay Abraham I , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, Francesco Dolcini , Aradhya Bhatia , Devarsh Thakkar , Tomi Valkeinen X-Mailer: b4 0.15-dev-c25d1 X-Developer-Signature: v=1; a=openpgp-sha256; l=4546; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=IIDKgphBR8Z+MRb90fam19Jh4edh+nhVkDzVKuQW/rY=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBn7TwgE/Bvc7519Sav63c0+qQ9diO63TzZq0FQt bfZL9SrcD2JAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCZ+08IAAKCRD6PaqMvJYe 9VncD/9A2IAiZBtLzbDk1nuBNFg+G5KREDNLS8B4zuMU3PYMZaXqSsVkC7XtLfeNq7K7sqyUFWJ TOAu0B5cX6KqWqSMjJMk2O40xrNBfoC8X9LSwk0dWekEvYkgk0MEhk4bx0aPrV90XQh5hWSc7ou nn17eQTJm+++ctGVPCQ2CEyoRnA5yxyuXUDKWV+wM+lE7kEL6sQXrfN66aUHV0HEwKgbVM9kQIk YK1KXS/Ing/hhEn5jwAeq1AzInP6wNvu6UOMjz1qYKoRWobkYw4ccAPK6+X47PTq1L6mVw1oBgs 9CRLlRS/jhzzURio7IedIGL9oW8U9EihYeYo3ao8IKygZDQH288xX3qLDLVWLypVcktZvmIiMDA zX273jVH+BrLsooaYPk5fGLMVOCNEWjtlvPpcQSL7IBjZKgKM0Gv7fa6Q5cCSx47tTcrY3TOoYQ v5atM+ropp+FV9Q4MV8Onvw3hur+38pdZB+ZNzb471C8dWlsGmnS/tKbBkIH8CfkuH02nVNXAnw F4P882pDYymsmLJlp7C8ND3GaRFXNmSJZ34rlpoxjfP7zwXDGP9O7F3b8xTmIELWjalqC4Pi99p KJZs7q9fY092WkvCOtBMdb2vqDeDzPYhSjj/siufqhqs1ZAVbphJU7BHmUA6j+Q8khTD/IExsPH XBrm62/72WB7nMg== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250402_063133_181861_B9F43444 X-CRM114-Status: GOOD ( 12.71 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org The drm_display_mode is a bit difficult one to use (we need hfp, hbp, ... instead of hsync_start, hsync_end, ...) and understand (when to use crtc_* fields). To simplify the code, use struct videomode internally which cleans up the code. If in the future we want to use crtc_* fields in some code patchs, that can be easily achieved by creating a videomode from the crtc_* fields, and no change to the functions that do the work is needed. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c | 31 +++++++++++++++----------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c b/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c index 220213f5cb09..1a30e2f7d402 100644 --- a/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c +++ b/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c @@ -9,6 +9,7 @@ #include #include #include