2019-06-24 14:48:24

by Julien Masson

[permalink] [raw]
Subject: [PATCH 0/9] drm: meson: global clean-up (use proper macros, update comments ...)


This patch series aims to clean-up differents parts of the drm meson
code source.

Couple macros have been defined and used to set several registers
instead of using magic constants.

I also took the opportunity to:
- add/remove/update comments
- remove useless code
- minor fix/improvment

Julien Masson (9):
drm: meson: mask value when writing bits relaxed
drm: meson: crtc: use proper macros instead of magic constants
drm: meson: drv: use macro when initializing vpu
drm: meson: vpp: use proper macros instead of magic constants
drm: meson: viu: use proper macros instead of magic constants
drm: meson: venc: use proper macros instead of magic constants
drm: meson: global clean-up
drm: meson: add macro used to enable HDMI PLL
drm: meson: venc: set the correct macrovision max amplitude value

drivers/gpu/drm/meson/meson_crtc.c | 17 ++-
drivers/gpu/drm/meson/meson_drv.c | 26 +++-
drivers/gpu/drm/meson/meson_dw_hdmi.c | 2 +
drivers/gpu/drm/meson/meson_dw_hdmi.h | 12 +-
drivers/gpu/drm/meson/meson_plane.c | 2 +-
drivers/gpu/drm/meson/meson_registers.h | 136 ++++++++++++++++---
drivers/gpu/drm/meson/meson_vclk.c | 7 +-
drivers/gpu/drm/meson/meson_venc.c | 169 ++++++++++++++++++------
drivers/gpu/drm/meson/meson_venc_cvbs.c | 3 +-
drivers/gpu/drm/meson/meson_viu.c | 82 ++++++------
drivers/gpu/drm/meson/meson_vpp.c | 27 ++--
11 files changed, 362 insertions(+), 121 deletions(-)

--
2.17.1


2019-06-25 03:54:21

by Kevin Hilman

[permalink] [raw]
Subject: Re: [PATCH 0/9] drm: meson: global clean-up (use proper macros, update comments ...)

Julien Masson <[email protected]> writes:

> This patch series aims to clean-up differents parts of the drm meson
> code source.
>
> Couple macros have been defined and used to set several registers
> instead of using magic constants.
>
> I also took the opportunity to:
> - add/remove/update comments
> - remove useless code
> - minor fix/improvment

Nice set of cleanups, thanks! I especially like the extra in-code
comments.

Could you also add to the cover-letter how this was tested, and on what
platforms so we know it's not going to introduce any regressions.

Thanks,

Kevin

2019-08-08 14:15:11

by Neil Armstrong

[permalink] [raw]
Subject: Re: [PATCH 0/9] drm: meson: global clean-up (use proper macros, update comments ...)

On 25/06/2019 01:24, Kevin Hilman wrote:
> Julien Masson <[email protected]> writes:
>
>> This patch series aims to clean-up differents parts of the drm meson
>> code source.
>>
>> Couple macros have been defined and used to set several registers
>> instead of using magic constants.
>>
>> I also took the opportunity to:
>> - add/remove/update comments
>> - remove useless code
>> - minor fix/improvment
>
> Nice set of cleanups, thanks! I especially like the extra in-code
> comments.
>
> Could you also add to the cover-letter how this was tested, and on what
> platforms so we know it's not going to introduce any regressions.
>
> Thanks,
>
> Kevin
>

Apart the wrong magic value in patch 4 that I'll fix while applying,
Reviewed-by: Neil Armstrong <[email protected]>

I'll run a few tests on all the supported SoC versions:
- GXBB
- GXL
- GXM
- G12A/G12B

and push to drm-misc-next.

Neil

2019-08-09 09:44:50

by Neil Armstrong

[permalink] [raw]
Subject: Re: [PATCH 0/9] drm: meson: global clean-up (use proper macros, update comments ...)

Hi Julien,

On 08/08/2019 16:12, Neil Armstrong wrote:
> On 25/06/2019 01:24, Kevin Hilman wrote:
>> Julien Masson <[email protected]> writes:
>>
>>> This patch series aims to clean-up differents parts of the drm meson
>>> code source.
>>>
>>> Couple macros have been defined and used to set several registers
>>> instead of using magic constants.
>>>
>>> I also took the opportunity to:
>>> - add/remove/update comments
>>> - remove useless code
>>> - minor fix/improvment
>>
>> Nice set of cleanups, thanks! I especially like the extra in-code
>> comments.
>>
>> Could you also add to the cover-letter how this was tested, and on what
>> platforms so we know it's not going to introduce any regressions.
>>
>> Thanks,
>>
>> Kevin
>>
>
> Apart the wrong magic value in patch 4 that I'll fix while applying,
> Reviewed-by: Neil Armstrong <[email protected]>
>
> I'll run a few tests on all the supported SoC versions:
> - GXBB
> - GXL
> - GXM
> - G12A/G12B

Tested on :
- 1024x768x60 DVI Dell monitor
- 3840x2160x60 HDMI2.0 Samsung TV

Tested :
- Simple DMT mode
- Advanced HDMI2.0 4k60 mode with SCDC negotiation and scrambling
- OSD layer and scaling
- Video layer and scaling

SoCs:
- GXBB: meson-gxbb-odroidc2
modetest -M meson -s 32:1024x768-60 -P 33@37:1024x768@AR24 -P 35@37:1024x768@NV12
modetest -M meson -s 32:1024x768-60 -P 33@37:1024x768@AR24 -P 35@37:1024x768*2@NV12
modetest -M meson -s 32:1024x768-60 -P 33@37:512x384*2@AR24 -P 35@37:2048x1536*0.5@NV12

modetest -M meson -s 32:3840x2160-60 -P 33@37:3840x2160@AR24 -P 35@37:3840x2160@NV12
modetest -M meson -s 32:3840x2160-60 -P 33@37:1920x1080*2@AR24 -P 35@37:3840x2160*0.8@NV12

No visual issues

- GXL: meson-gxl-s905x-libretech-cc
modetest -M meson -s 34:1024x768-60 -P 35@39:1024x768@AR24 -P 37@39:1024x768@NV12
modetest -M meson -s 34:1024x768-60 -P 35@39:1024x768@AR24 -P 37@39:1024x768*2@NV12
modetest -M meson -s 34:1024x768-60 -P 35@39:512x384*2@AR24 -P 37@39:2048x1536*0.5@NV12
modetest -M meson -s 34:3840x2160-60 -P 35@39:3840x2160@AR24 -P 37@39:3840x2160@NV12
modetest -M meson -s 34:3840x2160-60 -P 35@39:1920x1080*2@AR24 -P 37@39:3840x2160*0.8@NV12

No visual issues

- GXM: meson-gxm-khadas-vim2
modetest -M meson -s 32:1024x768-60 -P 33@37:1024x768@AR24 -P 35@37:1024x768@NV12
modetest -M meson -s 32:1024x768-60 -P 33@37:1024x768@AR24 -P 35@37:1024x768*2@NV12
modetest -M meson -s 32:1024x768-60 -P 33@37:512x384*2@AR24 -P 35@37:2048x1536*0.5@NV12

modetest -M meson -s 32:3840x2160-60 -P 33@37:3840x2160@AR24 -P 35@37:3840x2160@NV12
modetest -M meson -s 32:3840x2160-60 -P 33@37:1920x1080*2@AR24 -P 35@37:3840x2160*0.8@NV12

With the following fix on patch 4:
========><====================================
--- a/drivers/gpu/drm/meson/meson_vpp.c
+++ b/drivers/gpu/drm/meson/meson_vpp.c
@@ -98,7 +98,7 @@ void meson_vpp_init(struct meson_drm *priv)
priv->io_base + _REG(VIU_MISC_CTRL1));
writel_relaxed(VPP_PPS_DUMMY_DATA_MODE,
priv->io_base + _REG(VPP_DOLBY_CTRL));
- writel_relaxed(0x108080,
+ writel_relaxed(0x1020080,
priv->io_base + _REG(VPP_DUMMY_DATA1));
} else if (meson_vpu_is_compatible(priv, "amlogic,meson-g12a-vpu"))
writel_relaxed(0xf, priv->io_base + _REG(DOLBY_PATH_CTRL));
========><====================================

No visual issues

- G12A/G12B: meson-g12a-sei510

Issue found in patch 5, the following fix will be applied while applying onto drm-misc-next :
========><====================================
--- a/drivers/gpu/drm/meson/meson_viu.c
+++ b/drivers/gpu/drm/meson/meson_viu.c
@@ -407,7 +407,7 @@ void meson_viu_init(struct meson_drm *priv)
VIU_OSD_BLEND_HOLD_LINES(4),
priv->io_base + _REG(VIU_OSD_BLEND_CTRL));

- writel_relaxed(VIU_OSD1_POSTBLD_SRC_OSD1,
+ writel_relaxed(OSD_BLEND_PATH_SEL_ENABLE,
priv->io_base + _REG(OSD1_BLEND_SRC_CTRL));
writel_relaxed(OSD_BLEND_PATH_SEL_ENABLE,
priv->io_base + _REG(OSD2_BLEND_SRC_CTRL));
========><====================================

modetest -M meson -s 34:800x600 -P 35@39:800x600@AR24 -P 37@39:800x600@NV12
modetest -M meson -s 34:800x600 -P 35@39:800x600@AR24 -P 37@39:800x600*2@NV12
modetest -M meson -s 34:800x600 -P 35@39:400x300*2@AR24 -P 37@39:1600x600*0.5@NV12
modetest -M meson -s 34:3840x2160-60 -P 35@39:3840x2160@AR24 -P 37@39:3840x2160@NV12
modetest -M meson -s 34:3840x2160-60 -P 35@39:1920x1080*2@AR24 -P 37@39:3840x2160*0.8@NV12

No visual issues

>
> and push to drm-misc-next.
>
> Neil
>

Applying to drm-misc-next with the fixes

Neil