From: ck.hu@mediatek.com (CK Hu)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC 2/3] drm/mediatek: add support for Mediatek SoC MT2701
Date: Fri, 13 May 2016 11:59:16 +0800 [thread overview]
Message-ID: <1463111956.12239.15.camel@mtksdaap41> (raw)
In-Reply-To: <1463053795-55455-3-git-send-email-yt.shen@mediatek.com>
Hi, YT:
On Thu, 2016-05-12 at 19:49 +0800, yt.shen at mediatek.com wrote:
> From: YT Shen <yt.shen@mediatek.com>
>
> This patch add support for the Mediatek MT2701 DISP subsystem.
> There is only one OVL engine in MT2701, and we have shadow
> register support here.
>
> Signed-off-by: YT Shen <yt.shen@mediatek.com>
> ---
> @@ -385,12 +422,16 @@ static void mtk_drm_crtc_atomic_begin(struct drm_crtc *crtc,
> mtk_crtc->event = state->base.event;
> state->base.event = NULL;
> }
> +
> + if (priv->data->shadow_register)
> + mtk_disp_mutex_acquire(mtk_crtc->mutex);
> }
>
> @@ -409,6 +450,11 @@ static void mtk_drm_crtc_atomic_flush(struct drm_crtc *crtc,
> }
> if (pending_planes)
> mtk_crtc->pending_planes = true;
> +
> + if (priv->data->shadow_register) {
> + mtk_crtc_ddp_config(crtc);
> + mtk_disp_mutex_release(mtk_crtc->mutex);
> + }
> }
>
I think it's better to call mtk_disp_mutex_acquire() and
mtk_disp_mutex_release() as near as possible to prevent mutex locked for
a long time. All HW register access of this atomic setting is in
mtk_crtc_ddp_config(), so it's better to move mtk_disp_mutex_acquire()
just before mtk_crtc_ddp_config().
Regards,
CK
next prev parent reply other threads:[~2016-05-13 3:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-12 11:49 [RFC 0/3] MT2701 DRM support yt.shen at mediatek.com
2016-05-12 11:49 ` [RFC 1/3] dt-bindings: drm/mediatek: Add display binding for Mediatek SoC MT2701 yt.shen at mediatek.com
2016-05-12 14:59 ` Yingjoe Chen
2016-05-16 10:27 ` YT Shen
2016-05-12 11:49 ` [RFC 2/3] drm/mediatek: add support " yt.shen at mediatek.com
2016-05-13 3:59 ` CK Hu [this message]
2016-05-16 11:39 ` YT Shen
2016-05-17 9:55 ` Emil Velikov
2016-05-18 8:33 ` YT Shen
2016-05-18 20:26 ` Emil Velikov
2016-05-12 11:49 ` [RFC 3/3] arm: dts: mt2701: Add display subsystem related nodes for MT2701 yt.shen at mediatek.com
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=1463111956.12239.15.camel@mtksdaap41 \
--to=ck.hu@mediatek.com \
--cc=linux-arm-kernel@lists.infradead.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