[PATCH 0/3] MediaTek DRM: Clean up CMDQ support and ifdefs

AngeloGioacchino Del Regno posted 3 patches 1 year, 4 months ago
drivers/gpu/drm/mediatek/mtk_disp_aal.c     |   2 -
drivers/gpu/drm/mediatek/mtk_disp_ccorr.c   |   2 -
drivers/gpu/drm/mediatek/mtk_disp_color.c   |   2 -
drivers/gpu/drm/mediatek/mtk_disp_gamma.c   |   2 -
drivers/gpu/drm/mediatek/mtk_disp_merge.c   |   2 -
drivers/gpu/drm/mediatek/mtk_disp_ovl.c     |   2 -
drivers/gpu/drm/mediatek/mtk_disp_rdma.c    |   2 -
drivers/gpu/drm/mediatek/mtk_drm_crtc.c     | 178 +++++++-------------
drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c |  12 --
drivers/gpu/drm/mediatek/mtk_ethdr.c        |   6 +-
drivers/gpu/drm/mediatek/mtk_mdp_rdma.c     |   3 +-
include/linux/soc/mediatek/mtk-cmdq.h       |   1 +
12 files changed, 69 insertions(+), 145 deletions(-)
[PATCH 0/3] MediaTek DRM: Clean up CMDQ support and ifdefs
Posted by AngeloGioacchino Del Regno 1 year, 4 months ago
This series changes MediaTek CMDQ support to use the mtk-cmdq-helper
functions, removing duplicated cmdq setup code in mtk-drm and also
removing all instances of `#if IS_REACHABLE(CONFIG_MTK_CMDQ)` while
keeping compatibility with both CONFIG_MTK_CMDQ=n and =m/=y.

This applies on top of [1] and [2].

[1]: https://lore.kernel.org/lkml/20230524093412.92211-1-angelogioacchino.delregno@collabora.com
[2]: https://lore.kernel.org/lkml/20230608084727.74403-1-angelogioacchino.delregno@collabora.com

AngeloGioacchino Del Regno (3):
  drm/mediatek: Dynamically allocate CMDQ and use helper functions
  drm/mediatek: Remove all preprocessor ifs for CONFIG_MTK_CMDQ
  drm/mediatek: Move CMDQ setup to mtk_drm_cmdq_init() function

 drivers/gpu/drm/mediatek/mtk_disp_aal.c     |   2 -
 drivers/gpu/drm/mediatek/mtk_disp_ccorr.c   |   2 -
 drivers/gpu/drm/mediatek/mtk_disp_color.c   |   2 -
 drivers/gpu/drm/mediatek/mtk_disp_gamma.c   |   2 -
 drivers/gpu/drm/mediatek/mtk_disp_merge.c   |   2 -
 drivers/gpu/drm/mediatek/mtk_disp_ovl.c     |   2 -
 drivers/gpu/drm/mediatek/mtk_disp_rdma.c    |   2 -
 drivers/gpu/drm/mediatek/mtk_drm_crtc.c     | 178 +++++++-------------
 drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c |  12 --
 drivers/gpu/drm/mediatek/mtk_ethdr.c        |   6 +-
 drivers/gpu/drm/mediatek/mtk_mdp_rdma.c     |   3 +-
 include/linux/soc/mediatek/mtk-cmdq.h       |   1 +
 12 files changed, 69 insertions(+), 145 deletions(-)

-- 
2.40.1
Re: [PATCH 0/3] MediaTek DRM: Clean up CMDQ support and ifdefs
Posted by Alexandre Mergnat 1 year, 4 months ago

On 23/06/2023 11:49, AngeloGioacchino Del Regno wrote:
> This series changes MediaTek CMDQ support to use the mtk-cmdq-helper
> functions, removing duplicated cmdq setup code in mtk-drm and also
> removing all instances of `#if IS_REACHABLE(CONFIG_MTK_CMDQ)` while
> keeping compatibility with both CONFIG_MTK_CMDQ=n and =m/=y.
> 
> This applies on top of [1] and [2].
> 
> [1]:https://lore.kernel.org/lkml/20230524093412.92211-1-angelogioacchino.delregno@collabora.com
> [2]:https://lore.kernel.org/lkml/20230608084727.74403-1-angelogioacchino.delregno@collabora.com

Hi Angelo,

Can you provide a public branch to test it please ?
I tried to apply the dependencies but still have an issue with the 3rd one:

https://lore.kernel.org/lkml/20230523104234.7849-1-angelogioacchino.delregno@collabora.com
OK

https://lore.kernel.org/lkml/20230524093412.92211-1-angelogioacchino.delregno@collabora.com
OK

https://lore.kernel.org/lkml/20230608084727.74403-1-angelogioacchino.delregno@collabora.com
KO

Thanks

-- 
Regards,
Alexandre
Re: [PATCH 0/3] MediaTek DRM: Clean up CMDQ support and ifdefs
Posted by AngeloGioacchino Del Regno 1 year, 3 months ago
Il 23/06/23 14:49, Alexandre Mergnat ha scritto:
> 
> 
> On 23/06/2023 11:49, AngeloGioacchino Del Regno wrote:
>> This series changes MediaTek CMDQ support to use the mtk-cmdq-helper
>> functions, removing duplicated cmdq setup code in mtk-drm and also
>> removing all instances of `#if IS_REACHABLE(CONFIG_MTK_CMDQ)` while
>> keeping compatibility with both CONFIG_MTK_CMDQ=n and =m/=y.
>>
>> This applies on top of [1] and [2].
>>
>> [1]:https://lore.kernel.org/lkml/20230524093412.92211-1-angelogioacchino.delregno@collabora.com
>> [2]:https://lore.kernel.org/lkml/20230608084727.74403-1-angelogioacchino.delregno@collabora.com
> 
> Hi Angelo,
> 
> Can you provide a public branch to test it please ?
> I tried to apply the dependencies but still have an issue with the 3rd one:
> 
> https://lore.kernel.org/lkml/20230523104234.7849-1-angelogioacchino.delregno@collabora.com
> OK
> 
> https://lore.kernel.org/lkml/20230524093412.92211-1-angelogioacchino.delregno@collabora.com
> OK
> 
> https://lore.kernel.org/lkml/20230608084727.74403-1-angelogioacchino.delregno@collabora.com
> KO
> 
> Thanks
> 

Sorry for the very late reply; I've somehow lost this email in the haystack...

There you go:
https://gitlab.collabora.com/google/chromeos-kernel/-/commits/for-kernelci/

Cheers,
Angelo
Re: [PATCH 0/3] MediaTek DRM: Clean up CMDQ support and ifdefs
Posted by Alexandre Mergnat 1 year, 3 months ago

On 19/07/2023 09:41, AngeloGioacchino Del Regno wrote:
> Il 23/06/23 14:49, Alexandre Mergnat ha scritto:
>>
>>
>> On 23/06/2023 11:49, AngeloGioacchino Del Regno wrote:
>>> This series changes MediaTek CMDQ support to use the mtk-cmdq-helper
>>> functions, removing duplicated cmdq setup code in mtk-drm and also
>>> removing all instances of `#if IS_REACHABLE(CONFIG_MTK_CMDQ)` while
>>> keeping compatibility with both CONFIG_MTK_CMDQ=n and =m/=y.
>>>
>>> This applies on top of [1] and [2].
>>>
>>> [1]:https://lore.kernel.org/lkml/20230524093412.92211-1-angelogioacchino.delregno@collabora.com
>>> [2]:https://lore.kernel.org/lkml/20230608084727.74403-1-angelogioacchino.delregno@collabora.com
>>
>> Hi Angelo,
>>
>> Can you provide a public branch to test it please ?
>> I tried to apply the dependencies but still have an issue with the 3rd 
>> one:
>>
>> https://lore.kernel.org/lkml/20230523104234.7849-1-angelogioacchino.delregno@collabora.com
>> OK
>>
>> https://lore.kernel.org/lkml/20230524093412.92211-1-angelogioacchino.delregno@collabora.com
>> OK
>>
>> https://lore.kernel.org/lkml/20230608084727.74403-1-angelogioacchino.delregno@collabora.com
>> KO
>>
>> Thanks
>>
> 
> Sorry for the very late reply; I've somehow lost this email in the 
> haystack...
> 
> There you go:
> https://gitlab.collabora.com/google/chromeos-kernel/-/commits/for-kernelci/
> 

Thanks Angelo,

I build/boot your branch for the i350-evk board.

I had to revert this commit from your branch:
"15f12798e218 TODO: soc: mediatek: mtk-pm-domains: Support CPU Power 
Domains"
Because it conflict with the "soc: mediatek: MT8365 power support" serie 
[3].

Also, I change back the defconfig to be aligned with the v6.5-rc1

After that, the board boot and drm/display seems working like a charm.

[3]: 
https://lore.kernel.org/linux-arm-kernel/20230713150414.891893-1-msp@baylibre.com/

-- 
Regards,
Alexandre