All of lore.kernel.org
 help / color / mirror / Atom feed
From: shawnguo@kernel.org (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 3/3] drm: zte: add overlay plane support
Date: Tue, 10 Jan 2017 09:17:56 +0800	[thread overview]
Message-ID: <20170110011754.GO20956@dragon> (raw)
In-Reply-To: <CAOw6vbLrHuEa_L9uW6X-_ZMkfXyGjaFACFoedVYN1epeMW+9=w@mail.gmail.com>

Hi Sean,

On Mon, Jan 09, 2017 at 11:27:44AM -0500, Sean Paul wrote:
> > +static inline void zx_osd_int_update(struct zx_crtc *zcrtc)
> > +{
> > +       struct zx_vou_hw *vou = zcrtc->vou;
> > +       int i;
> > +
> > +       vou_chn_set_update(zcrtc);
> > +       zx_plane_set_update(zcrtc->primary);
> > +
> > +       for (i = 0; i < VL_NUM; i++) {
> > +               struct drm_plane *overlay = vou->overlays[i];
> > +
> > +               if (overlay)
> > +                       zx_plane_set_update(overlay);
> > +       }
> 
> Hi Shawn,
> Thanks so much for revving this patch, it's looking really good. I
> just have one (1.5, really) suggestion.
> 
> I don't think we need to keep vou->overlays around. You should be able
> to loop through all the planes registered with drm core and use
> crtc->state->plane_mask to determine which are active for a given crtc
> (this would also encapsulate the zcrtc->primary update above).
> 
> I think you can also use if (plane->state->crtc) as your
> enable/disable check in zx_plane_set_update() and eliminate the new
> enabled flag.

Great.  Since I'm still quite new to DRM subsystem, such core
infrastructural usage guide are really helpful for me.  I tested the
changes as you suggested, and they worked just fine.  So happy to see my
code gets cleaned up further.

> I fully realize this was my suggestion, and I apologize
> for the churn. I'll try not to do reviews past midnight again :-)

I'm so grateful to you for helping review my code, especially in
midnight time :)

Shawn

WARNING: multiple messages have this Message-ID (diff)
From: Shawn Guo <shawnguo@kernel.org>
To: Sean Paul <seanpaul@chromium.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Baoyou Xie <xie.baoyou@zte.com.cn>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Linux ARM Kernel <linux-arm-kernel@lists.infradead.org>,
	Jun Nie <jun.nie@linaro.org>
Subject: Re: [PATCH v4 3/3] drm: zte: add overlay plane support
Date: Tue, 10 Jan 2017 09:17:56 +0800	[thread overview]
Message-ID: <20170110011754.GO20956@dragon> (raw)
In-Reply-To: <CAOw6vbLrHuEa_L9uW6X-_ZMkfXyGjaFACFoedVYN1epeMW+9=w@mail.gmail.com>

Hi Sean,

On Mon, Jan 09, 2017 at 11:27:44AM -0500, Sean Paul wrote:
> > +static inline void zx_osd_int_update(struct zx_crtc *zcrtc)
> > +{
> > +       struct zx_vou_hw *vou = zcrtc->vou;
> > +       int i;
> > +
> > +       vou_chn_set_update(zcrtc);
> > +       zx_plane_set_update(zcrtc->primary);
> > +
> > +       for (i = 0; i < VL_NUM; i++) {
> > +               struct drm_plane *overlay = vou->overlays[i];
> > +
> > +               if (overlay)
> > +                       zx_plane_set_update(overlay);
> > +       }
> 
> Hi Shawn,
> Thanks so much for revving this patch, it's looking really good. I
> just have one (1.5, really) suggestion.
> 
> I don't think we need to keep vou->overlays around. You should be able
> to loop through all the planes registered with drm core and use
> crtc->state->plane_mask to determine which are active for a given crtc
> (this would also encapsulate the zcrtc->primary update above).
> 
> I think you can also use if (plane->state->crtc) as your
> enable/disable check in zx_plane_set_update() and eliminate the new
> enabled flag.

Great.  Since I'm still quite new to DRM subsystem, such core
infrastructural usage guide are really helpful for me.  I tested the
changes as you suggested, and they worked just fine.  So happy to see my
code gets cleaned up further.

> I fully realize this was my suggestion, and I apologize
> for the churn. I'll try not to do reviews past midnight again :-)

I'm so grateful to you for helping review my code, especially in
midnight time :)

Shawn
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-01-10  1:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-09 14:35 [PATCH v4 0/3] Add overlay plane support for ZTE drm driver Shawn Guo
2017-01-09 14:35 ` Shawn Guo
2017-01-09 14:35 ` [PATCH v4 1/3] drm: zte: make zx_plane accessible from zx_vou driver Shawn Guo
2017-01-09 14:35   ` Shawn Guo
2017-01-09 14:35 ` [PATCH v4 2/3] drm: zte: add .atomic_disable hook to disable graphic layer Shawn Guo
2017-01-09 14:35   ` Shawn Guo
2017-01-09 14:35 ` [PATCH v4 3/3] drm: zte: add overlay plane support Shawn Guo
2017-01-09 14:35   ` Shawn Guo
2017-01-09 16:27   ` Sean Paul
2017-01-09 16:27     ` Sean Paul
2017-01-10  1:17     ` Shawn Guo [this message]
2017-01-10  1:17       ` Shawn Guo

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=20170110011754.GO20956@dragon \
    --to=shawnguo@kernel.org \
    --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 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.