From patchwork Tue Feb 6 12:07:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 13547117 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 A4C79C4828D for ; Tue, 6 Feb 2024 12:07:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=3AJfilpWGVVCgWf2+uJrbEPq/HIxVIIzsz0p+YLaXtM=; b=MPNWQxrMnBqO04 cSYAKKIKWko1SMrXrArURBVUqoxZZgiAHiEF4UevQlOM8on0y4j+JdRMcMNm3aCJFFcL1CdjYVQCk mP+G14BeXtFvGFNriRg2MGmAl7cFxP/LfWp2Eq0YreuNO8SsHkrNSwkWQM9fnHx5Plf/NXznJjmDs VAAVJvxLO5bCZeszctd/zGqkunlTC7bwnVpGtlDdTKzocO8DVUh6Wf/M0DpfxRmOqh1ubv7ccQL7e jxblV0n5c1Hh7CerBU4YIO31GwfEaOlBXzCAlWAr04Mn4ti3B/ebjAep4to8Fc6wA+iy3Q8tllXP1 LT4y/WjU81r0+EO33VhQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rXKF2-00000007TuP-4BjI; Tue, 06 Feb 2024 12:07:57 +0000 Received: from madrid.collaboradmins.com ([46.235.227.194]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rXKF0-00000007TsT-1HMp; Tue, 06 Feb 2024 12:07:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1707221272; bh=Mv6zf86XoMmKd7NcYaO5kG+cRiZYMBMgYxftUMxYBJE=; h=From:To:Cc:Subject:Date:From; b=ORy0tUp0WLvNg2y025fU0e1/OBcibOUv+i13OzSeb+EpmrAgEFen9ZCVyeHqx+cJP 81dwl8H1W9dPWiOtLMAbuVC3bPH0sdv4MNAtfJ0XfLSBbZ0huLbvwDenbjz7U9vxxS 10hrbxkb1qOFkOBKa17Y393/WEHrKHWTcMyU5E70DkAUugg01RKjQKt4KfE1kSom1t 5+mtVQwQTuc4YnaIN55KJLyTdnm7TRkvaWgdy0s/lLob2D83ypjiJPV1Lsq2Vl2Rdg ApXKcBmTbyXw9ydDjUuBsdOuYCM8bF88ffDeFouow+OIZHPtrFcyEWyX9UF+gCdSr6 SB/gZ3EIswHNA== Received: from IcarusMOD.eternityproject.eu (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id CBA4B3781F8E; Tue, 6 Feb 2024 12:07:51 +0000 (UTC) From: AngeloGioacchino Del Regno To: chunkuang.hu@kernel.org Subject: [PATCH v4 0/9] MediaTek DRM - DSI driver cleanups Date: Tue, 6 Feb 2024 13:07:39 +0100 Message-ID: <20240206120748.136610-1-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240206_040754_499516_566B9D1A X-CRM114-Status: UNSURE ( 8.25 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: p.zabel@pengutronix.de, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, daniel@ffwll.ch, matthias.bgg@gmail.com, kernel@collabora.com, airlied@gmail.com, linux-arm-kernel@lists.infradead.org, angelogioacchino.delregno@collabora.com Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Changes in v4: - Added a fix for RGB666 formats setting and for wrong register definitions for packed vs loosely packed formats - Added a commit to make use of mipi_dsi_pixel_format_to_bpp() helper instead of open coding the same Changes in v3: - Rebased over next-20240131 - Added bitfield.h inclusion in patch 3 - Added three more cleanup commits to the mix to simplify the probe function and remove gotos. Changes in v2: - Rebased over next-20231213 This series performs some cleanups for mtk_dsi, enhancing human readability, using kernel provided macros where possible and also reducing code size. Tested on MT8173 and MT8192 Chromebooks (using a DSI<->DP bridge) and on MT6795 Sony Xperia M5 (DSI video mode panel). AngeloGioacchino Del Regno (9): drm/mediatek: dsi: Use GENMASK() for register mask definitions drm/mediatek: dsi: Fix DSI RGB666 formats and definitions drm/mediatek: dsi: Cleanup functions mtk_dsi_ps_control{_vact}() drm/mediatek: dsi: Use bitfield macros where useful drm/mediatek: dsi: Replace open-coded instance of HZ_PER_MHZ drm/mediatek: dsi: Register DSI host after acquiring clocks and PHY drm/mediatek: dsi: Simplify with dev_err_probe and remove gotos drm/mediatek: dsi: Compress of_device_id entries and add sentinel drm/mediatek: dsi: Use mipi_dsi_pixel_format_to_bpp() helper function drivers/gpu/drm/mediatek/mtk_dsi.c | 310 ++++++++++++----------------- 1 file changed, 126 insertions(+), 184 deletions(-)