From: Kaustabh Chakraborty <kauschluss@disroot.org>
To: Inki Dae <daeinki@gmail.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Krzysztof Kozlowski <krzk@kernel.org>,
Alim Akhtar <alim.akhtar@samsung.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Rob Herring <robh@kernel.org>, Conor Dooley <conor@kernel.org>,
Ajay Kumar <ajaykumar.rs@samsung.com>,
Akshu Agrawal <akshua@gmail.com>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v3 2/3] drm/exynos: exynos7_drm_decon: fix call of decon_commit()
Date: Fri, 27 Jun 2025 13:39:33 +0000 [thread overview]
Message-ID: <c4348867644c2e1d0a4fc47f3291855b@disroot.org> (raw)
In-Reply-To: <CAAQKjZM+++P3ozLZZYEusYepamF0qdeuOe+thDb2BevLCsab_Q@mail.gmail.com>
On 2025-06-27 04:06, Inki Dae wrote:
> Hi,
>
> 2025년 6월 27일 (금) 오전 4:21, Kaustabh Chakraborty
> <kauschluss@disroot.org>님이 작성:
>>
>> decon_commit() has a condition guard at the beginning:
>>
>> if (ctx->suspended)
>> return;
>>
>> But, when it is being called from decon_atomic_enable(),
>> ctx->suspended
>> is still set to true, which prevents its execution. decon_commit() is
>> vital for setting up display timing values, without which the display
>> pipeline fails to function properly. Call the function after
>> ctx->suspended is set to false as a fix.
>
> Good observation. However, I think a more generic solution is needed.
>
>>
>> Cc: stable@vger.kernel.org
>> Fixes: 96976c3d9aff ("drm/exynos: Add DECON driver")
>> Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
>> ---
>> drivers/gpu/drm/exynos/exynos7_drm_decon.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/exynos/exynos7_drm_decon.c
>> b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
>> index
>> f91daefa9d2bc5e314c279822047e60ee0d7ca99..43bcbe2e2917df43d7c2d27a9771e892628dd682
>> 100644
>> --- a/drivers/gpu/drm/exynos/exynos7_drm_decon.c
>> +++ b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
>> @@ -583,9 +583,9 @@ static void decon_atomic_enable(struct
>> exynos_drm_crtc *crtc)
>> if (test_and_clear_bit(0, &ctx->irq_flags))
>> decon_enable_vblank(ctx->crtc);
>>
>> - decon_commit(ctx->crtc);
>> -
>> ctx->suspended = false;
>> +
>> + decon_commit(ctx->crtc);
>
> There seem to be three possible solutions:
>
> 1. Remove all code related to ctx->suspended. If the pipeline flow is
> properly managed as in the exynos5433_drm_decon.c module, checking the
> ctx->suspended state may no longer be necessary.
> 2. Remove the ctx->suspended check from decon_commit(). Since the
> runtime PM resume is already called before decon_commit() in
> decon_atomic_enable(), the DECON controller should already be enabled
> at the hardware level, and decon_commit() should work correctly.
> 3. Move the code that updates ctx->suspended from
> decon_atomic_enable() and decon_atomic_disable() to
> exynos7_decon_resume() and exynos7_decon_suspend(), respectively. The
> decon_atomic_enable() function calls pm_runtime_resume_and_get(),
> which ultimately triggers exynos7_decon_resume(). It would be more
> appropriate to set ctx->suspended = false in the
> exynos7_decon_resume() function, as this is the standard place to
> handle hardware state changes and resume actions.
> decon_atomic_enable() is responsible for requesting enablement of the
> DECON controller, but actual hardware state transitions will be
> handled within exynos7_decon_resume() and exynos7_decon_suspend().
>
>
> Unfortunately, I do not have hardware to test this patch myself. Would
> it be possible for you to try one of these approaches and verify the
> behavior?
> Option 1 would be the best solution if feasible.
Yes, it works fine indeed. Thanks!
>
> Thanks,
> Inki Dae
>
>> }
>>
>> static void decon_atomic_disable(struct exynos_drm_crtc *crtc)
>>
>> --
>> 2.49.0
>>
>>
next prev parent reply other threads:[~2025-06-27 13:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-26 19:20 [PATCH v3 0/3] Samsung Exynos 7870 DECON driver support Kaustabh Chakraborty
2025-06-26 19:20 ` [PATCH v3 1/3] dt-bindings: display: samsung,exynos7-decon: add properties for iommus and ports Kaustabh Chakraborty
2025-06-27 5:02 ` Inki Dae
2025-06-27 7:51 ` Krzysztof Kozlowski
2025-06-27 10:15 ` Inki Dae
2025-06-27 7:50 ` Krzysztof Kozlowski
2025-06-27 13:44 ` Kaustabh Chakraborty
2025-06-27 14:44 ` Krzysztof Kozlowski
2025-06-27 15:03 ` Kaustabh Chakraborty
2025-06-30 8:41 ` Krzysztof Kozlowski
2025-07-06 7:33 ` Krzysztof Kozlowski
2025-07-06 16:00 ` Kaustabh Chakraborty
2025-07-07 5:30 ` Krzysztof Kozlowski
2025-06-26 19:20 ` [PATCH v3 2/3] drm/exynos: exynos7_drm_decon: fix call of decon_commit() Kaustabh Chakraborty
2025-06-27 4:06 ` Inki Dae
2025-06-27 13:39 ` Kaustabh Chakraborty [this message]
2025-06-26 19:20 ` [PATCH v3 3/3] drm/exynos: exynos7_drm_decon: add vblank check in IRQ handling Kaustabh Chakraborty
2025-06-27 4:56 ` 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=c4348867644c2e1d0a4fc47f3291855b@disroot.org \
--to=kauschluss@disroot.org \
--cc=airlied@gmail.com \
--cc=ajaykumar.rs@samsung.com \
--cc=akshua@gmail.com \
--cc=alim.akhtar@samsung.com \
--cc=conor+dt@kernel.org \
--cc=conor@kernel.org \
--cc=daeinki@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.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=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=robh@kernel.org \
--cc=simona@ffwll.ch \
--cc=stable@vger.kernel.org \
--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
all inboxes | Powered by JetHome®