From: Daniel Kurtz <djkurtz@chromium.org>
To: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Mark Rutland <mark.rutland@arm.com>,
"open list:OPEN FIRMWARE AND..." <devicetree@vger.kernel.org>,
Paul Bolle <pebolle@tiscali.nl>,
Jitao Shi <jitao.shi@mediatek.com>,
Pawel Moll <pawel.moll@arm.com>, Jie Qiu <jie.qiu@mediatek.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Cawa Cheng <cawa.cheng@mediatek.com>,
dri-devel <dri-devel@lists.freedesktop.org>,
Tomasz Figa <tfiga@chromium.org>,
Rob Herring <robh+dt@kernel.org>,
linux-mediatek@lists.infradead.org,
Kumar Gala <galak@codeaurora.org>, YT Shen <yt.shen@mediatek.com>,
Sasha Hauer <kernel@pengutronix.de>,
Matthias Brugger <matthias.bgg@gmail.com>
Subject: Re: [PATCH v7 02/14] drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.
Date: Thu, 17 Dec 2015 00:10:04 +0800 [thread overview]
Message-ID: <CAGS+omCFYc2B+8bWy8kT-j2LzieYnPErP+xp7qyB81aGObHUGw@mail.gmail.com> (raw)
In-Reply-To: <1450259579.3421.17.camel@pengutronix.de>
Hi Philipp,
On Wed, Dec 16, 2015 at 5:52 PM, Philipp Zabel <p.zabel@pengutronix.de> wrote:
> Hi Daniel,
>
> Am Dienstag, den 15.12.2015, 02:57 +0800 schrieb Daniel Kurtz:
>> HI Philipp,
>>
>> This driver is looking really good.
>>
>> But, still some things to think about (mostly small) inline below...
>
> Most of my answers below seem to be "ok" or some form thereof, but I
> have one or two questions regarding the layer_config and crtc_reset
> suggestions.
Answers to your questions below...
>
> [...]
>> > +static void mtk_ovl_layer_config(void __iomem *ovl_base, unsigned int idx,
>> > + struct mtk_plane_state *state)
>> > +{
>> > + struct mtk_plane_pending_state *pending = &state->pending;
>> > + unsigned int addr = pending->addr;
>> > + unsigned int pitch = pending->pitch & 0xffff;
>> > + unsigned int fmt = pending->format;
>> > + unsigned int offset = (pending->y << 16) | pending->x;
>> > + unsigned int src_size = (pending->height << 16) | pending->width;
>> > + unsigned int con;
>> > +
>> > + con = has_rb_swapped(fmt) << 24 | ovl_fmt_convert(fmt) << 12;
>>
>> Call these conversion routines earlier (during atomic_check) and just add the
>> resulting "con" value to pending.
>
> You mean to add a .layer_atomic_check callback to the mtk_ddp_comp ops?
I didn't have any particular implementation in mind.
But, yeah... maybe a new "check" callback to pre-compute and formally
check the provided state.
This might be overkill though if it ends up adding a lot of overhead
for these values which can never really fail anyway.
> [...]
> How about this:
>
> static void mtk_drm_crtc_reset(struct drm_crtc *crtc)
> {
> struct mtk_crtc_state *state;
>
> if (crtc->state) {
> if (crtc->state->mode_blob)
> drm_property_unreference_blob(crtc->state->mode_blob);
>
> state = to_mtk_crtc_state(crtc->state);
> memset(state, 0, sizeof(*state));
> } else {
> state = kzalloc(sizeof(*state), GFP_KERNEL);
> if (!state)
> return;
> crtc->state = &state->base;
> }
>
> state->base.crtc = crtc;
> }
lgtm
> [...]
> Thanks for the review!
Thanks for the patches!!
>
> regards
> Philipp
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-12-16 16:10 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-30 21:07 [PATCH v7 00/14] MT8173 DRM support Philipp Zabel
2015-11-30 21:07 ` [PATCH v7 01/14] dt-bindings: drm/mediatek: Add Mediatek display subsystem dts binding Philipp Zabel
2015-11-30 21:07 ` [PATCH v7 02/14] drm/mediatek: Add DRM Driver for Mediatek SoC MT8173 Philipp Zabel
[not found] ` <1448917676-25584-3-git-send-email-p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-12-11 17:10 ` Matthias Brugger
[not found] ` <566B0378.7050809-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-12-11 17:23 ` Philipp Zabel
2015-12-14 18:57 ` Daniel Kurtz
[not found] ` <CAGS+omCeJU77tkjf4YGPiH9SZDo7aA4Cpbgih8RvvtSJVEKrnQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-12-16 9:52 ` Philipp Zabel
2015-12-16 16:10 ` Daniel Kurtz [this message]
2015-11-30 21:07 ` [PATCH v7 03/14] drm/mediatek: Add DSI sub driver Philipp Zabel
2015-11-30 21:07 ` [PATCH v7 04/14] drm/mediatek: Add DPI " Philipp Zabel
2015-11-30 21:07 ` [PATCH v7 05/14] dt-bindings: drm/mediatek: Add Mediatek HDMI dts binding Philipp Zabel
2015-11-30 21:07 ` [PATCH v7 06/14] drm/mediatek: Add HDMI support Philipp Zabel
[not found] ` <1448917676-25584-7-git-send-email-p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-12-29 8:49 ` Yingjoe Chen
2016-01-04 19:23 ` Philipp Zabel
2015-11-30 21:07 ` [PATCH v7 07/14] drm/mediatek: enable hdmi output control bit Philipp Zabel
2015-11-30 21:07 ` [PATCH v7 08/14] arm64: dts: mt8173: Add display subsystem related nodes Philipp Zabel
2015-11-30 21:07 ` [PATCH v7 09/14] arm64: dts: mt8173: Add HDMI " Philipp Zabel
2015-11-30 21:07 ` [PATCH v7 10/14] clk: mediatek: make dpi0_sel and hdmi_sel not propagate rate changes Philipp Zabel
2015-11-30 21:07 ` [PATCH v7 11/14] clk: mediatek: Add hdmi_ref HDMI PHY PLL reference clock output Philipp Zabel
2015-11-30 21:07 ` [PATCH v7 12/14] dt-bindings: hdmi-connector: add DDC I2C bus phandle documentation Philipp Zabel
2015-11-30 21:07 ` [PATCH v7 13/14] drm/atomic-helper: Export drm_atomic_helper_wait_for_fences Philipp Zabel
[not found] ` <1448917676-25584-1-git-send-email-p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-11-30 21:07 ` [PATCH v7 14/14] drm/mediatek: Add fence control, wait on GPU fence Philipp Zabel
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=CAGS+omCFYc2B+8bWy8kT-j2LzieYnPErP+xp7qyB81aGObHUGw@mail.gmail.com \
--to=djkurtz@chromium.org \
--cc=cawa.cheng@mediatek.com \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jie.qiu@mediatek.com \
--cc=jitao.shi@mediatek.com \
--cc=kernel@pengutronix.de \
--cc=linux-mediatek@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=matthias.bgg@gmail.com \
--cc=p.zabel@pengutronix.de \
--cc=pawel.moll@arm.com \
--cc=pebolle@tiscali.nl \
--cc=robh+dt@kernel.org \
--cc=tfiga@chromium.org \
--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).