Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm: meson: global clean-up

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 <jmasson@baylibre.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://patchwork.freedesktop.org/patch/msgid/86pnn382e8.fsf@baylibre.com

authored by

Julien Masson and committed by
Neil Armstrong
e1012141 7eef9e61

+33 -26
+2
drivers/gpu/drm/meson/meson_dw_hdmi.c
··· 429 429 /* Enable internal pixclk, tmds_clk, spdif_clk, i2s_clk, cecclk */ 430 430 dw_hdmi_top_write_bits(dw_hdmi, HDMITX_TOP_CLK_CNTL, 431 431 0x3, 0x3); 432 + 433 + /* Enable cec_clk and hdcp22_tmdsclk_en */ 432 434 dw_hdmi_top_write_bits(dw_hdmi, HDMITX_TOP_CLK_CNTL, 433 435 0x3 << 4, 0x3 << 4); 434 436
+8 -4
drivers/gpu/drm/meson/meson_dw_hdmi.h
··· 100 100 #define HDMITX_TOP_INTR_RXSENSE_RISE BIT(6) 101 101 #define HDMITX_TOP_INTR_RXSENSE_FALL BIT(7) 102 102 103 - /* Bit 14:12 RW tmds_sel: 3'b000=Output zero; 3'b001=Output normal TMDS data; 103 + /* 104 + * Bit 14:12 RW tmds_sel: 3'b000=Output zero; 3'b001=Output normal TMDS data; 104 105 * 3'b010=Output PRBS data; 3'b100=Output shift pattern. Default 0. 105 106 * Bit 11: 9 RW shift_pttn_repeat: 0=New pattern every clk cycle; 1=New pattern 106 107 * every 2 clk cycles; ...; 7=New pattern every 8 clk cycles. Default 0. ··· 136 135 /* Bit 9: 0 RW tmds_clk_pttn[29:20]. Default 0. */ 137 136 #define HDMITX_TOP_TMDS_CLK_PTTN_23 (0x00B) 138 137 139 - /* Bit 1 RW shift_tmds_clk_pttn:1=Enable shifting clk pattern, 138 + /* 139 + * Bit 1 RW shift_tmds_clk_pttn:1=Enable shifting clk pattern, 140 140 * used when TMDS CLK rate = TMDS character rate /4. Default 0. 141 141 * Bit 0 R Reserved. Default 0. 142 142 * [ 1] shift_tmds_clk_pttn ··· 145 143 */ 146 144 #define HDMITX_TOP_TMDS_CLK_PTTN_CNTL (0x00C) 147 145 148 - /* Bit 0 RW revocmem_wr_fail: Read back 1 to indicate Host write REVOC MEM 146 + /* 147 + * Bit 0 RW revocmem_wr_fail: Read back 1 to indicate Host write REVOC MEM 149 148 * failure, write 1 to clear the failure flag. Default 0. 150 149 */ 151 150 #define HDMITX_TOP_REVOCMEM_STAT (0x00D) 152 151 153 - /* Bit 1 R filtered RxSense status 152 + /* 153 + * Bit 1 R filtered RxSense status 154 154 * Bit 0 R filtered HPD status. 155 155 */ 156 156 #define HDMITX_TOP_STAT0 (0x00E)
+14 -17
drivers/gpu/drm/meson/meson_registers.h
··· 398 398 #define VPP_PREBLEND_CURRENT_XY 0x1d24 399 399 #define VPP_POSTBLEND_CURRENT_XY 0x1d25 400 400 #define VPP_MISC 0x1d26 401 - #define VPP_PREBLEND_ENABLE BIT(6) 402 - #define VPP_POSTBLEND_ENABLE BIT(7) 403 - #define VPP_OSD2_ALPHA_PREMULT BIT(8) 404 - #define VPP_OSD1_ALPHA_PREMULT BIT(9) 405 - #define VPP_VD1_POSTBLEND BIT(10) 406 - #define VPP_VD2_POSTBLEND BIT(11) 407 - #define VPP_OSD1_POSTBLEND BIT(12) 408 - #define VPP_OSD2_POSTBLEND BIT(13) 409 - #define VPP_VD1_PREBLEND BIT(14) 410 - #define VPP_VD2_PREBLEND BIT(15) 411 - #define VPP_OSD1_PREBLEND BIT(16) 412 - #define VPP_OSD2_PREBLEND BIT(17) 413 - #define VPP_COLOR_MNG_ENABLE BIT(28) 401 + #define VPP_PREBLEND_ENABLE BIT(6) 402 + #define VPP_POSTBLEND_ENABLE BIT(7) 403 + #define VPP_OSD2_ALPHA_PREMULT BIT(8) 404 + #define VPP_OSD1_ALPHA_PREMULT BIT(9) 405 + #define VPP_VD1_POSTBLEND BIT(10) 406 + #define VPP_VD2_POSTBLEND BIT(11) 407 + #define VPP_OSD1_POSTBLEND BIT(12) 408 + #define VPP_OSD2_POSTBLEND BIT(13) 409 + #define VPP_VD1_PREBLEND BIT(14) 410 + #define VPP_VD2_PREBLEND BIT(15) 411 + #define VPP_OSD1_PREBLEND BIT(16) 412 + #define VPP_OSD2_PREBLEND BIT(17) 413 + #define VPP_COLOR_MNG_ENABLE BIT(28) 414 414 #define VPP_OFIFO_SIZE 0x1d27 415 415 #define VPP_OFIFO_SIZE_MASK GENMASK(13, 0) 416 416 #define VPP_OFIFO_SIZE_DEFAULT (0xfff << 20 | 0x1000) ··· 621 621 #define OSD34_SCI_WH_M1 0x3d29 622 622 #define OSD34_SCO_H_START_END 0x3d2a 623 623 #define OSD34_SCO_V_START_END 0x3d2b 624 + 624 625 /* viu2 */ 625 626 #define VIU2_ADDR_START 0x1e00 626 627 #define VIU2_ADDR_END 0x1eff ··· 1604 1603 #define OSD1_AFBCD_STATUS 0x31a8 1605 1604 #define OSD1_AFBCD_PIXEL_HSCOPE 0x31a9 1606 1605 #define OSD1_AFBCD_PIXEL_VSCOPE 0x31aa 1607 - #define VIU_MISC_CTRL1 0x1a07 1608 1606 1609 1607 /* add for gxm and 962e dv core2 */ 1610 1608 #define DOLBY_CORE2A_SWAP_CTRL1 0x3434 ··· 1618 1618 #define VPU_MAFBC_COMMAND 0x3a05 1619 1619 #define VPU_MAFBC_STATUS 0x3a06 1620 1620 #define VPU_MAFBC_SURFACE_CFG 0x3a07 1621 - 1622 - /* osd afbc on g12a */ 1623 1621 #define VPU_MAFBC_HEADER_BUF_ADDR_LOW_S0 0x3a10 1624 1622 #define VPU_MAFBC_HEADER_BUF_ADDR_HIGH_S0 0x3a11 1625 1623 #define VPU_MAFBC_FORMAT_SPECIFIER_S0 0x3a12 ··· 1738 1740 #define VPP_POST_BLEND_DUMMY_ALPHA 0x3969 1739 1741 #define VPP_RDARB_MODE 0x3978 1740 1742 #define VPP_RDARB_REQEN_SLV 0x3979 1741 - #define VPU_RDARB_MODE_L2C1 0x279d 1742 1743 1743 1744 #endif /* __MESON_REGISTERS_H */
+3 -1
drivers/gpu/drm/meson/meson_vclk.c
··· 496 496 regmap_write(priv->hhi, HHI_HDMI_PLL_CNTL, 0x0b3a0400 | m); 497 497 498 498 /* Enable and reset */ 499 + /* TODO: add specific macro for g12a here */ 499 500 regmap_update_bits(priv->hhi, HHI_HDMI_PLL_CNTL, 500 501 0x3 << 28, 0x3 << 28); 501 502 ··· 971 970 meson_venci_cvbs_clock_config(priv); 972 971 return; 973 972 } else if (target == MESON_VCLK_TARGET_DMT) { 974 - /* The DMT clock path is fixed after the PLL: 973 + /* 974 + * The DMT clock path is fixed after the PLL: 975 975 * - automatic PLL freq + OD management 976 976 * - vid_pll_div = VID_PLL_DIV_5 977 977 * - vclk_div = 2
+6 -4
drivers/gpu/drm/meson/meson_venc.c
··· 61 61 /* HHI Registers */ 62 62 #define HHI_GCLK_MPEG2 0x148 /* 0x52 offset in data sheet */ 63 63 #define HHI_VDAC_CNTL0 0x2F4 /* 0xbd offset in data sheet */ 64 - #define HHI_VDAC_CNTL0_G12A 0x2EC /* 0xbd offset in data sheet */ 64 + #define HHI_VDAC_CNTL0_G12A 0x2EC /* 0xbb offset in data sheet */ 65 65 #define HHI_VDAC_CNTL1 0x2F8 /* 0xbe offset in data sheet */ 66 - #define HHI_VDAC_CNTL1_G12A 0x2F0 /* 0xbe offset in data sheet */ 66 + #define HHI_VDAC_CNTL1_G12A 0x2F0 /* 0xbc offset in data sheet */ 67 67 #define HHI_HDMI_PHY_CNTL0 0x3a0 /* 0xe8 offset in data sheet */ 68 68 69 69 struct meson_cvbs_enci_mode meson_cvbs_enci_pal = { ··· 1085 1085 writel_relaxed(vmode->enci.video_mode, 1086 1086 priv->io_base + _REG(ENCI_VIDEO_MODE)); 1087 1087 1088 - /* Advanced Video Mode : 1088 + /* 1089 + * Advanced Video Mode : 1089 1090 * Demux shifting 0x2 1090 1091 * Blank line end at line17/22 1091 1092 * High bandwidth Luma Filter ··· 1600 1599 writel_relaxed(mode->video_mode, 1601 1600 priv->io_base + _REG(ENCI_VIDEO_MODE)); 1602 1601 1603 - /* Advanced Video Mode : 1602 + /* 1603 + * Advanced Video Mode : 1604 1604 * Demux shifting 0x2 1605 1605 * Blank line end at line17/22 1606 1606 * High bandwidth Luma Filter