* wait_event_timeout() usage in decon_wait_for_vblank()
@ 2025-01-31 16:55 Bjorn Helgaas
2025-02-02 4:02 ` Inki Dae
0 siblings, 1 reply; 3+ messages in thread
From: Bjorn Helgaas @ 2025-01-31 16:55 UTC (permalink / raw)
To: Inki Dae, Seung-Woo Kim, Kyungmin Park
Cc: Krzysztof Kozlowski, Alim Akhtar, dri-devel, linux-arm-kernel,
linux-samsung-soc, linux-kernel
I don't know this code at all, so this is likely just noise, but the
wait_event_timeout() usage in decon_wait_for_vblank() looks funny to
me.
decon_wait_for_vblank() waits on wait_vsync_queue for wait_vsync_event
to be cleared.
But decon_irq_handler() only clears wait_vsync_event and wakes up
wait_vsync_queue when !ctx->i80_if.
I don't see any i80_if connection in decon_wait_for_vblank(). Does
the wait always time out if i80_if is set? Is there some reason we
don't use decon_wait_for_vblank() at all if i80_if is set?
Bjorn
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: wait_event_timeout() usage in decon_wait_for_vblank()
2025-01-31 16:55 wait_event_timeout() usage in decon_wait_for_vblank() Bjorn Helgaas
@ 2025-02-02 4:02 ` Inki Dae
2025-02-03 15:59 ` Bjorn Helgaas
0 siblings, 1 reply; 3+ messages in thread
From: Inki Dae @ 2025-02-02 4:02 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Seung-Woo Kim, Kyungmin Park, Krzysztof Kozlowski, Alim Akhtar,
dri-devel, linux-arm-kernel, linux-samsung-soc, linux-kernel
Hi,
2025년 2월 1일 (토) 오전 1:56, Bjorn Helgaas <helgaas@kernel.org>님이 작성:
>
> I don't know this code at all, so this is likely just noise, but the
> wait_event_timeout() usage in decon_wait_for_vblank() looks funny to
> me.
>
> decon_wait_for_vblank() waits on wait_vsync_queue for wait_vsync_event
> to be cleared.
>
> But decon_irq_handler() only clears wait_vsync_event and wakes up
> wait_vsync_queue when !ctx->i80_if.
>
> I don't see any i80_if connection in decon_wait_for_vblank(). Does
> the wait always time out if i80_if is set? Is there some reason we
> don't use decon_wait_for_vblank() at all if i80_if is set?
>
For the decon series, the implementation for the i80 interface has not
yet been completed. If you would like to see how the i80 interface is
handled in Exynos, please refer to the code for the legacy display
controller module, exynos_drm_fimd.c, available at the following link:
https://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git/tree/drivers/gpu/drm/exynos/exynos_drm_fimd.c?h=exynos-drm-fixes#n1053
Furthermore, please note that within the decon driver, prior to
creating the CRTC, it is necessary to implement the TE handler for the
i80 interface in the te_handler of exynos_drm_crtc_ops and register it
as a callback.
Thanks,
Inki Dae
> Bjorn
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: wait_event_timeout() usage in decon_wait_for_vblank()
2025-02-02 4:02 ` Inki Dae
@ 2025-02-03 15:59 ` Bjorn Helgaas
0 siblings, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2025-02-03 15:59 UTC (permalink / raw)
To: Inki Dae
Cc: Seung-Woo Kim, Kyungmin Park, Krzysztof Kozlowski, Alim Akhtar,
dri-devel, linux-arm-kernel, linux-samsung-soc, linux-kernel
On Sun, Feb 02, 2025 at 01:02:47PM +0900, Inki Dae wrote:
> 2025년 2월 1일 (토) 오전 1:56, Bjorn Helgaas <helgaas@kernel.org>님이 작성:
> >
> > I don't know this code at all, so this is likely just noise, but the
> > wait_event_timeout() usage in decon_wait_for_vblank() looks funny to
> > me.
> >
> > decon_wait_for_vblank() waits on wait_vsync_queue for wait_vsync_event
> > to be cleared.
> >
> > But decon_irq_handler() only clears wait_vsync_event and wakes up
> > wait_vsync_queue when !ctx->i80_if.
> >
> > I don't see any i80_if connection in decon_wait_for_vblank(). Does
> > the wait always time out if i80_if is set? Is there some reason we
> > don't use decon_wait_for_vblank() at all if i80_if is set?
>
> For the decon series, the implementation for the i80 interface has not
> yet been completed. If you would like to see how the i80 interface is
> handled in Exynos, please refer to the code for the legacy display
> controller module, exynos_drm_fimd.c, available at the following link:
> https://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git/tree/drivers/gpu/drm/exynos/exynos_drm_fimd.c?h=exynos-drm-fixes#n1053
>
> Furthermore, please note that within the decon driver, prior to
> creating the CRTC, it is necessary to implement the TE handler for the
> i80 interface in the te_handler of exynos_drm_crtc_ops and register it
> as a callback.
I'll take your word for it that this all works as intended. For many
wait_event_timeout() callers, the connection between kicking off some
operation, waiting for completion, and doing the wakeup is a little
bit obscure and hard to analyze without deep knowledge of the driver.
This was just one instance of those.
Bjorn
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-02-03 16:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-31 16:55 wait_event_timeout() usage in decon_wait_for_vblank() Bjorn Helgaas
2025-02-02 4:02 ` Inki Dae
2025-02-03 15:59 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox