From: Inki Dae <daeinki@gmail.com>
To: Kaustabh Chakraborty <kauschluss@disroot.org>
Cc: Jagan Teki <jagan@amarulasolutions.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Andrzej Hajda <andrzej.hajda@intel.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Robert Foss <rfoss@kernel.org>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Jonas Karlman <jonas@kwiboo.se>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
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>,
Seung-Woo Kim <sw0312.kim@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
Alim Akhtar <alim.akhtar@samsung.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org
Subject: Re: [PATCH v3 03/13] drm/bridge: samsung-dsim: add flag to control header FIFO wait
Date: Tue, 29 Jul 2025 12:55:09 +0900 [thread overview]
Message-ID: <CAAQKjZPNh=r5xf7X_R58VhuKz61vVGO83Oe9KsA1m_nJ1OuMLA@mail.gmail.com> (raw)
In-Reply-To: <20250706-exynos7870-dsim-v3-3-9879fb9a644d@disroot.org>
2025년 7월 7일 (월) 오전 3:26, Kaustabh Chakraborty <kauschluss@disroot.org>님이 작성:
>
> Exynos7870's DSIM device doesn't require waiting for the header FIFO
> during a MIPI DSI transfer. Add a flag in the driver data in order to
> control said behavior.
I will merge this patch as-is and just sharing the following comments
purely for reference (for other Exynos DRM contributors).
This patch likely needs follow-up improvements in conjunction with
Marek’s earlier patch (commit-id:
15f389da11257b806da75a070cfa41ca0cc15aae). I’m unable to verify this
at the moment because the SoC Technical Reference Manual (TRM)
documentation I have is incomplete.
Based on these two patches, we should plan for future code
improvements that account for two scenarios:
- The header FIFO must be waited for.
- The header FIFO does not need to be waited for.
Currently, this is handled via driver data using the
has_broken_fifoctrl_emptyhdr and wait_for_hdr_fifo flags. If the
handling of this behavior changes in newer Exynos SoCs, this approach
may become confusing or lead to inconsistencies.
Thanks,
Inki Dae
>
> Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
> ---
> drivers/gpu/drm/bridge/samsung-dsim.c | 15 ++++++++++++---
> include/drm/bridge/samsung-dsim.h | 1 +
> 2 files changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c
> index dca3939dd99fa07aee309067b93e652bc9a9b78f..84af24171b6856cbcf95b9077b997ee587fc0409 100644
> --- a/drivers/gpu/drm/bridge/samsung-dsim.c
> +++ b/drivers/gpu/drm/bridge/samsung-dsim.c
> @@ -418,6 +418,7 @@ static const struct samsung_dsim_driver_data exynos3_dsi_driver_data = {
> .has_clklane_stop = 1,
> .num_clks = 2,
> .max_freq = 1000,
> + .wait_for_hdr_fifo = 1,
> .wait_for_reset = 1,
> .num_bits_resol = 11,
> .pll_p_offset = 13,
> @@ -438,6 +439,7 @@ static const struct samsung_dsim_driver_data exynos4_dsi_driver_data = {
> .has_clklane_stop = 1,
> .num_clks = 2,
> .max_freq = 1000,
> + .wait_for_hdr_fifo = 1,
> .wait_for_reset = 1,
> .num_bits_resol = 11,
> .pll_p_offset = 13,
> @@ -456,6 +458,7 @@ static const struct samsung_dsim_driver_data exynos5_dsi_driver_data = {
> .has_legacy_status_reg = 1,
> .num_clks = 2,
> .max_freq = 1000,
> + .wait_for_hdr_fifo = 1,
> .wait_for_reset = 1,
> .num_bits_resol = 11,
> .pll_p_offset = 13,
> @@ -474,6 +477,7 @@ static const struct samsung_dsim_driver_data exynos5433_dsi_driver_data = {
> .has_clklane_stop = 1,
> .num_clks = 5,
> .max_freq = 1500,
> + .wait_for_hdr_fifo = 1,
> .wait_for_reset = 0,
> .num_bits_resol = 12,
> .pll_p_offset = 13,
> @@ -492,6 +496,7 @@ static const struct samsung_dsim_driver_data exynos5422_dsi_driver_data = {
> .has_clklane_stop = 1,
> .num_clks = 2,
> .max_freq = 1500,
> + .wait_for_hdr_fifo = 1,
> .wait_for_reset = 1,
> .num_bits_resol = 12,
> .pll_p_offset = 13,
> @@ -510,6 +515,7 @@ static const struct samsung_dsim_driver_data imx8mm_dsi_driver_data = {
> .has_clklane_stop = 1,
> .num_clks = 2,
> .max_freq = 2100,
> + .wait_for_hdr_fifo = 1,
> .wait_for_reset = 0,
> .num_bits_resol = 12,
> /*
> @@ -1117,6 +1123,7 @@ static void samsung_dsim_send_to_fifo(struct samsung_dsim *dsi,
> {
> struct device *dev = dsi->dev;
> struct mipi_dsi_packet *pkt = &xfer->packet;
> + const struct samsung_dsim_driver_data *driver_data = dsi->driver_data;
> const u8 *payload = pkt->payload + xfer->tx_done;
> u16 length = pkt->payload_length - xfer->tx_done;
> bool first = !xfer->tx_done;
> @@ -1157,9 +1164,11 @@ static void samsung_dsim_send_to_fifo(struct samsung_dsim *dsi,
> return;
>
> reg = get_unaligned_le32(pkt->header);
> - if (samsung_dsim_wait_for_hdr_fifo(dsi)) {
> - dev_err(dev, "waiting for header FIFO timed out\n");
> - return;
> + if (driver_data->wait_for_hdr_fifo) {
> + if (samsung_dsim_wait_for_hdr_fifo(dsi)) {
> + dev_err(dev, "waiting for header FIFO timed out\n");
> + return;
> + }
> }
>
> if (NEQV(xfer->flags & MIPI_DSI_MSG_USE_LPM,
> diff --git a/include/drm/bridge/samsung-dsim.h b/include/drm/bridge/samsung-dsim.h
> index f0c1e5c5ed490afe0bcfd06830f52471710b29ea..62c07952bd00f9c2c287a6a998f0e243dd4032a9 100644
> --- a/include/drm/bridge/samsung-dsim.h
> +++ b/include/drm/bridge/samsung-dsim.h
> @@ -61,6 +61,7 @@ struct samsung_dsim_driver_data {
> unsigned int num_clks;
> unsigned int min_freq;
> unsigned int max_freq;
> + unsigned int wait_for_hdr_fifo;
> unsigned int wait_for_reset;
> unsigned int num_bits_resol;
> unsigned int pll_p_offset;
>
> --
> 2.49.0
>
>
next prev parent reply other threads:[~2025-07-29 3:58 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-06 18:25 [PATCH v3 00/13] Support for Exynos7870 DSIM bridge Kaustabh Chakraborty
2025-07-06 18:25 ` [PATCH v3 01/13] drm/bridge: samsung-dsim: support separate LINK and DPHY status registers Kaustabh Chakraborty
2025-07-06 18:25 ` [PATCH v3 02/13] drm/bridge: samsung-dsim: add SFRCTRL register Kaustabh Chakraborty
2025-07-06 18:25 ` [PATCH v3 03/13] drm/bridge: samsung-dsim: add flag to control header FIFO wait Kaustabh Chakraborty
2025-07-29 3:55 ` Inki Dae [this message]
2025-07-06 18:25 ` [PATCH v3 04/13] drm/bridge: samsung-dsim: allow configuring bits and offsets of CLKCTRL register Kaustabh Chakraborty
2025-07-06 18:25 ` [PATCH v3 05/13] drm/bridge: samsung-dsim: allow configuring the MAIN_VSA offset Kaustabh Chakraborty
2025-07-06 18:25 ` [PATCH v3 06/13] drm/bridge: samsung-dsim: allow configuring the VIDEO_MODE bit Kaustabh Chakraborty
2025-07-06 18:25 ` [PATCH v3 07/13] drm/bridge: samsung-dsim: allow configuring PLL_M and PLL_S offsets Kaustabh Chakraborty
2025-07-06 18:25 ` [PATCH v3 08/13] drm/bridge: samsung-dsim: allow configuring the PLL_STABLE bit Kaustabh Chakraborty
2025-07-06 18:25 ` [PATCH v3 09/13] drm/bridge: samsung-dsim: increase timeout value for PLL_STABLE Kaustabh Chakraborty
2025-07-29 5:44 ` Inki Dae
2025-07-29 15:44 ` Kaustabh Chakraborty
2025-07-06 18:25 ` [PATCH v3 10/13] drm/bridge: samsung-dsim: add ability to define clock names for every variant Kaustabh Chakraborty
2025-07-29 7:02 ` Inki Dae
2025-07-29 16:29 ` Kaustabh Chakraborty
2025-07-06 18:25 ` [PATCH v3 11/13] dt-bindings: samsung,mipi-dsim: document exynos7870 DSIM compatible Kaustabh Chakraborty
2025-07-06 18:25 ` [PATCH v3 12/13] drm/bridge: samsung-dsim: add driver support for exynos7870 DSIM bridge Kaustabh Chakraborty
2025-07-06 18:25 ` [PATCH v3 13/13] drm/exynos: dsi: add support for exynos7870 Kaustabh Chakraborty
2025-07-29 7:35 ` [PATCH v3 00/13] Support for Exynos7870 DSIM bridge Inki Dae
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='CAAQKjZPNh=r5xf7X_R58VhuKz61vVGO83Oe9KsA1m_nJ1OuMLA@mail.gmail.com' \
--to=daeinki@gmail.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=alim.akhtar@samsung.com \
--cc=andrzej.hajda@intel.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jagan@amarulasolutions.com \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=kauschluss@disroot.org \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.org \
--cc=robh@kernel.org \
--cc=simona@ffwll.ch \
--cc=sw0312.kim@samsung.com \
--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).