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 AF1A3CCD199 for ; Fri, 17 Oct 2025 16:51:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EEC1A10EC9A; Fri, 17 Oct 2025 16:51:13 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; secure) header.d=mailbox.org header.i=@mailbox.org header.b="Z5SQVXJJ"; dkim-atps=neutral Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) by gabe.freedesktop.org (Postfix) with ESMTPS id 59C0410EC99 for ; Fri, 17 Oct 2025 16:51:07 +0000 (UTC) Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (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) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4cp9nN3gTMz9v6q; Fri, 17 Oct 2025 18:51:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1760719864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JXd+1w5cvwDxWg/MvxbTe/pIUcBohLvdeQLeTekfpD0=; b=Z5SQVXJJxX/EEhr2Yrl3G2wPxuyeOIAaC5S7VeWMSq+9BrA8hFz0xgCDOjHD3p7irIA+Pg WJhXsRV/SyXA81YMwMVVqJb8VDkpPaGNqLiZ51wR4oSYlDDeR9rlV08jwg3vGg61mn1s9j HkAn8Jau6nDkA4stJSPc0tt9bA98b/xMDrDJr72dBjwkG2LsrEGS9WC9D8IjqtDpeTqn+7 K6ViFHp010x0zKcsw9IrDn7xoGsiuO5JWQJsq/WIudbCezApPwjosSDjWG9N+zWCRAPDNd Gqom6rppjAC8KSYmHK5itXGihAMqcgDPPY8F6rBpau8bWO6ymqsRn8p+vsKnLg== Message-ID: <5a725651-8f6a-4e4c-aa11-c68e1f1cb87a@mailbox.org> Date: Fri, 17 Oct 2025 17:20:18 +0200 MIME-Version: 1.0 Subject: Re: [PATCH 20/39] drm/imx: dc: Configure display CSR clock feed select To: Frank Li Cc: dri-devel@lists.freedesktop.org, Abel Vesa , Conor Dooley , Fabio Estevam , Krzysztof Kozlowski , Laurent Pinchart , Liu Ying , Lucas Stach , Peng Fan , Pengutronix Kernel Team , Rob Herring , Shawn Guo , Thomas Zimmermann , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org References: <20251011170213.128907-1-marek.vasut@mailbox.org> <20251011170213.128907-21-marek.vasut@mailbox.org> Content-Language: en-US From: Marek Vasut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-MBO-RS-ID: 3c5b4d362fc513602ca X-MBO-RS-META: ju5ym6h4jbph7no9ndbcreg74e6gbgoc 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" On 10/13/25 8:48 PM, Frank Li wrote: Hello Frank, >> @@ -119,6 +127,17 @@ static int dc_drm_bind(struct device *dev) >> if (ret) >> return ret; >> >> + if (priv->regmap) { >> + regmap_write_bits(priv->regmap, DISPLAY_ENGINES_CLOCK_CONTROL, >> + DISP_CLK0_SEL | DISP_CLK1_SEL, >> + FIELD_PREP(DISP_CLK0_SEL, >> + ((dc_drm->encoder[0].encoder_type == DRM_MODE_ENCODER_DSI) ? >> + DISP_CLK_SEL_CCM : DISP_CLK_SEL_LVDS)) | >> + FIELD_PREP(DISP_CLK1_SEL, >> + ((dc_drm->encoder[1].encoder_type == DRM_MODE_ENCODER_DSI) ? >> + DISP_CLK_SEL_CCM : DISP_CLK_SEL_LVDS))); >> + } >> + > > why not export as clock providor and use clk API to do that? I don't think there are any clock operations (enable/disable/set_rate/...) besides controlling this selector/mux (set_parent), so using the clock API would have massive overhead for little gain.