From: Liu Ying <victor.liu@nxp.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.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, linux-phy@lists.infradead.org,
p.zabel@pengutronix.de, airlied@gmail.com, simona@ffwll.ch,
maarten.lankhorst@linux.intel.com, mripard@kernel.org,
tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de,
kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de,
vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com,
agx@sigxcpu.org, u.kleine-koenig@baylibre.com,
francesco@dolcini.it, frank.li@nxp.com
Subject: Re: [PATCH v7 12/19] drm/imx: Add i.MX8qxp Display Controller KMS
Date: Mon, 30 Dec 2024 09:50:30 +0800 [thread overview]
Message-ID: <e78b6142-b0fd-40ab-b342-2ec2c4f89d4f@nxp.com> (raw)
In-Reply-To: <CAA8EJpqwRfkjGCYfeRPj7u5hb_8fkMFDtcK1+YDG4nsez1WNXw@mail.gmail.com>
On 12/27/2024, Dmitry Baryshkov wrote:
> On Wed, 25 Dec 2024 at 09:18, Liu Ying <victor.liu@nxp.com> wrote:
>>
>> On 12/23/2024, Dmitry Baryshkov wrote:
>>> On Mon, Dec 23, 2024 at 02:41:40PM +0800, Liu Ying wrote:
>>>> i.MX8qxp Display Controller(DC) is comprised of three main components that
>>>> include a blit engine for 2D graphics accelerations, display controller for
>>>> display output processing, as well as a command sequencer. Add kernel
>>>> mode setting support for the display controller part with two CRTCs and
>>>> two primary planes(backed by FetchLayer and FetchWarp respectively). The
>>>> registers of the display controller are accessed without command sequencer
>>>> involved, instead just by using CPU. The command sequencer is supposed to
>>>> be used by the blit engine.
>>>>
>>>> Reviewed-by: Maxime Ripard <mripard@kernel.org>
>>>> Signed-off-by: Liu Ying <victor.liu@nxp.com>
>>>> ---
>>>> v7:
>>>> * Drop using typeof in macros and explicitly define variable types. (Dmitry)
>>>> * Add a comment for disable_irq_nosync() to explain why _nosync. (Dmitry)
>>>> * Inline dc_crtc_check_clock(). (Dmitry)
>>>> * Use global drm_dc->pe. (Dmitry)
>>>> * Drop dc_crtc_disable_at_unbind(). (Dmitry)
>>>> * Add kernel doc for struct dc_{crtc,drm_device,plane}. (Dmitry)
>>>> * Define common IRQ handlers separately for each IRQs. (Dmitry)
>>>> * Rebase this patch upon next-20241220, so drop date entry from drm_driver
>>>> and correctly include drm/clients/drm_client_setup.h.
>>>> * Collect Maxime's R-b tag.
>>>>
>>>> v6:
>>>> * No change.
>>>>
>>>> v5:
>>>> * Replace .remove_new with .remove in dc-drv.c. (Uwe)
>>>>
>>>> v4:
>>>> * Move dc_fg_displaymode(), dc_fg_panic_displaymode() and dc_lb_blendcontrol()
>>>> function calls from KMS routine to initialization stage. (Dmitry)
>>>> * Drop dc-crtc.h and dc-plane.h header files and move relevant defines to
>>>> appropriate .h header files or .c source files. (Dmitry)
>>>> * Drop futile "else" clause from dc_crtc_common_irq_handler(). (Dmitry)
>>>> * Drop dc_drm->pe_rpm_count. (Dmitry)
>>>> * Drop DC_{CRTCS,ENCODERS,PRIMARYS} macros and only use DC_DISPLAYS. (Dmitry)
>>>> * Drop drmm_kcalloc() function call to allocate an array for storing IRQs.
>>>> Instead, put it in struct dc_crtc. (Dmitry)
>>>> * Call devm_request_irq() to request IRQs, instead of using drmm action.
>>>> (Dmitry)
>>>> * Call devm_drm_of_get_bridge() to find the next bridge. (Dmitry)
>>>> * Select DRM_CLIENT_SELECTION due to rebase.
>>>> * Select the missing DRM_DISPLAY_HELPER and DRM_BRIDGE_CONNECTOR.
>>>> * Use DRM_FBDEV_DMA_DRIVER_OPS due to rebase.
>>>> * Replace drm_fbdev_dma_setup() with drm_client_setup_with_fourcc() due to
>>>> rebase.
>>>> * Replace drmm_add_action_or_reset() with devm_add_action_or_reset() to
>>>> register dc_drm_component_unbind_all() action.
>>>> * Request interrupts in dc_crtc_post_init() after encoder initialization to
>>>> make sure next bridge is found first.
>>>>
>>>> v3:
>>>> * No change.
>>>>
>>>> v2:
>>>> * Find next bridge from TCon's port.
>>>> * Drop drm/drm_module.h include from dc-drv.c.
>>>>
>>>> drivers/gpu/drm/imx/dc/Kconfig | 5 +
>>>> drivers/gpu/drm/imx/dc/Makefile | 5 +-
>>>> drivers/gpu/drm/imx/dc/dc-crtc.c | 556 ++++++++++++++++++++++++++++++
>>>> drivers/gpu/drm/imx/dc/dc-de.h | 3 +
>>>> drivers/gpu/drm/imx/dc/dc-drv.c | 238 +++++++++++++
>>>> drivers/gpu/drm/imx/dc/dc-drv.h | 22 ++
>>>> drivers/gpu/drm/imx/dc/dc-kms.c | 143 ++++++++
>>>> drivers/gpu/drm/imx/dc/dc-kms.h | 131 +++++++
>>>> drivers/gpu/drm/imx/dc/dc-plane.c | 241 +++++++++++++
>>>> 9 files changed, 1342 insertions(+), 2 deletions(-)
>>>> create mode 100644 drivers/gpu/drm/imx/dc/dc-crtc.c
>>>> create mode 100644 drivers/gpu/drm/imx/dc/dc-kms.c
>>>> create mode 100644 drivers/gpu/drm/imx/dc/dc-kms.h
>>>> create mode 100644 drivers/gpu/drm/imx/dc/dc-plane.c
>>>>
>>>
>>>
>>>> +
>>>> +static int dc_plane_check_no_off_screen(struct drm_plane_state *state,
>>>> + struct drm_crtc_state *crtc_state)
>>>> +{
>>>> + if (state->dst.x1 < 0 || state->dst.y1 < 0 ||
>>>> + state->dst.x2 > crtc_state->adjusted_mode.hdisplay ||
>>>> + state->dst.y2 > crtc_state->adjusted_mode.vdisplay) {
>>>> + dc_plane_dbg(state->plane, "no off screen\n");
>>>> + return -EINVAL;
>>>> + }
>>>
>>> Nit: doesn't drm_atomic_helper_check_plane_state() ensure in this already?
>>
>> The can_position argument is set to true, though it is a bit unusual
>> for primary plane. If can_position is false, I think this should be
>> ensured already by drm_atomic_helper_check_plane_state().
>
> The function still calls drm_rect_clip_scaled() to clip the
> plane_state->dst, does it not?
You are right. I'll drop dc_plane_check_no_off_screen() in next version.
>
>>> With that in mind
>>>
>>> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>
>> Thanks.
>
>
>
--
Regards,
Liu Ying
next prev parent reply other threads:[~2024-12-30 1:49 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-23 6:41 [PATCH v7 00/19] Add Freescale i.MX8qxp Display Controller support Liu Ying
2024-12-23 6:41 ` [PATCH v7 01/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller processing units Liu Ying
2024-12-23 6:41 ` [PATCH v7 02/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller blit engine Liu Ying
2024-12-23 6:41 ` [PATCH v7 03/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller display engine Liu Ying
2024-12-23 10:26 ` Dmitry Baryshkov
2024-12-24 5:57 ` Liu Ying
2024-12-24 6:37 ` Dmitry Baryshkov
2024-12-24 7:04 ` Liu Ying
2024-12-23 6:41 ` [PATCH v7 04/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller pixel engine Liu Ying
2024-12-23 6:41 ` [PATCH v7 05/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller AXI performance counter Liu Ying
2024-12-23 6:41 ` [PATCH v7 06/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller command sequencer Liu Ying
2024-12-23 6:41 ` [PATCH v7 07/19] dt-bindings: interrupt-controller: Add i.MX8qxp Display Controller interrupt controller Liu Ying
2024-12-23 6:41 ` [PATCH v7 08/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller Liu Ying
2024-12-23 6:41 ` [PATCH v7 09/19] drm/imx: Add i.MX8qxp Display Controller display engine Liu Ying
2024-12-23 10:51 ` Dmitry Baryshkov
2024-12-24 6:22 ` Liu Ying
2024-12-24 6:44 ` Dmitry Baryshkov
2024-12-24 8:26 ` Liu Ying
2024-12-24 6:26 ` Liu Ying
2024-12-23 6:41 ` [PATCH v7 10/19] drm/imx: Add i.MX8qxp Display Controller pixel engine Liu Ying
2024-12-23 11:15 ` Dmitry Baryshkov
2024-12-24 6:47 ` Liu Ying
2024-12-23 6:41 ` [PATCH v7 11/19] drm/imx: Add i.MX8qxp Display Controller interrupt controller Liu Ying
2024-12-23 11:17 ` Dmitry Baryshkov
2024-12-23 6:41 ` [PATCH v7 12/19] drm/imx: Add i.MX8qxp Display Controller KMS Liu Ying
2024-12-23 11:32 ` Dmitry Baryshkov
2024-12-25 7:19 ` Liu Ying
2024-12-26 20:19 ` Dmitry Baryshkov
2024-12-30 1:50 ` Liu Ying [this message]
2024-12-23 6:41 ` [PATCH v7 13/19] MAINTAINERS: Add maintainer for i.MX8qxp Display Controller Liu Ying
2024-12-23 6:41 ` [DO NOT MERGE PATCH v7 14/19] dt-bindings: phy: mixel, mipi-dsi-phy: Allow assigned-clock* properties Liu Ying
2024-12-23 6:41 ` [DO NOT MERGE PATCH v7 15/19] dt-bindings: firmware: imx: Add SCU controlled display pixel link nodes Liu Ying
2024-12-23 6:41 ` [DO NOT MERGE PATCH v7 16/19] arm64: dts: imx8qxp: Add display controller subsystem Liu Ying
2024-12-23 6:41 ` [DO NOT MERGE PATCH v7 17/19] arm64: dts: imx8qxp: Add MIPI-LVDS combo subsystems Liu Ying
2024-12-23 6:41 ` [DO NOT MERGE PATCH v7 18/19] arm64: dts: imx8qxp-mek: Enable display controller Liu Ying
2024-12-23 6:41 ` [DO NOT MERGE PATCH v7 19/19] arm64: dts: imx8qxp-mek: Add MX8-DLVDS-LCD1 display module support 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=e78b6142-b0fd-40ab-b342-2ec2c4f89d4f@nxp.com \
--to=victor.liu@nxp.com \
--cc=agx@sigxcpu.org \
--cc=airlied@gmail.com \
--cc=aisheng.dong@nxp.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=festevam@gmail.com \
--cc=francesco@dolcini.it \
--cc=frank.li@nxp.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=kishon@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=maarten.lankhorst@linux.intel.com \
--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=tglx@linutronix.de \
--cc=tzimmermann@suse.de \
--cc=u.kleine-koenig@baylibre.com \
--cc=vkoul@kernel.org \
/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