From: CK Hu <ck.hu@mediatek.com>
To: Bibby Hsieh <bibby.hsieh@mediatek.com>
Cc: David Airlie <airlied@linux.ie>,
Matthias Brugger <matthias.bgg@gmail.com>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
<dri-devel@lists.freedesktop.org>,
<linux-mediatek@lists.infradead.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
YT Shen <yt.shen@mediatek.com>,
Thierry Reding <thierry.reding@gmail.com>,
<linux-arm-kernel@lists.infradead.org>, <tfiga@chromium.org>,
<drinkcat@chromium.org>, <linux-kernel@vger.kernel.org>,
<srv_heupstream@mediatek.com>,
Yongqiang Niu <yongqiang.niu@mediatek.com>
Subject: Re: [PATCH v1 5/6] drm/mediatek: support CMDQ interface in ddp component
Date: Tue, 3 Dec 2019 11:34:28 +0800 [thread overview]
Message-ID: <1575344068.627.2.camel@mtksdaap41> (raw)
In-Reply-To: <1575341763.19788.3.camel@mtksdaap41>
Hi, Bibby:
On Tue, 2019-12-03 at 10:56 +0800, CK Hu wrote:
> Hi, Bibby:
>
> On Thu, 2019-11-28 at 10:42 +0800, Bibby Hsieh wrote:
> > The CMDQ (Command Queue) in MT8183 is used to help
> > update all relevant display controller registers
> > with critical time limation.
> > This patch add cmdq interface in ddp_comp interface,
> > let all ddp_comp interface can support cpu/cmdq function
> > at the same time.
> >
> > Signed-off-by: YT Shen <yt.shen@mediatek.com>
> > Signed-off-by: CK Hu <ck.hu@mediatek.com>
> > Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> > Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
> > Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com>
> > ---
> > drivers/gpu/drm/mediatek/mtk_disp_color.c | 7 +-
> > drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 65 ++++++-----
> > drivers/gpu/drm/mediatek/mtk_disp_rdma.c | 43 ++++---
> > drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 11 +-
> > drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 120 ++++++++++++++------
> > drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h | 55 ++++++---
> > 6 files changed, 190 insertions(+), 111 deletions(-)
> >
>
[snip]
> > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h
> > index ec55c7488cc3..5b0a3d48dfa6 100644
> > --- a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h
> > +++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h
> > @@ -69,25 +69,30 @@ enum mtk_ddp_comp_id {
> > };
> >
> > struct mtk_ddp_comp;
> > -
> > +struct cmdq_pkt;
> > struct mtk_ddp_comp_funcs {
> > void (*config)(struct mtk_ddp_comp *comp, unsigned int w,
> > - unsigned int h, unsigned int vrefresh, unsigned int bpc);
> > + unsigned int h, unsigned int vrefresh,
> > + unsigned int bpc, struct cmdq_pkt *cmdq_pkt);
> > void (*start)(struct mtk_ddp_comp *comp);
> > void (*stop)(struct mtk_ddp_comp *comp);
> > void (*enable_vblank)(struct mtk_ddp_comp *comp, struct drm_crtc *crtc);
> > void (*disable_vblank)(struct mtk_ddp_comp *comp);
> > unsigned int (*supported_rotations)(struct mtk_ddp_comp *comp);
> > unsigned int (*layer_nr)(struct mtk_ddp_comp *comp);
> > - void (*layer_on)(struct mtk_ddp_comp *comp, unsigned int idx);
> > - void (*layer_off)(struct mtk_ddp_comp *comp, unsigned int idx);
> > + void (*layer_on)(struct mtk_ddp_comp *comp, unsigned int idx,
> > + struct cmdq_pkt *cmdq_pkt);
> > + void (*layer_off)(struct mtk_ddp_comp *comp, unsigned int idx,
> > + struct cmdq_pkt *cmdq_pkt);
layer_on() and layer_off() looks useless, so I would like you just
remove this interface in another patch.
Regards,
CK
> > int (*layer_check)(struct mtk_ddp_comp *comp,
> > unsigned int idx,
> > struct mtk_plane_state *state);
> > void (*layer_config)(struct mtk_ddp_comp *comp, unsigned int idx,
> > - struct mtk_plane_state *state);
> > + struct mtk_plane_state *state,
> > + struct cmdq_pkt *cmdq_pkt);
> > void (*gamma_set)(struct mtk_ddp_comp *comp,
> > - struct drm_crtc_state *state);
> > + struct drm_crtc_state *state,
> > + struct cmdq_pkt *cmdq_pkt);
> > void (*bgclr_in_on)(struct mtk_ddp_comp *comp);
> > void (*bgclr_in_off)(struct mtk_ddp_comp *comp);
> > };
> > @@ -99,14 +104,17 @@ struct mtk_ddp_comp {
> > struct device *dev;
> > enum mtk_ddp_comp_id id;
> > const struct mtk_ddp_comp_funcs *funcs;
> > + resource_size_t regs_pa;
> > + u8 subsys;
> > };
> >
> > static inline void mtk_ddp_comp_config(struct mtk_ddp_comp *comp,
> > unsigned int w, unsigned int h,
> > - unsigned int vrefresh, unsigned int bpc)
> > + unsigned int vrefresh, unsigned int bpc,
> > + struct cmdq_pkt *cmdq_pkt)
> > {
> > if (comp->funcs && comp->funcs->config)
> > - comp->funcs->config(comp, w, h, vrefresh, bpc);
> > + comp->funcs->config(comp, w, h, vrefresh, bpc, cmdq_pkt);
> > }
> >
> > static inline void mtk_ddp_comp_start(struct mtk_ddp_comp *comp)
> > @@ -152,17 +160,19 @@ static inline unsigned int mtk_ddp_comp_layer_nr(struct mtk_ddp_comp *comp)
> > }
> >
> > static inline void mtk_ddp_comp_layer_on(struct mtk_ddp_comp *comp,
> > - unsigned int idx)
> > + unsigned int idx,
> > + struct cmdq_pkt *cmdq_pkt)
> > {
> > if (comp->funcs && comp->funcs->layer_on)
> > - comp->funcs->layer_on(comp, idx);
> > + comp->funcs->layer_on(comp, idx, cmdq_pkt);
> > }
> >
> > static inline void mtk_ddp_comp_layer_off(struct mtk_ddp_comp *comp,
> > - unsigned int idx)
> > + unsigned int idx,
> > + struct cmdq_pkt *cmdq_pkt)
> > {
> > if (comp->funcs && comp->funcs->layer_off)
> > - comp->funcs->layer_off(comp, idx);
> > + comp->funcs->layer_off(comp, idx, cmdq_pkt);
> > }
> >
> > static inline int mtk_ddp_comp_layer_check(struct mtk_ddp_comp *comp,
> > @@ -176,17 +186,19 @@ static inline int mtk_ddp_comp_layer_check(struct mtk_ddp_comp *comp,
> >
> > static inline void mtk_ddp_comp_layer_config(struct mtk_ddp_comp *comp,
> > unsigned int idx,
> > - struct mtk_plane_state *state)
> > + struct mtk_plane_state *state,
> > + struct cmdq_pkt *cmdq_pkt)
> > {
> > if (comp->funcs && comp->funcs->layer_config)
> > - comp->funcs->layer_config(comp, idx, state);
> > + comp->funcs->layer_config(comp, idx, state, cmdq_pkt);
> > }
> >
> > static inline void mtk_ddp_gamma_set(struct mtk_ddp_comp *comp,
> > - struct drm_crtc_state *state)
> > + struct drm_crtc_state *state,
> > + struct cmdq_pkt *cmdq_pkt)
> > {
> > if (comp->funcs && comp->funcs->gamma_set)
> > - comp->funcs->gamma_set(comp, state);
> > + comp->funcs->gamma_set(comp, state, cmdq_pkt);
> > }
> >
> > static inline void mtk_ddp_comp_bgclr_in_on(struct mtk_ddp_comp *comp)
> > @@ -209,6 +221,13 @@ int mtk_ddp_comp_init(struct device *dev, struct device_node *comp_node,
> > int mtk_ddp_comp_register(struct drm_device *drm, struct mtk_ddp_comp *comp);
> > void mtk_ddp_comp_unregister(struct drm_device *drm, struct mtk_ddp_comp *comp);
> > void mtk_dither_set(struct mtk_ddp_comp *comp, unsigned int bpc,
> > - unsigned int CFG);
> > -
> > + unsigned int CFG, struct cmdq_pkt *cmdq_pkt);
> > +enum mtk_ddp_comp_type mtk_ddp_comp_get_type(enum mtk_ddp_comp_id comp_id);
> > +void mtk_ddp_write(struct cmdq_pkt *cmdq_pkt, unsigned int value,
> > + struct mtk_ddp_comp *comp, unsigned int offset);
> > +void mtk_ddp_write_relaxed(struct cmdq_pkt *cmdq_pkt, unsigned int value,
> > + struct mtk_ddp_comp *comp, unsigned int offset);
> > +void mtk_ddp_write_mask(struct cmdq_pkt *cmdq_pkt, unsigned int value,
> > + struct mtk_ddp_comp *comp, unsigned int offset,
> > + unsigned int mask);
> > #endif /* MTK_DRM_DDP_COMP_H */
>
next prev parent reply other threads:[~2019-12-03 3:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-28 2:42 [PATCH v1 0/6] drm/mediatek: fix cursor issue and apply CMDQ in Bibby Hsieh
2019-11-28 2:42 ` [PATCH v1 1/6] drm/mediatek: put "event" in critical section Bibby Hsieh
2019-11-28 2:42 ` [PATCH v1 2/6] drm/mediatek: use DRM core's atomic commit helper Bibby Hsieh
2019-12-02 6:07 ` CK Hu
2019-11-28 2:42 ` [PATCH v1 3/6] drm/mediatek: handle events when enabling/disabling crtc Bibby Hsieh
2019-12-02 6:43 ` CK Hu
2019-11-28 2:42 ` [PATCH v1 4/6] drm/mediatek: update cursors by using async atomic update Bibby Hsieh
2019-12-02 9:51 ` CK Hu
2019-11-28 2:42 ` [PATCH v1 5/6] drm/mediatek: support CMDQ interface in ddp component Bibby Hsieh
2019-12-03 2:56 ` CK Hu
2019-12-03 3:34 ` CK Hu [this message]
2019-11-28 2:42 ` [PATCH v1 6/6] drm/mediatek: apply CMDQ control flow Bibby Hsieh
2019-12-03 1:38 ` CK Hu
2019-12-03 5:58 ` Bibby Hsieh
2019-12-03 6:17 ` CK Hu
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=1575344068.627.2.camel@mtksdaap41 \
--to=ck.hu@mediatek.com \
--cc=airlied@linux.ie \
--cc=bibby.hsieh@mediatek.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=drinkcat@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=p.zabel@pengutronix.de \
--cc=srv_heupstream@mediatek.com \
--cc=tfiga@chromium.org \
--cc=thierry.reding@gmail.com \
--cc=yongqiang.niu@mediatek.com \
--cc=yt.shen@mediatek.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).