From: Matthias Brugger <mbrugger@suse.com>
To: CK Hu <ck.hu@mediatek.com>,
Enric Balletbo i Serra <enric.balletbo@collabora.com>,
Lee Jones <lee.jones@linaro.org>
Cc: robh+dt@kernel.org, mark.rutland@arm.com, p.zabel@pengutronix.de,
airlied@linux.ie, mturquette@baylibre.com, sboyd@kernel.org,
ulrich.hecht+renesas@gmail.com,
laurent.pinchart@ideasonboard.com,
Mauro Carvalho Chehab <mchehab@kernel.org>,
rdunlap@infradead.org, dri-devel@lists.freedesktop.org,
Weiyi Lu <weiyi.lu@mediatek.com>,
Seiya Wang <seiya.wang@mediatek.com>,
linux-clk@vger.kernel.org,
Collabora Kernel ML <kernel@collabora.com>,
mtk01761 <wendell.lin@mediatek.com>,
Allison Randal <allison@lohutok.net>,
Thomas Gleixner <tglx@linutronix.de>,
wens@csie.org, Kate Stewart <kstewart@linuxfoundation.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Houlong Wei <houlong.wei@mediatek.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
linux-media@vger.kernel.org, devicetree@vger.kernel.org,
sean.wang@mediatek.com, frank-w@public-files.de,
Minghsiu Tsai <minghsiu.tsai@mediatek.com>,
Andrew-CT Chen <andrew-ct.chen@mediatek.com>,
linux-mediatek@lists.infradead.org, hsinyi@chromium.org,
linux-arm-kernel@lists.infradead.org,
Richard Fontana <rfontana@redhat.com>,
linux-kernel@vger.kernel.org, matthias.bgg@kernel.org,
Daniel Vetter <daniel@ffwll.ch>,
Fabien Parent <fparent@baylibre.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
Nicolas Boichat <drinkcat@chromium.org>,
Owen Chen <owen.chen@mediatek.com>
Subject: Re: [PATCH v8 0/6] arm/arm64: mediatek: Fix mmsys device probing
Date: Fri, 21 Feb 2020 11:20:20 +0100 [thread overview]
Message-ID: <6c453dff-8de5-5de3-3ea7-34b691abea25@suse.com> (raw)
In-Reply-To: <1582259996.1846.7.camel@mtksdaap41>
Adding Lee Jones.
On 21/02/2020 05:39, CK Hu wrote:
> Hi, Enric:
>
> On Thu, 2020-02-20 at 18:21 +0100, Enric Balletbo i Serra wrote:
>> Dear all,
>>
>> Those patches are intended to solve an old standing issue on some
>> Mediatek devices (mt8173, mt2701 and mt2712) in a slightly different way
>> to the precedent series.
>>
>> Up to now both drivers, clock and drm are probed with the same device tree
>> compatible. But only the first driver get probed, which in effect breaks
>> graphics on those devices.
>>
>> The version eight of the series tries to solve the problem with a
>> different approach than the previous series but similar to how is solved
>> on other Mediatek devices.
>>
>> The MMSYS (Multimedia subsystem) in Mediatek SoCs has some registers to
>> control clock gates (which is used in the clk driver) and some registers
>> to set the routing and enable the differnet blocks of the display
>> and MDP (Media Data Path) subsystem. On this series the clk driver is
>> not a pure clock controller but a system controller that can provide
>> access to the shared registers between the different drivers that need
>> it (mediatek-drm and mediatek-mdp). And the biggest change is, that in
>> this version, clk driver is the entry point (parent) which will trigger
>> the probe of the corresponding mediatek-drm driver and pass its MMSYS
>> platform data for display configuration.
>
> When mmsys is a system controller, I prefer to place mmsys in
> drivers/soc/mediatek, and it share registers for clock, display, and mdp
> driver. This means the probe function is placed in
> drivers/soc/mediatek ,its display clock function, mdp clock function are
> placed in drivers/clk, display routing are placed in drivers/gpu/drm,
> and mdp routing are placed in dirvers/video.
>
Which sounds to me like a mfd device. Something we already tried and got a
NACKed by Lee Jones:
https://patchwork.kernel.org/patch/10367877/
Maybe we understand the problem better now to give more arguments why it makes
sense to create a mfd here?
Regards,
Matthias
> Regards,
> CK
>
>>
>> All this series was tested on the Acer R13 Chromebook only.
>>
>> For reference, here are the links to the old discussions:
>>
>> * v7: https://patchwork.kernel.org/project/linux-mediatek/list/?series=241217
>> * v6: https://patchwork.kernel.org/project/linux-mediatek/list/?series=213219
>> * v5: https://patchwork.kernel.org/project/linux-mediatek/list/?series=44063
>> * v4:
>> * https://patchwork.kernel.org/patch/10530871/
>> * https://patchwork.kernel.org/patch/10530883/
>> * https://patchwork.kernel.org/patch/10530885/
>> * https://patchwork.kernel.org/patch/10530911/
>> * https://patchwork.kernel.org/patch/10530913/
>> * v3:
>> * https://patchwork.kernel.org/patch/10367857/
>> * https://patchwork.kernel.org/patch/10367861/
>> * https://patchwork.kernel.org/patch/10367877/
>> * https://patchwork.kernel.org/patch/10367875/
>> * https://patchwork.kernel.org/patch/10367885/
>> * https://patchwork.kernel.org/patch/10367883/
>> * https://patchwork.kernel.org/patch/10367889/
>> * https://patchwork.kernel.org/patch/10367907/
>> * https://patchwork.kernel.org/patch/10367909/
>> * https://patchwork.kernel.org/patch/10367905/
>> * v2: No relevant discussion, see v3
>> * v1:
>> * https://patchwork.kernel.org/patch/10016497/
>> * https://patchwork.kernel.org/patch/10016499/
>> * https://patchwork.kernel.org/patch/10016505/
>> * https://patchwork.kernel.org/patch/10016507/
>>
>> Best regards,
>> Enric
>>
>> Changes in v8:
>> - Be a builtin_platform_driver like other mediatek mmsys drivers.
>> - New patches introduced in this series.
>>
>> Changes in v7:
>> - Add R-by from CK
>> - Add R-by from CK
>> - Fix check of return value of of_clk_get
>> - Fix identation
>> - Free clk_data->clks as well
>> - Get rid of private data structure
>>
>> Enric Balletbo i Serra (2):
>> drm/mediatek: Move MMSYS configuration to include/linux/platform_data
>> clk/drm: mediatek: Fix mediatek-drm device probing
>>
>> Matthias Brugger (4):
>> drm/mediatek: Use regmap for register access
>> drm/mediatek: Omit warning on probe defers
>> media: mtk-mdp: Check return value of of_clk_get
>> clk: mediatek: mt8173: Switch MMSYS to platform driver
>>
>> drivers/clk/mediatek/Kconfig | 6 +
>> drivers/clk/mediatek/Makefile | 1 +
>> drivers/clk/mediatek/clk-mt2701-mm.c | 30 +++
>> drivers/clk/mediatek/clk-mt2712-mm.c | 44 +++++
>> drivers/clk/mediatek/clk-mt8173-mm.c | 172 ++++++++++++++++++
>> drivers/clk/mediatek/clk-mt8173.c | 104 -----------
>> drivers/gpu/drm/mediatek/mtk_disp_color.c | 5 +-
>> drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 5 +-
>> drivers/gpu/drm/mediatek/mtk_disp_rdma.c | 5 +-
>> drivers/gpu/drm/mediatek/mtk_dpi.c | 12 +-
>> drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 4 +-
>> drivers/gpu/drm/mediatek/mtk_drm_ddp.c | 53 +++---
>> drivers/gpu/drm/mediatek/mtk_drm_ddp.h | 4 +-
>> drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h | 56 +-----
>> drivers/gpu/drm/mediatek/mtk_drm_drv.c | 113 +-----------
>> drivers/gpu/drm/mediatek/mtk_drm_drv.h | 13 +-
>> drivers/gpu/drm/mediatek/mtk_dsi.c | 8 +-
>> drivers/gpu/drm/mediatek/mtk_hdmi.c | 4 +-
>> drivers/media/platform/mtk-mdp/mtk_mdp_comp.c | 6 +
>> include/linux/platform_data/mtk_mmsys.h | 73 ++++++++
>> 20 files changed, 401 insertions(+), 317 deletions(-)
>> create mode 100644 drivers/clk/mediatek/clk-mt8173-mm.c
>> create mode 100644 include/linux/platform_data/mtk_mmsys.h
>>
>
prev parent reply other threads:[~2020-02-21 10:20 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-20 17:21 [PATCH v8 0/6] arm/arm64: mediatek: Fix mmsys device probing Enric Balletbo i Serra
2020-02-20 17:21 ` [PATCH v8 1/6] drm/mediatek: Use regmap for register access Enric Balletbo i Serra
2020-02-20 23:48 ` Randy Dunlap
2020-02-21 7:46 ` Enric Balletbo i Serra
2020-02-20 17:21 ` [PATCH v8 2/6] drm/mediatek: Omit warning on probe defers Enric Balletbo i Serra
2020-02-20 17:21 ` [PATCH v8 3/6] media: mtk-mdp: Check return value of of_clk_get Enric Balletbo i Serra
2020-02-20 17:21 ` [PATCH v8 4/6] clk: mediatek: mt8173: Switch MMSYS to platform driver Enric Balletbo i Serra
2020-02-20 17:21 ` [PATCH v8 5/6] drm/mediatek: Move MMSYS configuration to include/linux/platform_data Enric Balletbo i Serra
2020-02-20 17:21 ` [PATCH v8 6/6] clk/drm: mediatek: Fix mediatek-drm device probing Enric Balletbo i Serra
2020-02-21 5:18 ` CK Hu
2020-02-21 7:51 ` Enric Balletbo i Serra
2020-02-21 4:39 ` [PATCH v8 0/6] arm/arm64: mediatek: Fix mmsys " CK Hu
2020-02-21 8:56 ` Enric Balletbo i Serra
2020-02-21 9:27 ` CK Hu
2020-02-21 10:24 ` Matthias Brugger
2020-02-21 11:11 ` CK Hu
2020-02-21 11:37 ` Enric Balletbo i Serra
2020-02-21 11:53 ` Matthias Brugger
2020-02-21 17:10 ` Enric Balletbo i Serra
2020-02-24 5:52 ` CK Hu
2020-02-25 10:56 ` Enric Balletbo i Serra
2020-02-26 5:32 ` CK Hu
2020-02-26 9:24 ` Enric Balletbo i Serra
2020-02-21 10:20 ` Matthias Brugger [this message]
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=6c453dff-8de5-5de3-3ea7-34b691abea25@suse.com \
--to=mbrugger@suse.com \
--cc=airlied@linux.ie \
--cc=allison@lohutok.net \
--cc=andrew-ct.chen@mediatek.com \
--cc=ck.hu@mediatek.com \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=drinkcat@chromium.org \
--cc=enric.balletbo@collabora.com \
--cc=fparent@baylibre.com \
--cc=frank-w@public-files.de \
--cc=gregkh@linuxfoundation.org \
--cc=houlong.wei@mediatek.com \
--cc=hsinyi@chromium.org \
--cc=kernel@collabora.com \
--cc=krzk@kernel.org \
--cc=kstewart@linuxfoundation.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=matthias.bgg@gmail.com \
--cc=matthias.bgg@kernel.org \
--cc=mchehab@kernel.org \
--cc=minghsiu.tsai@mediatek.com \
--cc=mturquette@baylibre.com \
--cc=owen.chen@mediatek.com \
--cc=p.zabel@pengutronix.de \
--cc=rdunlap@infradead.org \
--cc=rfontana@redhat.com \
--cc=robh+dt@kernel.org \
--cc=sboyd@kernel.org \
--cc=sean.wang@mediatek.com \
--cc=seiya.wang@mediatek.com \
--cc=tglx@linutronix.de \
--cc=ulrich.hecht+renesas@gmail.com \
--cc=weiyi.lu@mediatek.com \
--cc=wendell.lin@mediatek.com \
--cc=wens@csie.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