Re: [PATCH v7 05/18] drm/mediatek: Set DRM mode configs accordingly

2024-05-26 Thread Fei Shao
On Mon, May 27, 2024 at 12:38 PM Chen-Yu Tsai wrote: > > On Mon, May 27, 2024 at 12:34 PM Fei Shao wrote: > > > > Hi Shawn, > > > > On Thu, May 2, 2024 at 6:39 PM Shawn Sung wrote: > > > > > > From: Hsiao Chien Sung > > > > &

Re: [PATCH v7 05/18] drm/mediatek: Set DRM mode configs accordingly

2024-05-26 Thread Fei Shao
Hi Shawn, On Thu, May 2, 2024 at 6:39 PM Shawn Sung wrote: > > From: Hsiao Chien Sung > > Set DRM mode configs limitation according to the hardware capabilities > and pass the IGT checks as below: > > - The test "graphics.IgtKms.kms_plane" requires a frame buffer with > width of 4512 pixels

Re: [PATCH] drm/mediatek: Support MT8195 OVL compatible in mtk_drm_drv

2024-02-26 Thread Fei Shao
On Mon, Feb 26, 2024 at 4:07 PM Fei Shao wrote: > > Specify the component type for mediatek,mt8195-disp-ovl in the MediaTek > DRM driver on top of commit 76cdcb87d391 ("drm/mediatek: Add MT8195 ovl > driver support"). > > With this, the compatible can functio

Re: [PATCH] drm/mediatek: Add MT8188 Overlay Driver Data

2024-02-26 Thread Fei Shao
On Mon, Feb 26, 2024 at 4:43 PM AngeloGioacchino Del Regno wrote: > > Il 26/02/24 09:21, Fei Shao ha scritto: > > On Thu, Feb 22, 2024 at 4:43 PM AngeloGioacchino Del Regno > > wrote: > >> > >> Il 21/02/24 17:56, Justin Green ha scritto: > >>&

Re: [PATCH] drm/mediatek: Add MT8188 Overlay Driver Data

2024-02-26 Thread Fei Shao
On Thu, Feb 22, 2024 at 4:43 PM AngeloGioacchino Del Regno wrote: > > Il 21/02/24 17:56, Justin Green ha scritto: > > Add MT8188 overlay driver configuration data. This change consequently > > enables 10-bit overlay support on MT8188 devices. > > > > Tested by running ChromeOS UI on MT8188 and

[PATCH] drm/mediatek: Support MT8195 OVL compatible in mtk_drm_drv

2024-02-26 Thread Fei Shao
Signed-off-by: Fei Shao --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index 14a1e0157cc4..703caba48420 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c +++ b/drive

Re: [PATCH v3 1/3] dt-bindings: mailbox: Add mediatek,gce-props.yaml

2024-01-21 Thread Fei Shao
On Fri, Jan 19, 2024 at 2:32 PM Jason-JH.Lin wrote: Hi Jason, Just few nitpicks about typo: > > Add mediatek,gce-props.yaml for common GCE properties that is used for > both mailbox providers and consumers. We place the common property > "mediatek,gce-events" in this binding currently. > > The

Re: [PATCH v2 2/4] drm/mediatek: dsi: Cleanup functions mtk_dsi_ps_control{_vact}()

2023-12-26 Thread Fei Shao
and integrate those usages. Just a thought. :) > > + > + ps_wc = vm->hactive * dsi_buf_bpp; I noticed the "& DSI_PS_WC" part was dropped (but perhaps with awareness?). While the outcome seems to always fall within the range of DSI_PS_WC so we should be fine in pra

Re: [PATCH v2 1/4] drm/mediatek: dsi: Use GENMASK() for register mask definitions

2023-12-26 Thread Fei Shao
Hi Angelo, On Wed, Dec 20, 2023 at 9:57 PM AngeloGioacchino Del Regno wrote: > > Change magic numerical masks with usage of the GENMASK() macro > to improve readability. > > This commit brings no functional changes. > > Signed-off-by: AngeloGioacchino Del Regno > > --- >

Re: [PATCH] drm/mediatek: Correctly free sg_table in gem prime vmap

2023-10-03 Thread Fei Shao
Hi, On Mon, Oct 2, 2023 at 5:21 PM Chen-Yu Tsai wrote: > > The MediaTek DRM driver implements GEM PRIME vmap by fetching the > sg_table for the object, iterating through the pages, and then > vmapping them. In essence, unlike the GEM DMA helpers which vmap > when the object is first created or

Re: [PATCH] drm/mediatek: Add spinlock for setting vblank event in atomic_begin

2023-09-18 Thread Fei Shao
Hi Angelo, On Wed, Sep 13, 2023 at 4:35 PM AngeloGioacchino Del Regno wrote: > > Il 22/08/23 15:26, Jason-JH.Lin ha scritto: > > Add spinlock protection to avoid race condition on vblank event > > between mtk_drm_crtc_atomic_begin() and mtk_drm_finish_page_flip(). > > > > Hello Jason, > > Can

Re: [PATCH] drm/mediatek: Add spinlock for setting vblank event in atomic_begin

2023-09-13 Thread Fei Shao
On Thu, Aug 31, 2023 at 3:12 PM Fei Shao wrote: > > On Tue, Aug 22, 2023 at 10:27 PM Jason-JH.Lin > wrote: > > > > Add spinlock protection to avoid race condition on vblank event > > between mtk_drm_crtc_atomic_begin() and mtk_drm_finish_page_flip(). > > >

Re: [RFT PATCH 05/15] drm/mediatek: Call drm_atomic_helper_shutdown() at shutdown time

2023-09-12 Thread Fei Shao
On Tue, Sep 12, 2023 at 12:11 AM Doug Anderson wrote: > [...] > > That makes sense. I had based this series on drm-misc-next which > didn't have those, but now that a new -rc1 is out it then > drm-misc-next should rebase shortly. I'll make sure that the next > version includes Uwe's changes as

Re: [RFT PATCH 05/15] drm/mediatek: Call drm_atomic_helper_shutdown() at shutdown time

2023-09-08 Thread Fei Shao
during boot / reboot, so Reviewed-by: Fei Shao Tested-by: Fei Shao [1]: https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/commit/?h=mediatek-drm-next=b3af12a0b46888340e024ba8b231605bcf2d0ab3 > + .shutdown = mtk_drm_shutdown, > .driver = { >

Re: [PATCH v4 3/4] drm/mediatek: Fix unintentional integer overflow in multiplying different types

2023-08-31 Thread Fei Shao
On Fri, Jul 14, 2023 at 6:59 PM Jason-JH.Lin wrote: > > 1. Instead of multiplying 2 variable of different types. Change to > assign a value of one variable and then multiply the other variable. > > 2. Add a int variable for multiplier calculation instead of calculating > different types

Re: [PATCH] drm/mediatek: Add spinlock for setting vblank event in atomic_begin

2023-08-31 Thread Fei Shao
;) > Signed-off-by: Jason-JH.Lin Reviewed-by: Fei Shao

Re: [PATCH v4,2/3] drm/mediatek: dp: Add the audio packet flag to mtk_dp_data struct

2023-08-14 Thread Fei Shao
g Li > Signed-off-by: Jitao Shi Reviewed-by: Fei Shao

Re: [PATCH v4,3/3] drm/mediatek: dp: Add the audio divider to mtk_dp_data struct

2023-08-14 Thread Fei Shao
On Mon, Aug 14, 2023 at 3:28 PM Shuijing Li wrote: > > Due to the difference of HW, different dividers need to be set. > > Signed-off-by: Shuijing Li > Signed-off-by: Jitao Shi Reviewed-by: Fei Shao

Re: [PATCH v9 7/7] drm/mediatek: Support DSI on MT8188 VDOSYS0

2023-08-09 Thread Fei Shao
On Thu, Aug 10, 2023 at 2:15 AM Jason-JH.Lin wrote: > > Add DSI as a main display output selection on MT8188 VDOSYS0. > > Signed-off-by: Nathan Lu > Reviewed-by: Matthias Brugger > Signed-off-by: Jason-JH.Lin Reviewed-by: Fei Shao Tested-by: Fei Shao

Re: [PATCH v9 6/7] drm/mediatek: dsi: Support dynamic connector selection

2023-08-09 Thread Fei Shao
On Thu, Aug 10, 2023 at 2:16 AM Jason-JH.Lin wrote: > > Add implementation of mtk_dsi_encoder_index to mtk_ddp_comp_func > to make mtk_dsi support dynamic connector selection. > > Signed-off-by: Jason-JH.Lin Reviewed-by: Fei Shao Tested-by: Fei Shao

Re: [PATCH v9 5/7] drm/mediatek: Add connector dynamic selection capability for mt8188

2023-08-09 Thread Fei Shao
array to a > connector routes array called mt8188_mtk_ddp_main_routes to support > dynamic selection capability for mt8188. > > Signed-off-by: Nancy Lin > Signed-off-by: Nathan Lu > Signed-off-by: Jason-JH.Lin Tested-by: Fei Shao

Re: [PATCH v9 4/7] drm/mediatek: Add encoder_index function to mtk_ddp_comp_funcs for dpi

2023-08-09 Thread Fei Shao
implementation > of mtk_dpi_encoder_index to get its encoder_index. > > Signed-off-by: Jason-JH.Lin Reviewed-by: Fei Shao Tested-by: Fei Shao

Re: [PATCH v9 3/7] drm/mediatek: Fix using wrong drm private data to bind mediatek-drm

2023-08-09 Thread Fei Shao
ned-off-by: Jason-JH.Lin > Reviewed-by: AngeloGioacchino Del Regno > > Reviewed-by: CK Hu Tested-by: Fei Shao

Re: [PATCH v9 2/7] drm/mediatek: Add crtc path enum for all_drm_priv array

2023-08-09 Thread Fei Shao
Tested with MT8188 and the internal display is up and functioning. Reviewed-by: Fei Shao Tested-by: Fei Shao

Re: [PATCH v9 1/7] drm/mediatek: Add mmsys_dev_num to mt8188 vdosys0 driver data

2023-08-09 Thread Fei Shao
Reviewed-by: AngeloGioacchino Del Regno > Tested with MT8188 and the internal display is up and functioning. Reviewed-by: Fei Shao Tested-by: Fei Shao

Re: [PATCH RESEND] drm/mediatek: Add valid modifier check

2023-08-03 Thread Fei Shao
On Thu, Aug 3, 2023 at 10:57 PM Daniel Vetter wrote: > > On Thu, Aug 03, 2023 at 08:48:56AM -0400, Justin Green wrote: > > > See c91acda3a380 ("drm/gem: Check for valid formats") and the related gem > > fb helper functions to see how this is supposed to be done. Thanks for shedding the light,

Re: [PATCH RESEND] drm/mediatek: Add valid modifier check

2023-07-25 Thread Fei Shao
OS kms_addfb_basic binary, which has a test called > "addfb25-bad-modifier" that attempts to create a framebuffer with the > modifier DRM_FORMAT_MOD_INVALID and verifies the ADDFB2 ioctl returns > EINVAL. > > Signed-off-by: Justin Green Tested-by: Fei Shao Tested the UI and

Re: [PATCH v2 6/6] drm/mediatek: mtk_dpi: Compress struct of_device_id entries

2023-07-19 Thread Fei Shao
es. > > Signed-off-by: AngeloGioacchino Del Regno > Reviewed-by: Fei Shao

Re: [PATCH v2 5/6] drm/mediatek: mtk_dpi: Use devm_platform_ioremap_resource()

2023-07-19 Thread Fei Shao
: AngeloGioacchino Del Regno > Reviewed-by: Fei Shao

Re: [PATCH v2 4/6] drm/mediatek: mtk_dpi: Switch to .remove_new() void callback

2023-07-19 Thread Fei Shao
On Wed, Jul 19, 2023 at 3:51 PM AngeloGioacchino Del Regno wrote: > > The .remove() callback cannot fail: switch to .remove_new() and > change mtk_dpi_remove() to void. > > Signed-off-by: AngeloGioacchino Del Regno > Reviewed-by: Fei Shao

Re: [PATCH v2 1/6] drm/mediatek: mtk_dpi: Simplify with devm_drm_bridge_add()

2023-07-19 Thread Fei Shao
On Wed, Jul 19, 2023 at 3:51 PM AngeloGioacchino Del Regno wrote: > > Change drm_bridge_add() to its devm variant to slightly simplify the > probe function. > > Signed-off-by: AngeloGioacchino Del Regno > Reviewed-by: Fei Shao

Re: [PATCH v2] drm/mediatek: fix uninitialized symbol

2023-07-16 Thread Fei Shao
Hi CK, On Fri, Jul 14, 2023 at 5:27 PM CK Hu (胡俊光) wrote: > > Hi, Nancy: > > On Fri, 2023-04-21 at 10:16 +0800, Nancy.Lin wrote: snip > > In line 566, the statement is > > if (nodo) { > comp_pdev = ... > } > > The comment says that only ovl_adaptoer has no device node, so the > checking

Re: [PATCH 4/4] drm/mediatek: mtk_dpi: Use devm_platform_get_and_ioremap_resource()

2023-07-13 Thread Fei Shao
Hi Angelo, On Wed, Apr 12, 2023 at 7:53 PM AngeloGioacchino Del Regno wrote: > > Instead of the open-coded platform_get_resource, devm_ioremap_resource > switch to devm_platform_get_and_ioremap_resource(), doing exactly the > same. > > Signed-off-by: AngeloGioacchino Del Regno > > --- >

Re: [PATCH 3/4] drm/mediatek: mtk_dpi: Switch to devm_drm_of_get_bridge()

2023-07-13 Thread Fei Shao
_bridge(). Furthermore, that will make the code visually align with your previous patch. But that's just optional, and since this patch works anyway, Reviewed-by: Fei Shao > > dev_info(dev, "Found bridge node: %pOF\n", dpi->next_bridge->of_node); > > -- > 2.40.0 > >

Re: [PATCH 2/4] drm/mediatek: mtk_dpi: Simplify with dev_err_probe()

2023-07-13 Thread Fei Shao
On Wed, Apr 12, 2023 at 7:53 PM AngeloGioacchino Del Regno wrote: > > Use dev_err_probe() across the entire probe function of this driver > to shrink the size. > > Signed-off-by: AngeloGioacchino Del Regno > Reviewed-by: Fei Shao

Re: [PATCH 1/4] drm/mediatek: mtk_dpi: Simplify with devm_drm_bridge_add()

2023-07-13 Thread Fei Shao
Hi Angelo, On Wed, Apr 12, 2023 at 7:53 PM AngeloGioacchino Del Regno wrote: > > Change drm_bridge_add() to its devm variant to slightly simplify the > probe function. > > Signed-off-by: AngeloGioacchino Del Regno > > --- > drivers/gpu/drm/mediatek/mtk_dpi.c | 5 +++-- > 1 file changed, 3

Re: [PATCH v2] drm/mediatek: fix uninitialized symbol

2023-07-12 Thread Fei Shao
On Fri, Apr 21, 2023 at 10:16 AM Nancy.Lin wrote: > > fix Smatch static checker warning > - uninitialized symbol comp_pdev in mtk_ddp_comp_init. > > Fixes: 0d9eee9118b7 ("drm/mediatek: Add drm ovl_adaptor sub driver for > MT8195") > Signed-off-by: Nancy.Lin Rev

Re: [PATCH v2 2/2] drm/mediatek: Fix iommu fault during crtc enabling

2023-07-09 Thread Fei Shao
Hi Jason, On Mon, Jul 10, 2023 at 12:27 AM Jason-JH.Lin wrote: > > OVL layer should not be enabled before crtc is enabled. > The plane_state of drm_atomic_state is not sync to > the plane_state stored in mtk_crtc during crtc enabling, > so just set all planes to disabled. > Please add the

Re: [PATCH v6 2/2] arm64: dts: mt8192: Add node for the Mali GPU

2022-04-18 Thread Fei Shao
On Thu, Apr 14, 2022 at 10:53 AM Nick Fan wrote: > > Add a basic GPU node for mt8192. > > Signed-off-by: Nick Fan Reviewed-by: Fei Shao

Re: [PATCH v6 3/6] drm/mediatek: Detect CMDQ execution timeout

2021-10-28 Thread Fei Shao
cmdq done. If it fail to execute in next 3 vblank, > tiemout happen. > > Signed-off-by: Chun-Kuang Hu > Signed-off-by: jason-jh.lin Reviewed-by: Fei Shao > --- > drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 20 ++-- > 1 file changed, 18 insertions(+), 2 del

Re: [PATCH v5 3/6] drm/mediatek: Detect CMDQ execution timeout

2021-10-27 Thread Fei Shao
Hi Chun-Kuang, On Thu, Oct 28, 2021 at 7:47 AM Chun-Kuang Hu wrote: > > Hi, Fei: > > Fei Shao 於 2021年10月27日 週三 下午5:32寫道: > > > > Hi Jason, > > > > On Wed, Oct 27, 2021 at 10:19 AM jason-jh.lin > > wrote: > > > > > > From: Chun-K

Re: [PATCH v5 3/6] drm/mediatek: Detect CMDQ execution timeout

2021-10-27 Thread Fei Shao
Hi Jason, On Wed, Oct 27, 2021 at 10:19 AM jason-jh.lin wrote: > > From: Chun-Kuang Hu > > CMDQ is used to update display register in vblank period, so > it should be execute in next 2 vblank. One vblank interrupt > before send message (occasionally) and one vblank interrupt > after cmdq done.

Re: [PATCH v11 09/16] soc: mediatek: add mtk-mmsys support for mt8195 vdosys0

2021-10-25 Thread Fei Shao
On Fri, Oct 22, 2021 at 6:13 PM Jason-JH Lin wrote: > > Hi Angelo, > > Thanks for the reviews. > > > On Thu, 2021-10-14 at 16:05 +0200, AngeloGioacchino Del Regno wrote: > > > Add mt8195 vdosys0 clock driver name and routing table to > > > the driver data of mtk-mmsys. > > > > > [snip] > > > > >