public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: yt.shen@mediatek.com (YT Shen)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC 2/3] drm/mediatek: add support for Mediatek SoC MT2701
Date: Mon, 16 May 2016 19:39:41 +0800	[thread overview]
Message-ID: <1463398781.13038.4.camel@mtksdaap41> (raw)
In-Reply-To: <1463111956.12239.15.camel@mtksdaap41>

Hi CK,
On Fri, 2016-05-13 at 11:59 +0800, CK Hu wrote:
> 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
I'll do this in the next version.  Thanks for the review.

Regards,
yt.shen

  reply	other threads:[~2016-05-16 11:39 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
2016-05-16 11:39     ` YT Shen [this message]
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=1463398781.13038.4.camel@mtksdaap41 \
    --to=yt.shen@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