[PATCH v2] drm: meson: use match data to detect vpu compatibility

2019-08-22 Thread Julien Masson
This patch introduce new enum which contains all VPU family (GXBB, GXL, GXM and G12A). This enum is used to detect the VPU compatible with the device. We only need to set .data to the corresponding enum in the device table, no need to check .compatible string anymore. Signed-off-by: Julien

Re: [PATCH] drm: meson: use match data to detect vpu compatibility

2019-08-22 Thread Julien Masson
Hi Neil, On Thu 22 Aug 2019 at 16:14, Julien Masson wrote: > On 22/08/2019 11:03, Julien Masson wrote: >> This patch introduce new enum which contains all VPU family (GXBB, >> GXL, GXM and G12A). >> This enum is used to detect the VPU compatible with the device. >> &

[PATCH] drm: meson: use match data to detect vpu compatibility

2019-08-22 Thread Julien Masson
This patch introduce new enum which contains all VPU family (GXBB, GXL, GXM and G12A). This enum is used to detect the VPU compatible with the device. We only need to set .data to the corresponding enum in the device table, no need to check .compatible string anymore. Signed-off-by: Julien

[PATCH 2/9] drm: meson: crtc: use proper macros instead of magic constants

2019-06-25 Thread Julien Masson
This patch add new macros which describe couple bits field of the following registers: - VD1_BLEND_SRC_CTRL - VPP_SC_MISC Signed-off-by: Julien Masson --- drivers/gpu/drm/meson/meson_crtc.c | 17 +++-- drivers/gpu/drm/meson/meson_registers.h | 16 2 files

[PATCH 9/9] drm: meson: venc: set the correct macrovision max amplitude value

2019-06-25 Thread Julien Masson
According to the register description of ENCI_MACV_MAX_AMP, the macrovision max amplitude value should be: - hdmi 480i => 0xb - hdmi 576i => 0x7 The max value is 0x7ff (10 bits). Signed-off-by: Julien Masson --- drivers/gpu/drm/meson/meson_venc.c | 4 ++-- 1 file changed, 2 insertions

[PATCH 3/9] drm: meson: drv: use macro when initializing vpu

2019-06-25 Thread Julien Masson
This patch add new macro which is used to set WRARB/RDARB mode of the VPU. Signed-off-by: Julien Masson --- drivers/gpu/drm/meson/meson_drv.c | 26 + drivers/gpu/drm/meson/meson_registers.h | 1 + 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a

[PATCH 4/9] drm: meson: vpp: use proper macros instead of magic constants

2019-06-25 Thread Julien Masson
This patch add new macros which are used to set the following registers: - VPP_OSD_SCALE_COEF_IDX - VPP_DOLBY_CTRL - VPP_OFIFO_SIZE - VPP_HOLD_LINES - VPP_SC_MISC - VPP_VADJ_CTRL Signed-off-by: Julien Masson --- drivers/gpu/drm/meson/meson_registers.h | 8 drivers/gpu/drm/meson

[PATCH 6/9] drm: meson: venc: use proper macros instead of magic constants

2019-06-24 Thread Julien Masson
- VENC_VDAC_FIFO_CTRL - VENC_VDAC_DAC0_FILT_CTRL0 - VENC_INTCTRL Signed-off-by: Julien Masson --- drivers/gpu/drm/meson/meson_registers.h | 51 drivers/gpu/drm/meson/meson_venc.c | 155 +++- drivers/gpu/drm/meson/meson_venc_cvbs.c | 3 +- 3 files changed, 177

[PATCH 8/9] drm: meson: add macro used to enable HDMI PLL

2019-06-24 Thread Julien Masson
This patch add new macro HHI_HDMI_PLL_CNTL_EN which is used to enable HDMI PLL. Signed-off-by: Julien Masson --- drivers/gpu/drm/meson/meson_vclk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/meson/meson_vclk.c b/drivers/gpu/drm/meson/meson_vclk.c

[PATCH 7/9] drm: meson: global clean-up

2019-06-24 Thread Julien Masson
This patch aims to: - Add general and TODO comments - Respect coding style for multi-line comments - Align macro definitions - Remove useless macro Signed-off-by: Julien Masson --- drivers/gpu/drm/meson/meson_dw_hdmi.c | 2 ++ drivers/gpu/drm/meson/meson_dw_hdmi.h | 12 ++ drivers

[PATCH 5/9] drm: meson: viu: use proper macros instead of magic constants

2019-06-24 Thread Julien Masson
: Julien Masson --- drivers/gpu/drm/meson/meson_plane.c | 2 +- drivers/gpu/drm/meson/meson_registers.h | 27 drivers/gpu/drm/meson/meson_viu.c | 82 + 3 files changed, 72 insertions(+), 39 deletions(-) diff --git a/drivers/gpu/drm/meson/meson_plane.c b

[PATCH 1/9] drm: meson: mask value when writing bits relaxed

2019-06-24 Thread Julien Masson
The value used in the macro writel_bits_relaxed has to be masked since we don't want change the bits outside the mask. Signed-off-by: Julien Masson --- drivers/gpu/drm/meson/meson_registers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/

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

2019-06-24 Thread Julien Masson
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