linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Liu Ying <victor.liu@nxp.com>
To: Marek Vasut <marek.vasut@mailbox.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	Dmitry Baryshkov <lumag@kernel.org>
Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Frank Li <Frank.Li@nxp.com>
Subject: Re: [PATCH v4 07/14] drm/imx: dc: Add DPR channel support
Date: Tue, 4 Nov 2025 15:18:09 +0800	[thread overview]
Message-ID: <df8751ba-7215-4635-98b0-ca659ec786cd@nxp.com> (raw)
In-Reply-To: <500852c9-2cd5-4897-a139-4e93988f5469@mailbox.org>

On 11/02/2025, Marek Vasut wrote:
> On 10/20/25 4:47 AM, Liu Ying wrote:
> 
> Hello Liu,

Hello Marek,

> 
> sorry for my late reply.
> 
>>>> +++ b/drivers/gpu/drm/imx/dc/Kconfig
>>>> @@ -1,6 +1,7 @@
>>>>    config DRM_IMX8_DC
>>>>        tristate "Freescale i.MX8 Display Controller Graphics"
>>>>        depends on DRM && COMMON_CLK && OF && (ARCH_MXC || COMPILE_TEST)
>>>> +    depends on IMX_SCU
>>> Can the SCU dependency be made optional,
>>
>> I don't think this can be done.  If you grep 'depends on IMX_SCU' in
>> kernel, you may find a handful of existing dependancies.
> 
> Sure, I do not dispute this part.
> 
> But the SCU dependency can be contained in a component of this driver,
> which is not used by MX95, and used only by MX8Q . Then there will be
> no problem.

Which component?  You mean PRG and DPRC?

If we add something like CONFIG_DRM_IMX8_DC_PRG and make CONFIG_DRM_IMX8_DC_PRG
depend on SCU, then should we make CONFIG_DRM_IMX8_DC depend on
CONFIG_DRM_IMX8_DC_PRG?  That's yet another dependency.

> 
>>> or per-module,
>>
>> Well, DRM_IMX8_DC(for the imx8_dc_drm module) depends on IMX_SCU just as
>> this patch does.
> 
> I assume it shouldn't have to, because the SCU dependency is only relevant
> for the prefetch engine ?

The SCU dependency is only relevant for the prefetch engine, agreed.
But, how to avoid the dependency?

> 
>>> or somehow abstracted out (via regmap?),
>>
>> Like I replied to your i.MX95 DC patch series's cover letter, SCU accesses
>> registers via Cortex-M core instead of Cortex-A core IIUC.  I really don't
>> know how to abstract IMX_SCU out, especially via regmap.
> 
> The simplest way would be to use regmap_config .reg_read and .reg_write ,
> if there is no better way.

Can you shed more light on this?  Any examples?

> 
>>> so iMX95 support can be added into the driver easily too ?
>>
>> Like I replied to your i.MX95 DC patch series, I think i.MX95 DC support
>> can be in drivers/gpu/drm/imx/dc, but it should be in a separate module
>> (something like imx95_dc_drm) plus an additional common module(like
>> imx_dc_drm_common).
> This design part is something I do not fully understand. Sure, it can be
> two modules, but in the end, the result would have to be capable of being
> compiled into single kernel binary if both modules would be =y in Kconfig
> anyway.

This is something like imx8qm_ldb, imx8qxp_ldb and imx_ldb_helper modules -
DRM_IMX8QM_LDB and DRM_IMX8QXP_LDB select DRM_IMX_LDB_HELPER.

Note you may make CONFIG_DRM_IMX8QM_LDB=y and CONFIG_DRM_IMX8QXP_LDB=m with
CONFIG_DRM_IMX_LDB_HELPER=y.

-- 
Regards,
Liu Ying


  reply	other threads:[~2025-11-04  7:17 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-16  6:32 [PATCH v4 00/14] drm/imx: dc: Use prefetch engine Liu Ying
2025-10-16  6:32 ` [PATCH v4 01/14] dt-bindings: display: imx: Add i.MX8qxp/qm PRG binding Liu Ying
2025-10-16  6:32 ` [PATCH v4 02/14] dt-bindings: display: imx: Add i.MX8qxp/qm DPR channel binding Liu Ying
2025-10-16  6:32 ` [PATCH v4 03/14] MAINTAINERS: Add i.MX8qxp prefetch engine DT binding files Liu Ying
2025-10-16  6:34   ` Krzysztof Kozlowski
2025-10-16  6:38     ` Liu Ying
2025-10-16  6:42       ` Krzysztof Kozlowski
2025-10-16  6:32 ` [PATCH v4 04/14] drm/imx: dc-fu: Fix dimensions Liu Ying
2025-10-16  6:32 ` [PATCH v4 05/14] drm/imx: dc-crtc: Disable at boot Liu Ying
2025-10-16  6:32 ` [PATCH v4 06/14] drm/imx: dc: Add PRG support Liu Ying
2025-10-16  6:32 ` [PATCH v4 07/14] drm/imx: dc: Add DPR channel support Liu Ying
2025-10-16 17:39   ` Marek Vasut
2025-10-20  2:47     ` Liu Ying
2025-11-02 16:14       ` Marek Vasut
2025-11-04  7:18         ` Liu Ying [this message]
2025-11-09 19:11           ` Marek Vasut
2025-11-14 10:03             ` Liu Ying
2025-10-16  6:32 ` [PATCH v4 08/14] drm/imx: dc: Use TCON operation mode Liu Ying
2025-10-16  6:32 ` [PATCH v4 09/14] drm/imx: dc-ed: Support getting source selection Liu Ying
2025-10-16  6:32 ` [PATCH v4 10/14] drm/imx: dc-lb: Support getting secondary input selection Liu Ying
2025-10-16  6:32 ` [PATCH v4 11/14] drm/imx: dc-ed: Drop initial source selection Liu Ying
2025-10-16  6:32 ` [PATCH v4 12/14] drm/imx: dc-lb: Drop initial primary and secondary input selections Liu Ying
2025-10-16  6:32 ` [PATCH v4 13/14] drm/imx: dc-fu: Get DPR channel Liu Ying
2025-10-16  6:32 ` [PATCH v4 14/14] drm/imx: dc: Use prefetch engine Liu Ying

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=df8751ba-7215-4635-98b0-ca659ec786cd@nxp.com \
    --to=victor.liu@nxp.com \
    --cc=Frank.Li@nxp.com \
    --cc=airlied@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lumag@kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=marek.vasut@mailbox.org \
    --cc=mripard@kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).