Re: [PATCH] drm/mediatek: Remove debug messages for function calls

2020-02-26 Thread CK Hu
Hi, Enric: On Wed, 2020-02-26 at 12:27 +0100, Enric Balletbo i Serra wrote: > Equivalent information can be nowadays obtained using function tracer. > Reviewed-by: CK Hu > Signed-off-by: Enric Balletbo i Serra > --- > > drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 5 -

Re: [PATCH v9 0/4] arm64: mediatek: Fix mt8173 mmsys device probing

2020-02-26 Thread CK Hu
Hi, Enric: I would like you to modify mmsys binding document. In current document, mmsys is a clock controller, but I think it's a system controller including clock control, routing control, and miscellaneous control in mmsys partition. Regards, CK On Wed, 2020-02-26 at 11:54 +0100, Enric Ballet

Re: [PATCH v9 4/4] drm/mediatek: Fix mediatek-drm device probing

2020-02-26 Thread CK Hu
we can consider that the mmsys driver is the top-level > entry point for the multimedia subsystem, so is not a pure clock > controller but a system controller, and the drm driver is instantiated > by that MMSYS driver. > Reviewed-by: CK Hu > Signed-off-by: Enric Balletbo i Serra

Re: [PATCH v9 3/4] soc: mediatek: Move mt8173 MMSYS to platform driver

2020-02-26 Thread CK Hu
ediatek-drm and the mediatek-mdp > driver. So move to drivers/soc/mediatek as a platform driver. > Reviewed-by: CK Hu > Signed-off-by: Matthias Brugger > Signed-off-by: Enric Balletbo i Serra > --- > > Changes in v9: > - Move mmsys to drivers/soc/med

Re: [PATCH v9 1/4] drm/mediatek: Use regmap for register access

2020-02-26 Thread CK Hu
nk we should also move routing control into mmsys driver and we could drop this patch. Regards, CK > > Signed-off-by: Matthias Brugger > Reviewed-by: Philipp Zabel > Reviewed-by: CK Hu > Signed-off-by: Enric Balletbo i Serra > --- > > Changes in v9: None > Changes

Re: [PATCH v9 5/5] drm/mediatek: set dpi pin mode to gpio low to avoid leakage current

2020-02-26 Thread CK Hu
Hi, Jitao: On Wed, 2020-02-26 at 13:32 +0800, Jitao Shi wrote: > Config dpi pins mode to output and pull low when dpi is disabled. > Aovid leakage current from some dpi pins (Hsync Vsync DE ... ). > Reviewed-by: CK Hu > Signed-off-by: Jitao Shi > --- > drivers/gpu/drm/

Re: [PATCH v9 3/5] dt-bindings: display: mediatek: dpi sample data in dual edge support

2020-02-26 Thread CK Hu
Hi, Jitao: On Wed, 2020-02-26 at 13:32 +0800, Jitao Shi wrote: > Add property "pclk-sample" to config the dpi sample on falling (0), > rising (1), both falling and rising (2). > Reviewed-by: CK Hu > Signed-off-by: Jitao Shi > --- > .../devicetree/bindings/displ

Re: [PATCH v8 0/6] arm/arm64: mediatek: Fix mmsys device probing

2020-02-25 Thread CK Hu
Hi, Enric: On Tue, 2020-02-25 at 11:56 +0100, Enric Balletbo i Serra wrote: > > On 24/2/20 6:52, CK Hu wrote: > > > > Hi, > > > > On Fri, 2020-02-21 at 18:10 +0100, Enric Balletbo i Serra wrote: > >> Hi, > >> > >> On 21/2/20 12:53, Matt

Re: [PATCH v8 7/7] drm/mediatek: set dpi pin mode to gpio low to avoid leakage current

2020-02-25 Thread CK Hu
Hi, Jitao: On Tue, 2020-02-25 at 17:40 +0800, Jitao Shi wrote: > Config dpi pins mode to output and pull low when dpi is disabled. > Aovid leakage current from some dpi pins (Hsync Vsync DE ... ). > > Signed-off-by: Jitao Shi > --- > drivers/gpu/drm/mediatek/mtk_dpi.c | 30 +

Re: [PATCH v8 5/7] drm/mediatek: dpi sample mode support

2020-02-25 Thread CK Hu
On Tue, 2020-02-25 at 17:40 +0800, Jitao Shi wrote: > DPI can sample on falling, rising or both edge. > When DPI sample the data both rising and falling edge. > It can reduce half data io pins. > Reviewed-by: CK Hu > Signed-off-by: Jitao Shi > --- > drivers/gpu/drm/me

Re: [PATCH v8 4/7] dt-bindings: display: mediatek: dpi sample data in dual edge support

2020-02-25 Thread CK Hu
Hi, Jitao: On Tue, 2020-02-25 at 17:40 +0800, Jitao Shi wrote: > Add property "pclk-sample" to config the dpi sample on falling (0), > rising (1), both falling and rising (2). > > Signed-off-by: Jitao Shi > --- > .../devicetree/bindings/display/mediatek/mediatek,dpi.txt | 4 > 1 file c

Re: [PATCH v8 3/7] dt-bindings: display: mediatek: control dpi pins mode to avoid leakage

2020-02-25 Thread CK Hu
On Tue, 2020-02-25 at 17:40 +0800, Jitao Shi wrote: > Add property "pinctrl-names" to swap pin mode between gpio and dpi mode. Set > pin mode to gpio oupput-low to avoid leakage current when dpi disable. > Reviewed-by: CK Hu > Signed-off-by: Jitao Shi > --- > ...

Re: [PATCH v8 1/7] dt-bindings: media: add pclk-sample dual edge property

2020-02-25 Thread CK Hu
On Tue, 2020-02-25 at 17:40 +0800, Jitao Shi wrote: > Some chips's sample mode are rising, falling and dual edge (both > falling and rising edge). > Extern the pclk-sample property to support dual edge. > Reviewed-by: CK Hu > Signed-off-by: Jitao Shi > --- > Documen

Re: [PATCH v8 6/7] drm/mediatek: add mt8183 dpi clock factor

2020-02-25 Thread CK Hu
s/commits/mediatek-drm-next-5.7 > Signed-off-by: Jitao Shi > Reviewed-by: CK Hu > --- > drivers/gpu/drm/mediatek/mtk_dpi.c | 18 ++ > 1 file changed, 18 insertions(+) > > diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c > b/drivers/gpu/drm/mediatek/mtk_dpi.c &

Re: [PATCH v8 2/7] dt-bindings: display: mediatek: update dpi supported chips

2020-02-25 Thread CK Hu
On Tue, 2020-02-25 at 11:10 -0600, Rob Herring wrote: > On Tue, 25 Feb 2020 17:40:52 +0800, Jitao Shi wrote: > > Add descriptions about supported chips, including MT2701 & MT8173 & > > mt8183 > > > > Signed-off-by: Jitao Shi > > --- > > .../devicetree/bindings/display/mediatek/mediatek,dpi.txt

Re: [PATCH v7 4/4] drm/mediatek: set dpi pin mode to gpio low to avoid leakage current

2020-02-24 Thread CK Hu
Hi, Jitao: On Tue, 2020-02-25 at 14:46 +0800, Jitao Shi wrote: > Config dpi pins mode to output and pull low when dpi is disabled. > Aovid leakage current from some dpi pins (Hsync Vsync DE ... ). > > Signed-off-by: Jitao Shi > --- > drivers/gpu/drm/mediatek/mtk_dpi.c | 33 +

Re: [PATCH v7 1/4] dt-bindings: display: mediatek: update dpi supported chips

2020-02-24 Thread CK Hu
Hi, Jitao: On Tue, 2020-02-25 at 14:46 +0800, Jitao Shi wrote: > Add decriptions about supported chips, including MT2701 & MT8173 & > mt8183 descriptions > > 1. Add more chips support. ex. MT2701 & MT8173 & MT8183 > 2. Add property "pinctrl-names" to swap pin mode between gpio and dpi mode. >

Re: [PATCH] drm/mediatek: component type MTK_DISP_OVL_2L is not correctly handled

2020-02-24 Thread CK Hu
Hi, Phong: On Thu, 2020-02-20 at 09:36 +0800, CK Hu wrote: > Hi, Phong: > > On Wed, 2020-02-19 at 15:13 +0100, Phong LE wrote: > > The larb device remains NULL if the type is MTK_DISP_OVL_2L. > > A kernel panic is raised when a crtc uses mtk_smi_larb_get or

Re: [PATCH v6 1/4] dt-bindings: display: mediatek: update dpi supported chips

2020-02-24 Thread CK Hu
Hi, Jitao: On Tue, 2020-02-25 at 10:05 +0800, Jitao Shi wrote: > On Mon, 2020-02-24 at 16:46 +0800, CK Hu wrote: > > Hi, Jitao: > > > > On Fri, 2020-02-21 at 19:28 +0800, Jitao Shi wrote: > > > Add decriptions about supported chips, including MT2701 & MT8173

Re: [PATCH v6 1/4] dt-bindings: display: mediatek: update dpi supported chips

2020-02-24 Thread CK Hu
Hi, Jitao: On Fri, 2020-02-21 at 19:28 +0800, Jitao Shi wrote: > Add decriptions about supported chips, including MT2701 & MT8173 & > mt8183 > > 1. Add more chips support. ex. MT2701 & MT8173 & MT8183 > 2. Add property "dpi_pin_mode_swap" and "pinctrl-names" gpio mode dpi mode and >gpio ouppu

Re: [PATCH v6 1/4] dt-bindings: display: mediatek: update dpi supported chips

2020-02-23 Thread CK Hu
Hi, Jitao: On Fri, 2020-02-21 at 19:28 +0800, Jitao Shi wrote: > Add decriptions about supported chips, including MT2701 & MT8173 & > mt8183 > > 1. Add more chips support. ex. MT2701 & MT8173 & MT8183 > 2. Add property "dpi_pin_mode_swap" and "pinctrl-names" gpio mode dpi mode and >gpio ouppu

Re: [PATCH v8 0/6] arm/arm64: mediatek: Fix mmsys device probing

2020-02-23 Thread CK Hu
Hi, On Fri, 2020-02-21 at 18:10 +0100, Enric Balletbo i Serra wrote: > Hi, > > On 21/2/20 12:53, Matthias Brugger wrote: > > > > > > On 21/02/2020 12:37, Enric Balletbo i Serra wrote: > >> Hi CK and Matthias, > >> > >> On 21/2/20 12:1

Re: [PATCH v8 0/6] arm/arm64: mediatek: Fix mmsys device probing

2020-02-21 Thread CK Hu
Hi, Matthias: On Fri, 2020-02-21 at 11:24 +0100, Matthias Brugger wrote: > > On 21/02/2020 10:27, CK Hu wrote: > > Hi, Enric: > > > > On Fri, 2020-02-21 at 09:56 +0100, Enric Balletbo i Serra wrote: > >> Hi CK, > >> > >> Thanks for your q

Re: [PATCH v8 0/6] arm/arm64: mediatek: Fix mmsys device probing

2020-02-21 Thread CK Hu
Hi, Enric: On Fri, 2020-02-21 at 09:56 +0100, Enric Balletbo i Serra wrote: > Hi CK, > > Thanks for your quick answer. > > On 21/2/20 5:39, CK Hu wrote: > > Hi, Enric: > > > > On Thu, 2020-02-20 at 18:21 +0100, Enric Balletbo i Serra wrote: > >> Dear

Re: [PATCH v8 6/6] clk/drm: mediatek: Fix mediatek-drm device probing

2020-02-20 Thread CK Hu
Hi, Enric: On Thu, 2020-02-20 at 18:21 +0100, Enric Balletbo i Serra wrote: > In the actual implementation the same compatible string > "mediatek,-mmsys" is used to bind the clock drivers > (drivers/clk/mediatek) as well as to the gpu driver > (drivers/gpu/drm/mediatek/mtk_drm_drv.c). This ends wi

Re: [PATCH v8 0/6] arm/arm64: mediatek: Fix mmsys device probing

2020-02-20 Thread CK Hu
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 an

Re: [PATCH] drm/mediatek: component type MTK_DISP_OVL_2L is not correctly handled

2020-02-19 Thread CK Hu
Hi, Phong: On Wed, 2020-02-19 at 15:13 +0100, Phong LE wrote: > The larb device remains NULL if the type is MTK_DISP_OVL_2L. > A kernel panic is raised when a crtc uses mtk_smi_larb_get or > mtk_smi_larb_put. > Reviewed-by: CK Hu > Signed-off-by: Phong LE > --- > dri

Re: [PATCH 2/3] drm/mediatek: make sure previous message done or be aborted before send

2020-02-18 Thread CK Hu
Hi, Bibby: On Fri, 2020-02-14 at 14:48 +0800, CK Hu wrote: > Hi, Bibby: > > On Fri, 2020-02-14 at 12:49 +0800, Bibby Hsieh wrote: > > Mediatek CMDQ driver removed atomic parameter and implementation > > related to atomic. DRM driver need to make sure previous message &

Re: [PATCH 2/2] drm/mediatek: move gce event property to mutex device node

2020-02-18 Thread CK Hu
Hi, Bibby: On Wed, 2020-02-12 at 18:44 +0800, CK Hu wrote: > Hi, Bibby: > > On Wed, 2020-02-12 at 17:55 +0800, Bibby Hsieh wrote: > > According mtk hardware design, stream_done0 and stream_done1 are > > generated by mutex, so we move gce event property to mutex device mode.

Re: [PATCH 2/2] drm/mediatek: add fb swap in async_update

2020-02-17 Thread CK Hu
Hi, Bibby: On Thu, 2020-02-13 at 12:06 +0800, CK Hu wrote: > Hi, Bibby: > > On Thu, 2020-02-13 at 09:23 +0800, Bibby Hsieh wrote: > > Besides x, y position, width and height, > > fb also need updating in async update. > > > > Reviewed-by: CK Hu >

Re: [PATCH 1/2] drm/mediatek: add plane check in async_check function

2020-02-17 Thread CK Hu
Hi, Bibby: On Thu, 2020-02-13 at 11:54 +0800, CK Hu wrote: > Hi, Bibby: > > On Thu, 2020-02-13 at 09:23 +0800, Bibby Hsieh wrote: > > MTK do rotation checking and transferring in layer check function, > > but we do not check that in atomic_check, > > so add ba

Re: [PATCH v2 2/2] drm/mediatek: fix race condition for HDMI jack status reporting

2020-02-16 Thread CK Hu
On Mon, 2020-02-17 at 11:55 +0800, Tzung-Bi Shih wrote: > On Mon, Feb 17, 2020 at 11:44 AM CK Hu wrote: > > On Mon, 2020-02-17 at 11:16 +0800, Tzung-Bi Shih wrote: > > > Fixes: 5d3c64477392 ("drm/mediatek: support HDMI jack status reporting") > > > > This

Re: [PATCH v2 2/2] drm/mediatek: fix race condition for HDMI jack status reporting

2020-02-16 Thread CK Hu
Hi, Tzhung-Bi: On Mon, 2020-02-17 at 11:16 +0800, Tzung-Bi Shih wrote: > hdmi_conn_detect and mtk_hdmi_audio_hook_plugged_cb would be called > by different threads. > > Imaging the following calling sequence: >Thread AThread B >

Re: [PATCH v7 01/13] dt-bindings: arm: move mmsys description to display

2020-02-14 Thread CK Hu
Hi, Matthias & Enric: On Fri, 2020-02-14 at 13:19 +0100, Enric Balletbo i Serra wrote: > Hi CK, > > On 14/2/20 11:01, Matthias Brugger wrote: > > > > > > On 14/02/2020 07:42, CK Hu wrote: > >> Hi, Matthias: > >> > >> On Thu, 2020-02-13

Re: [PATCH] drm/mediatek: fix race condition for HDMI jack status reporting

2020-02-14 Thread CK Hu
Hi, Tzung-Bi: On Fri, 2020-02-14 at 15:35 +0800, Tzung-Bi Shih wrote: > On Fri, Feb 14, 2020 at 3:07 PM CK Hu wrote: > > I think sound driver could be removed for some reason, and fn should be > > set to NULL before sound driver removed. In this case, codec_dev != NULL >

Re: [PATCH] drm/mediatek: fix race condition for HDMI jack status reporting

2020-02-13 Thread CK Hu
Hi, Tzung-Bi: On Thu, 2020-02-13 at 15:59 +0800, Tzung-Bi Shih wrote: > hdmi_conn_detect and mtk_hdmi_audio_hook_plugged_cb would be called > by different threads. > > Imaging the following calling sequence: >Thread AThread B > -

Re: [PATCH v7 01/13] dt-bindings: arm: move mmsys description to display

2020-02-13 Thread CK Hu
Hi, Matthias: On Thu, 2020-02-13 at 21:19 +0100, matthias@kernel.org wrote: > From: Matthias Brugger > > The mmsys block provides registers and clocks for the display > subsystem. The binding description should therefore live together with > the rest of the display descriptions. Move it to d

Re: [PATCH 2/3] drm/mediatek: make sure previous message done or be aborted before send

2020-02-13 Thread CK Hu
as been completed. > > So we flush mbox client before we send new message to controller > driver. > Reviewed-by: CK Hu > This patch depends on ptach: > [0/3] Remove atomic_exec > https://patchwork.kernel.org/cover/11381677/ > > Signed-off-by: Bibby Hsieh > --- >

Re: [PATCH v7 11/13] clk: mediatek: mt8183: switch mmsys to platform device probing

2020-02-13 Thread CK Hu
Hi, Matthias: On Thu, 2020-02-13 at 21:19 +0100, matthias@kernel.org wrote: > From: Matthias Brugger > > Switch probing for the MMSYS to support invocation to a > plain paltform device. The driver will be probed by the DRM subsystem. > > Signed-off-by: Matthias Brugger > > --- > > Change

Re: [PATCH 2/2] drm/mediatek: add fb swap in async_update

2020-02-12 Thread CK Hu
Hi, Bibby: On Thu, 2020-02-13 at 09:23 +0800, Bibby Hsieh wrote: > Besides x, y position, width and height, > fb also need updating in async update. > Reviewed-by: CK Hu > Fixes: 920fffcc8912 ("drm/mediatek: update cursors by using async atomic > update") >

Re: [PATCH 1/2] drm/mediatek: add plane check in async_check function

2020-02-12 Thread CK Hu
Hi, Bibby: On Thu, 2020-02-13 at 09:23 +0800, Bibby Hsieh wrote: > MTK do rotation checking and transferring in layer check function, > but we do not check that in atomic_check, > so add back in atomic_check function. > Reviewed-by: CK Hu > Fixes: 920fffcc8912 ("drm/medi

Re: [resend PATCH v6 00/12] arm/arm64: mediatek: Fix mmsys device probing

2020-02-12 Thread CK Hu
put mmsys clock part in dts child node of mmsys. Only done > for HW where no dts backport compatible breakage is expected > (either DRM driver not yet implemented or no HW available to > the public) (patch 9 to 12) > > Changes since v3: > - use platform device to probe clock drive

Re: [PATCH v2 2/3] drm/mediatek: support HDMI jack status reporting

2020-02-12 Thread CK Hu
Hi, Tzung-Bi: On Wed, 2020-02-12 at 19:31 +0800, Tzung-Bi Shih wrote: > On Wed, Feb 12, 2020 at 4:19 PM CK Hu wrote: > > I think hdmi_conn_detect() and mtk_hdmi_audio_hook_plugged_cb() would be > > called in different thread. So it's necessary to use a mutex to protect >

Re: [PATCH 1/2] arm64: dts: mt8183: Add gce setting in display node

2020-02-12 Thread CK Hu
On Wed, 2020-02-12 at 17:55 +0800, Bibby Hsieh wrote: > In order to use GCE function, we need add some information > into display node (mboxes, mediatek,gce-client-reg, mediatek,gce-events). > > Signed-off-by: Bibby Hsieh > Signed-off-by: Yongqiang Niu > --- > arch/arm64/boot/dts/mediatek/mt818

Re: [PATCH 2/2] drm/mediatek: move gce event property to mutex device node

2020-02-12 Thread CK Hu
Hi, Bibby: On Wed, 2020-02-12 at 17:55 +0800, Bibby Hsieh wrote: > According mtk hardware design, stream_done0 and stream_done1 are > generated by mutex, so we move gce event property to mutex device mode. > Reviewed-by: CK Hu > Signed-off-by: Bibby Hsieh > --- > driver

Re: [PATCH v2 2/3] drm/mediatek: support HDMI jack status reporting

2020-02-12 Thread CK Hu
Hi, Tzung-Bi: On Thu, 2020-02-06 at 11:17 +0800, Tzung-Bi Shih wrote: > 1. > Provides a callback (i.e. mtk_hdmi_audio_hook_plugged_cb) to hdmi-codec. > When ASoC machine driver calls hdmi_codec_set_jack_detect(), the > callback will be invoked to save plugged_cb and codec_dev parameters. > > +---

Re: [PATCH] drm/mediatek: Find the cursor plane instead of hard coding it

2020-02-10 Thread CK Hu
On Mon, 2020-02-10 at 09:10 -0500, Sean Paul wrote: > On Sun, Feb 9, 2020 at 9:53 PM CK Hu wrote: > > > > Hi, Evan: > > > > On Fri, 2020-02-07 at 16:34 +0800, CK Hu wrote: > > > Hi, Evan: > > > > > > On Fri, 2020-02-07 at 15:23 +1100, Evan

Re: [PATCH] drm/mediatek: Find the cursor plane instead of hard coding it

2020-02-09 Thread CK Hu
Hi, Evan: On Fri, 2020-02-07 at 16:34 +0800, CK Hu wrote: > Hi, Evan: > > On Fri, 2020-02-07 at 15:23 +1100, Evan Benn wrote: > > The cursor and primary planes were hard coded. > > Now search for them for passing to drm_crtc_init_with_planes > > > > Reviewed-by

Re: [PATCH] drm/mediatek: Ensure the cursor plane is on top of other overlays

2020-02-09 Thread CK Hu
Hi, Sean: On Fri, 2020-01-31 at 11:27 +0800, CK Hu wrote: > Hi, Sean: > > On Thu, 2020-01-30 at 14:24 -0500, Sean Paul wrote: > > From: Sean Paul > > > > Currently the cursor is placed on the first overlay plane, which means > > it will be at the bottom

Re: [PATCH v2 1/3] drm/mediatek: exit earlier if failed to register audio driver

2020-02-07 Thread CK Hu
Hi, Tzung-Bi: On Thu, 2020-02-06 at 11:17 +0800, Tzung-Bi Shih wrote: > Exits earlier if register_audio_driver() returns errors. > Acked-by: CK Hu > Signed-off-by: Tzung-Bi Shih > --- > drivers/gpu/drm/mediatek/mtk_hdmi.c | 11 --- > 1 file changed, 8 insertio

Re: [PATCH] drm/mediatek: Find the cursor plane instead of hard coding it

2020-02-07 Thread CK Hu
Hi, Evan: On Fri, 2020-02-07 at 15:23 +1100, Evan Benn wrote: > The cursor and primary planes were hard coded. > Now search for them for passing to drm_crtc_init_with_planes > Reviewed-by: CK Hu > Signed-off-by: Evan Benn > --- > > drivers/gpu/drm/mediate

Re: [PATCH] drm/mediatek: Ensure the cursor plane is on top of other overlays

2020-02-05 Thread CK Hu
Hi, Evan: It looks like Sean's version has some problem. So this version is Reviewed-by: CK Hu On Thu, 2020-02-06 at 17:59 +1100, evanb...@google.com wrote: > From: Sean Paul > > Currently the cursor is placed on the first overlay plane, which means > it will be at the bo

Re: [PATCH] drm/mediatek: Ensure the cursor plane is on top of other overlays

2020-01-30 Thread CK Hu
doesn't support plane > zpos, change the cursor location to the top-most plane. > Reviewed-by: CK Hu > Signed-off-by: Sean Paul > --- > drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 8 +--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/

[GIT PULL] mediatek drm next for 5.6

2020-01-13 Thread CK Hu
cmdq: add cmdq_dev_get_client_reg function drm/mediatek: support CMDQ interface in ddp component drm/mediatek: apply CMDQ control flow CK Hu (1): Merge tag 'v5.5-next-cmdq-stable' of https://git.kernel.org/.../matthias.bgg/linux Fabien Parent (1): drm/mediatek:

Re: [PATCH] drm/mediatek: check for comp->funcs

2020-01-09 Thread CK Hu
Hi, Hsin-yi: On Thu, 2020-01-09 at 15:29 +0800, Hsin-Yi Wang wrote: > There might be some comp that doesn't have funcs, eg. hdmi-connector. > Check for comp->funcs otherwise there will be NULL pointer dereference > crash. > > Fixes: bd3de8cd782b ("drm/mediatek: Add gamma property according to har

Re: Process identical patches in different tree

2020-01-08 Thread CK Hu
Hi, Matthias: On Wed, 2020-01-08 at 13:05 +0100, Matthias Brugger wrote: > On 08/01/2020 12:14, Matthias Brugger wrote: > > Hi CK, > > > > On 07/01/2020 03:56, CK Hu wrote: > >> Hi, Dave, Daniel, Matthias: > >> > >> In mediatek-drm-next-5.6 [1], I&

Process identical patches in different tree

2020-01-06 Thread CK Hu
Hi, Dave, Daniel, Matthias: In mediatek-drm-next-5.6 [1], I've cherry-pick 3 patches from v5.5-next/soc [2] because some drm patches depend on these cmdq patches. So these cmdq patches exist in both tree now. I want to know how to process this case. I think we could choose one of below way: 1. Be

Re: [PATCH] drm/mediatek: fix indentation

2020-01-05 Thread CK Hu
Hi, Fabien: On Fri, 2020-01-03 at 15:24 +0100, Fabien Parent wrote: > Fix indentation in the Makefile by replacing spaces with tabs. > Applied to mediatek-drm-next-5.6 [1], thanks. [1] https://github.com/ckhu-mediatek/linux.git-tags/commits/mediatek-drm-next-5.6 Regards, cK > Signed-off-by: F

Re: [RESEND PATCH v6 04/17] drm/mediatek: make sout select function format same with select input

2020-01-02 Thread CK Hu
Hi, Yongqiang: On Fri, 2020-01-03 at 11:12 +0800, Yongqiang Niu wrote: > there will be more sout case in the future, > make the sout function format same mtk_ddp_sel_in > Reviewed-by: CK Hu > Signed-off-by: Yongqiang Niu > --- > drivers/gpu/drm/mediatek/

Re: [RESEND PATCH v6 03/17] drm/mediatek: move dsi/dpi select input into mtk_ddp_sel_in

2020-01-02 Thread CK Hu
Hi, Yongqiang: On Fri, 2020-01-03 at 11:12 +0800, Yongqiang Niu wrote: > move dsi/dpi select input into mtk_ddp_sel_in > DPI_SEL_IN_BLS is zero, it is same with hardware default setting, > DISP_REG_CONFIG_DPI_SEL no need set when bls connect with > dpi0 I think you have done two things in this pa

Re: [RESEND PATCH v6 00/17] add drm support for MT8183

2020-01-02 Thread CK Hu
Hi, Yongqiang: This 'RESEND v6' is different with v6, so I think you should call this v7. Regards, CK On Fri, 2020-01-03 at 11:12 +0800, Yongqiang Niu wrote: > This series are based on 5.5-rc1 and provid 17 patch > to support mediatek SOC MT8183 > > Change since v5 > - fix reviewed issue in v5

Re: [RESEND PATCH v6 01/17] dt-bindings: mediatek: add rdma_fifo_size description for mt8183 display

2020-01-02 Thread CK Hu
Hi, Yongqiang: On Fri, 2020-01-03 at 11:12 +0800, Yongqiang Niu wrote: > Update device tree binding documention for rdma_fifo_size > > Signed-off-by: Yongqiang Niu > --- > .../devicetree/bindings/display/mediatek/mediatek,disp.txt | 13 > + > 1 file changed, 13 insertions(+) > >

Re: [PATCH v6, 13/14] drm/mediatek: add fifo_size into rdma private data

2020-01-01 Thread CK Hu
Hi, Yongqiang: On Thu, 2020-01-02 at 13:42 +0800, Yongqiang Niu wrote: > On Thu, 2020-01-02 at 13:20 +0800, CK Hu wrote: > > Hi, Yongqiang: > > > > On Thu, 2020-01-02 at 12:00 +0800, Yongqiang Niu wrote: > > > the fifo size of rdma in mt8183 is different. > >

Re: [PATCH v6, 02/14] drm/mediatek: move dsi/dpi select input into mtk_ddp_sel_in

2020-01-01 Thread CK Hu
Hi, Yongqiang: On Thu, 2020-01-02 at 14:21 +0800, Yongqiang Niu wrote: > On Thu, 2020-01-02 at 14:02 +0800, CK Hu wrote: > > Hi, Yongqiang: > > > > On Thu, 2020-01-02 at 13:39 +0800, Yongqiang Niu wrote: > > > On Thu, 2020-01-02 at 13:03 +0800, CK H

Re: [PATCH v6, 02/14] drm/mediatek: move dsi/dpi select input into mtk_ddp_sel_in

2020-01-01 Thread CK Hu
Hi, Yongqiang: On Thu, 2020-01-02 at 13:39 +0800, Yongqiang Niu wrote: > On Thu, 2020-01-02 at 13:03 +0800, CK Hu wrote: > > Hi, Yongqiang: > > > > On Thu, 2020-01-02 at 12:00 +0800, Yongqiang Niu wrote: > > > move dsi/dpi select input into mtk_ddp_sel_in > &g

Re: [PATCH v6, 14/14] drm/mediatek: add support for mediatek SOC MT8183

2020-01-01 Thread CK Hu
Hi, Yongqiang: On Thu, 2020-01-02 at 12:00 +0800, Yongqiang Niu wrote: > This patch add support for mediatek SOC MT8183 > 1.ovl_2l share driver with ovl > 2.rdma1 share drive with rdma0, but fifo size is different > 3.add mt8183 mutex private data, and mmsys private data > 4.add mt8183 main and ex

Re: [PATCH v6, 04/14] drm/mediatek: add mmsys private data for ddp path config

2020-01-01 Thread CK Hu
Hi, Yongqiang: On Thu, 2020-01-02 at 12:00 +0800, Yongqiang Niu wrote: > This patch add mmsys private data for ddp path config > all these register offset and value will be different in future SOC > add these define into mmsys private data > u32 ovl0_mout_en; > u32 rdma1_sout_sel_in; >

Re: [PATCH v6, 13/14] drm/mediatek: add fifo_size into rdma private data

2020-01-01 Thread CK Hu
Hi, Yongqiang: On Thu, 2020-01-02 at 12:00 +0800, Yongqiang Niu wrote: > the fifo size of rdma in mt8183 is different. > rdma0 fifo size is 5k > rdma1 fifo size is 2k > > Signed-off-by: Yongqiang Niu > --- > drivers/gpu/drm/mediatek/mtk_disp_rdma.c | 21 - > 1 file changed,

Re: [PATCH v6, 02/14] drm/mediatek: move dsi/dpi select input into mtk_ddp_sel_in

2020-01-01 Thread CK Hu
Hi, Yongqiang: On Thu, 2020-01-02 at 12:00 +0800, Yongqiang Niu wrote: > move dsi/dpi select input into mtk_ddp_sel_in > > Signed-off-by: Yongqiang Niu > --- > drivers/gpu/drm/mediatek/mtk_drm_ddp.c | 10 ++ > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu

[GIT PULL] mediatek drm fixes for 5.5

2019-12-30 Thread CK Hu
Hi Dave, Daniel: This include phy timing and plane index fixes. Regards, CK The following changes since commit e42617b825f8073569da76dc4510bfa019b1c35a: Linux 5.5-rc1 (2019-12-08 14:57:55 -0800) are available in the Git repository at: https://github.com/ckhu-mediatek/linux.git-tags.git ta

Re: [PATCH 1/2] Return from mtk_ovl_layer_config after mtk_ovl_layer_off

2019-12-24 Thread CK Hu
> pending state is enabled. For this series, applied to mediatek-drm-next-5.6 [1], thanks. [1] https://github.com/ckhu-mediatek/linux.git-tags/commits/mediatek-drm-next-5.6 Regards, CK > > Suggested-by: Sean Paul > To: CK Hu > To: dri-devel@lists.freedesktop.org > Cc: Dani

Re: [PATCH v2, 0/2] drm/mediatek: Add ctm property support

2019-12-23 Thread CK Hu
Hi, Yongqiang: On Fri, 2019-12-13 at 15:28 +0800, Yongqiang Niu wrote: > Changes since v1: > -separate gamma patch > -remove cmdq support for ctm setting > For this series, applied to mediatek-drm-next-5.6 [1], thanks. [1] https://github.com/ckhu-mediatek/linux.git-tags/commits/mediatek-drm-nex

Re: [PATCH v5 6/7] drm/mediatek: support CMDQ interface in ddp component

2019-12-23 Thread CK Hu
Hi, Hsin-yi: On Fri, 2019-12-20 at 21:27 +0800, Hsin-Yi Wang wrote: > On Tue, Dec 10, 2019 at 5:05 AM Bibby Hsieh wrote: > > > > > +void mtk_ddp_write(struct cmdq_pkt *cmdq_pkt, unsigned int value, > > + struct mtk_ddp_comp *comp, unsigned int offset) > > +{ > > +#if IS_ENABLED(

Re: [PATCH v5 0/7] drm/mediatek: fix cursor issue and apply CMDQ in MTK DRM

2019-12-20 Thread CK Hu
Hi, Bibby: For this series, applied to mediatek-drm-next-5.6 [1], thanks. [1] https://github.com/ckhu-mediatek/linux.git-tags/commits/mediatek-drm-next-5.6 Regards, CK On Tue, 2019-12-10 at 13:05 +0800, Bibby Hsieh wrote: > The CMDQ (Command Queue) in MT8183 is used to help update all > relevan

Re: [PATCH 4/4] drm/mediatek: config mipitx impedance with calibration data

2019-12-19 Thread CK Hu
Hi, Jitao: On Mon, 2019-12-16 at 16:29 +0800, Jitao Shi wrote: > Read calibration data from nvmem, and config mipitx impedance with > calibration data to make sure their impedance are 100ohm. > > Signed-off-by: Jitao Shi > --- > drivers/gpu/drm/mediatek/mtk_mipi_tx.h| 1 + > drivers/gp

Re: [PATCH 1/4] dt-binds: display: mediatek: add property to control mipi tx drive current

2019-12-17 Thread CK Hu
Hi, Jitao: On Mon, 2019-12-16 at 16:29 +0800, Jitao Shi wrote: > Add a property to control mipi tx drive current: > "mipitx-current-drive" > > Signed-off-by: Jitao Shi > --- > .../devicetree/bindings/display/mediatek/mediatek,dsi.txt | 4 > 1 file changed, 4 insertions(+) > > diff --g

Re: [PATCH] drm/mediatek: reduce the hbp and hfp for phy timing

2019-12-16 Thread CK Hu
Hi, On Mon, 2019-12-16 at 11:30 +0100, Enric Balletbo Serra wrote: > Hi all, > > Missatge de Hsin-Yi Wang del dia dl., 16 de des. > 2019 a les 3:42: > > > > On Fri, Dec 13, 2019 at 9:52 AM Jitao Shi wrote: > > > > > > There are some extra data transfer in dsi. > > > ex. LPX, hs_prepare, hs_zero

Re: [PATCH 05/10] drm/mediatek: plane_state->fb iff plane_state->crtc

2019-12-16 Thread CK Hu
Hi, Daniel: On Fri, 2019-12-13 at 18:26 +0100, Daniel Vetter wrote: > Checking both is one too much, so wrap a WARN_ON around it to stope > the copypasta. Even though I don't know what is copypasta, Acked-by: CK Hu > > Signed-off-by: Daniel Vetter > Cc: CK Hu >

Re: [PATCH v2, 2/2] drm/mediatek: Add ctm property support

2019-12-13 Thread CK Hu
Hi, Yongqiang: On Fri, 2019-12-13 at 16:11 +0800, Yongqiang Niu wrote: > On Fri, 2019-12-13 at 15:57 +0800, CK Hu wrote: > > On Fri, 2019-12-13 at 15:28 +0800, Yongqiang Niu wrote: > > > Add ctm property support > > > > > > Signed-off-by: Yongqiang Niu >

Re: [PATCH v2, 1/2] drm/mediatek: Fix gamma correction issue

2019-12-13 Thread CK Hu
Hi, Yongqiang: On Fri, 2019-12-13 at 16:03 +0800, Yongqiang Niu wrote: > On Fri, 2019-12-13 at 15:48 +0800, CK Hu wrote: > > Hi, Yongqiang: > > > > The title is too rough. Any bug of gamma would be this title. I would > > like the title show explicitly what it does.

Re: [PATCH v2, 2/2] drm/mediatek: Add ctm property support

2019-12-13 Thread CK Hu
On Fri, 2019-12-13 at 15:28 +0800, Yongqiang Niu wrote: > Add ctm property support > > Signed-off-by: Yongqiang Niu > --- > drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 10 - > drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 62 > - > drivers/gpu/drm/mediatek/mtk_

Re: [PATCH v2, 0/2] drm/mediatek: Add ctm property support

2019-12-12 Thread CK Hu
Hi, Yongqiang: On Fri, 2019-12-13 at 15:28 +0800, Yongqiang Niu wrote: > Changes since v1: > -separate gamma patch > -remove cmdq support for ctm setting If this series depend on other patch or series, please describe it. Regards, CK > > > Yongqiang Niu (2): > drm/mediatek: Fix gamma correc

Re: [PATCH v2, 1/2] drm/mediatek: Fix gamma correction issue

2019-12-12 Thread CK Hu
Hi, Yongqiang: The title is too rough. Any bug of gamma would be this title. I would like the title show explicitly what it does. On Fri, 2019-12-13 at 15:28 +0800, Yongqiang Niu wrote: > if there is no gamma function in the crtc > display path, don't add gamma property > for crtc > > Signed-off

Re: [PATCH v7 7/9] drm/mediatek: change the dsi phytiming calculate method

2019-12-12 Thread CK Hu
Hi, Ryan: On Thu, 2019-12-12 at 14:47 -0800, Ryan Case wrote: > Hi Enric, > > On Thu, Dec 12, 2019 at 5:53 AM Enric Balletbo Serra > wrote: > > > > Hi, > > > > Missatge de CK Hu del dia dj., 26 de set. 2019 a les > > 10:51: > > > > > &

Re: [PATCH 1/2] Return from mtk_ovl_layer_config after mtk_ovl_layer_off

2019-12-12 Thread CK Hu
Hi, Sean: On Thu, 2019-12-12 at 09:13 -0500, Sean Paul wrote: > On Wed, Dec 11, 2019 at 11:45 PM CK Hu wrote: > > > > Hi, Mark: > > > > On Wed, 2019-12-11 at 10:49 -0500, Mark Yacoub wrote: > > > drm/mediatek: return if plane pending state is disabled. >

Re: [PATCH] drm/mediatek: Fix can't get component for external display plane.

2019-12-11 Thread CK Hu
Hi, Pi-Hsun: On Mon, 2019-12-02 at 13:24 +0800, CK Hu wrote: > Hi, Pi-Hsun: > > > On Wed, 2019-11-27 at 18:04 +0800, Pi-Hsun Shih wrote: > > From: Yongqiang Niu > > > > The original logic is ok for primary display, but will not find out > > component for ex

Re: [PATCH] drm/mediatek: Check return value of mtk_drm_ddp_comp_for_plane.

2019-12-11 Thread CK Hu
Hi, Pi-Hsun: On Fri, 2019-11-22 at 15:58 +0800, CK Hu wrote: > Hi, Pi-Hsun: > > On Mon, 2019-11-18 at 14:18 +0800, Pi-Hsun Shih wrote: > > The mtk_drm_ddp_comp_for_plane can return NULL, but the usage doesn't > > check for it. Add check for it. > > Reviewed-by

Re: [PATCH 1/2] Return from mtk_ovl_layer_config after mtk_ovl_layer_off

2019-12-11 Thread CK Hu
> pending state is enabled. Reviewed-by: CK Hu > > Suggested-by: Sean Paul > To: CK Hu > To: dri-devel@lists.freedesktop.org > Cc: Daniele Castagna > Cc: Philipp Zabel > Cc: David Airlie > Cc: Daniel Vetter > Cc: Matthias Brugger > Cc: linux-

Re: [PATCH 2/2] Turn off Alpha bit when plane format has no alpha

2019-12-11 Thread CK Hu
Hi, Mark: On Wed, 2019-12-11 at 10:49 -0500, Mark Yacoub wrote: > drm/mediatek: Add OVL_CON_ALPHA only when the plane format has_alpha. > > This change enables XR24 format to be displayed as an overlay on top of > the primary plane. Reviewed-by: CK Hu > > Suggested-by: Sean

Re: [PATCH v2 24/28] drm/mediatek: hdmi: Use drm_bridge_init()

2019-12-09 Thread CK Hu
Hi, Mihail: On Wed, 2019-12-04 at 11:48 +, Mihail Atanassov wrote: > No functional change. > Acked-by: CK Hu > Signed-off-by: Mihail Atanassov > --- > drivers/gpu/drm/mediatek/mtk_hdmi.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff

Re: [resend PATCH v6 10/12] clk: mediatek: mt8183: switch mmsys to platform device probing

2019-12-09 Thread CK Hu
Hi, Matthias: On Sat, 2019-12-07 at 23:47 +0100, matthias@kernel.org wrote: > From: Matthias Brugger > > Switch probing for the MMSYS to support invocation to a > plain paltform device. The driver will be probed by the DRM subsystem. > > Singed-off-by: Matthias Brugger > --- > drivers/clk

Re: [resend PATCH v6 12/12] drm/mediatek: Add support for mmsys through a pdev

2019-12-08 Thread CK Hu
Hi, Matthias: On Sat, 2019-12-07 at 23:47 +0100, matthias@kernel.org wrote: > From: Matthias Brugger > > The MMSYS subsystem includes clocks and drm components. > This patch adds an initailization path through a platform device > for the clock part, so that both drivers get probed from the s

Re: [resend PATCH v6 01/12] dt-bindings: display: mediatek: Add mmsys binding description

2019-12-08 Thread CK Hu
Hi, Matthias: On Sat, 2019-12-07 at 23:47 +0100, matthias@kernel.org wrote: > From: Matthias Brugger > > The MediaTek DRM has a block called mmsys, which sets > the routing and enalbes the different blocks. > This patch adds one line for the mmsys bindings description. > > Signed-off-by: Ma

Re: [resend PATCH v6 04/12] drm: mediatek: Omit warning on probe defers

2019-12-08 Thread CK Hu
ed to get the clocks. Omit this error on > the defered probe path. Reviewed-by: CK Hu > > Signed-off-by: Matthias Brugger > --- > drivers/gpu/drm/mediatek/mtk_disp_color.c | 5 - > drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 5 - > drivers/gpu/drm/mediatek/mtk_d

Re: [resend PATCH v6 03/12] drm/mediatek: Use regmap for register access

2019-12-08 Thread CK Hu
Hi, Matthias: On Sat, 2019-12-07 at 23:47 +0100, matthias@kernel.org wrote: > From: Matthias Brugger > > The mmsys memory space is shared between the drm and the > clk driver. Use regmap to access it. Reviewed-by: CK Hu > > Signed-off-by: Matthias Brugger > Revie

Re: [PATCH v4 0/7] drm/mediatek: fix cursor issue and apply CMDQ in MTK DRM

2019-12-08 Thread CK Hu
Hi, Bibby: I've tried to apply this series to 5.5-rc1, but there are many conflicts. Please resend this series based on 5.5-rc1. And I've found that if I config CONFIG_MTK_CMDQ=m, the code inside '#ifdef CONFIG_MTK_CMDQ' would not be built. I think you should change this to '#if IS_ENABLED(CONFIG

Re: [PATCH v4 7/7] drm/mediatek: apply CMDQ control flow

2019-12-05 Thread CK Hu
relevant display controller registers > with critical time limation. Reviewed-by: CK Hu > > Signed-off-by: YT Shen > Signed-off-by: CK Hu > Signed-off-by: Philipp Zabel > Signed-off-by: Bibby Hsieh > Signed-off-by: Yongqiang Niu > --- > drivers/gpu/drm/mediatek/

Re: [PATCH v4 6/7] drm/mediatek: support CMDQ interface in ddp component

2019-12-05 Thread CK Hu
ace can support cpu/cmdq function > at the same time. Reviewed-by: CK Hu > > Signed-off-by: YT Shen > Signed-off-by: CK Hu > Signed-off-by: Philipp Zabel > Signed-off-by: Bibby Hsieh > Signed-off-by: Yongqiang Niu > --- > drivers/gpu/drm/mediatek/mtk_disp_colo

Re: [PATCH v4 4/7] drm/mediatek: disable all the planes in atomic_disable

2019-12-05 Thread CK Hu
On Thu, 2019-12-05 at 17:27 +0800, Bibby Hsieh wrote: > Under shadow register case, we do not disable all the plane before > disable all the hardwares. Fix it. Except the 'Fixes' tag, I could add it, Reviewed-by: CK Hu > > Signed-off-by: Bibby Hsieh > --- &g

Re: [PATCH v4 3/7] drm/mediatek: update cursors by using async atomic update

2019-12-05 Thread CK Hu
Hi, Bibby: On Thu, 2019-12-05 at 17:27 +0800, Bibby Hsieh wrote: > Support to async updates of cursors by using the new atomic > interface for that. > Reviewed-by: CK Hu > Signed-off-by: Bibby Hsieh > --- > drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 98 +

<    1   2   3   4   5   6   7   8   >