From: YoungJun Cho <yj44.cho@samsung.com>
To: Daniel Kurtz <djkurtz@chromium.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
devicetree@vger.kernel.org,
linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
Pawel Moll <pawel.moll@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Seung-Woo Kim <sw0312.kim@samsung.com>,
dri-devel <dri-devel@lists.freedesktop.org>,
Andrzej Hajda <a.hajda@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Rob Herring <robh+dt@kernel.org>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Kumar Gala <galak@codeaurora.org>,
Kukjin Kim <kgene.kim@samsung.com>,
s.trumtrar@pengutronix.de
Subject: Re: [PATCH 02/18] drm/exynos: use wait_event_timeout() for safety usage
Date: Wed, 21 May 2014 11:18:41 +0900 [thread overview]
Message-ID: <537C0D01.9030404@samsung.com> (raw)
In-Reply-To: <CAGS+omDx1zLBuE_J9CQW=65WkMKO51eCDzSfjazoQoC15_J=Cg@mail.gmail.com>
Hi Daniel
Thank you for comments.
On 05/20/2014 07:02 PM, Daniel Kurtz wrote:
> On Wed, May 14, 2014 at 2:26 PM, YoungJun Cho <yj44.cho@samsung.com> wrote:
>>
>> There could be the case that the page flip operation isn't finished correctly
>> with some abnormal condition such as panel reset. So this patch replaces
>> wait_event() with wait_event_timeout() to avoid waiting for page flip completion
>> infinitely.
>
>
> This solution looks like we aren't really handling some conditions
> completely (such as "panel reset"?). In cases where this timeout can
> occur, shouldn't we be clearing pending_flip when we detect that the
> flip will never complete?
>
Nice catch!.
The others except pending_flip issue are done in drm_vblank_off()
instead of exynos_drm_crtc_finish_pageflip() at this case.
I'll do it for this routine and exynos_drm_crtc_page_flip() also.
There is a leak point in exynos_drm_crtc_page_flip() when
exynos_drm_crtc_mode_set_commit() is failed.
Thank you.
Best regards YJ
> -Dan
>
>>
>>
>> Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
>> Acked-by: Inki Dae <inki.dae@samsung.com>
>> Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
>> ---
>> drivers/gpu/drm/exynos/exynos_drm_crtc.c | 5 +++--
>> 1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
>> index 95c9435..485fa26 100644
>> --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
>> +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
>> @@ -69,8 +69,9 @@ static void exynos_drm_crtc_dpms(struct drm_crtc *crtc, int mode)
>>
>> if (mode > DRM_MODE_DPMS_ON) {
>> /* wait for the completion of page flip. */
>> - wait_event(exynos_crtc->pending_flip_queue,
>> - atomic_read(&exynos_crtc->pending_flip) == 0);
>> + wait_event_timeout(exynos_crtc->pending_flip_queue,
>> + !atomic_read(&exynos_crtc->pending_flip),
>> + HZ/20);
>> drm_vblank_off(crtc->dev, exynos_crtc->pipe);
>> }
>>
>> --
>> 1.7.9.5
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
next prev parent reply other threads:[~2014-05-21 2:18 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-14 6:26 [PATCH 00/18] drm/exynos: support MIPI DSI command mode display YoungJun Cho
2014-05-14 6:26 ` [PATCH 01/18] drm/exynos: dsi: move the EoT packets configuration point YoungJun Cho
2014-05-20 9:50 ` Andrzej Hajda
2014-05-14 6:26 ` [PATCH 02/18] drm/exynos: use wait_event_timeout() for safety usage YoungJun Cho
2014-05-20 9:51 ` Andrzej Hajda
2014-05-20 10:02 ` Daniel Kurtz
2014-05-21 2:18 ` YoungJun Cho [this message]
2014-05-14 6:26 ` [PATCH 03/18] ARM: dts: video: add command mode display timing DT bindings YoungJun Cho
2014-05-14 6:26 ` [PATCH 04/18] video: add command mode and command mode display timing YoungJun Cho
2014-05-14 6:26 ` [PATCH 05/18] drm_modes: add command mode helpers YoungJun Cho
2014-05-14 6:26 ` [PATCH 06/18] ARM: dts: sysreg: add exynos5 compatible to DT bindings YoungJun Cho
2014-05-14 6:26 ` [PATCH 07/18] ARM: dts: samsung-fimd: add I80 specific properties YoungJun Cho
2014-05-14 6:26 ` [PATCH 08/18] drm/exynos: add TE handler to support MIPI DSI command mode interface YoungJun Cho
2014-05-14 6:26 ` [PATCH 09/18] drm/exynos: dsi: add TE handler to support " YoungJun Cho
2014-05-14 6:26 ` [PATCH 10/18] drm/exynos: fimd: support I80 interface YoungJun Cho
2014-05-14 6:26 ` [PATCH 11/18] ARM: dts: exynos_dsim: add exynos5420 compatible to DT bindings YoungJun Cho
2014-05-14 6:26 ` [PATCH 12/18] drm/exynos: dsi: add driver data to support Exynos5420 YoungJun Cho
2014-05-14 6:27 ` [PATCH 13/18] ARM: dts: s6e3fa0: add DT bindings YoungJun Cho
2014-05-14 6:27 ` [PATCH 14/18] drm/panel: add S6E3FA0 driver YoungJun Cho
2014-05-20 10:18 ` Andrzej Hajda
2014-05-14 6:27 ` [PATCH 15/18] ARM: dts: exynos4: add system register node YoungJun Cho
2014-05-14 6:27 ` [PATCH 16/18] ARM: dts: exynos5: add system register support YoungJun Cho
2014-05-14 6:27 ` [PATCH 17/18] ARM: dts: exynos5420: add mipi-phy node YoungJun Cho
2014-05-14 6:27 ` [PATCH 18/18] ARM: dts: exynos5420: add dsi node YoungJun Cho
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=537C0D01.9030404@samsung.com \
--to=yj44.cho@samsung.com \
--cc=a.hajda@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=djkurtz@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=kgene.kim@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=s.trumtrar@pengutronix.de \
--cc=sw0312.kim@samsung.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.