diff mbox series

[v2,11/14] drm/msm/hdmi: expand the HDMI_CFG macro

Message ID 20240522-fd-hdmi-hpd-v2-11-c30bdb7c5c7e@linaro.org (mailing list archive)
State New, archived
Headers show
Series drm/msm/hdmi: rework and fix the HPD even generation | expand

Commit Message

Dmitry Baryshkov May 22, 2024, 10:51 a.m. UTC
Expand the HDMI_CFG() macro in HDMI config description. It has no added
value other than hiding some boilerplate declarations.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/gpu/drm/msm/hdmi/hdmi.c | 16 ++++++++--------
 drivers/gpu/drm/msm/hdmi/hdmi.h |  2 +-
 2 files changed, 9 insertions(+), 9 deletions(-)

Comments

Jessica Zhang June 19, 2024, 6:11 p.m. UTC | #1
On 5/22/2024 3:51 AM, Dmitry Baryshkov wrote:
> Expand the HDMI_CFG() macro in HDMI config description. It has no added
> value other than hiding some boilerplate declarations.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com>

> ---
>   drivers/gpu/drm/msm/hdmi/hdmi.c | 16 ++++++++--------
>   drivers/gpu/drm/msm/hdmi/hdmi.h |  2 +-
>   2 files changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c
> index c39a1f3a7505..e160a23e962e 100644
> --- a/drivers/gpu/drm/msm/hdmi/hdmi.c
> +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c
> @@ -223,24 +223,24 @@ int msm_hdmi_modeset_init(struct hdmi *hdmi,
>    * The hdmi device:
>    */
>   
> -#define HDMI_CFG(item, entry) \
> -	.item ## _names = item ##_names_ ## entry, \
> -	.item ## _cnt   = ARRAY_SIZE(item ## _names_ ## entry)
> -
>   static const char *pwr_reg_names_8960[] = {"core-vdda"};
>   static const char *pwr_clk_names_8960[] = {"core", "master_iface", "slave_iface"};
>   
>   static const struct hdmi_platform_config hdmi_tx_8960_config = {
> -		HDMI_CFG(pwr_reg, 8960),
> -		HDMI_CFG(pwr_clk, 8960),
> +	.pwr_reg_names = pwr_reg_names_8960,
> +	.pwr_reg_cnt = ARRAY_SIZE(pwr_reg_names_8960),
> +	.pwr_clk_names = pwr_clk_names_8960,
> +	.pwr_clk_cnt = ARRAY_SIZE(pwr_clk_names_8960),
>   };
>   
>   static const char *pwr_reg_names_8x74[] = {"core-vdda", "core-vcc"};
>   static const char *pwr_clk_names_8x74[] = {"iface", "core", "mdp_core", "alt_iface"};
>   
>   static const struct hdmi_platform_config hdmi_tx_8974_config = {
> -		HDMI_CFG(pwr_reg, 8x74),
> -		HDMI_CFG(pwr_clk, 8x74),
> +	.pwr_reg_names = pwr_reg_names_8x74,
> +	.pwr_reg_cnt = ARRAY_SIZE(pwr_reg_names_8x74),
> +	.pwr_clk_names = pwr_clk_names_8x74,
> +	.pwr_clk_cnt = ARRAY_SIZE(pwr_clk_names_8x74),
>   };
>   
>   /*
> diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.h b/drivers/gpu/drm/msm/hdmi/hdmi.h
> index 1e346e697f8e..2a98efa8b6bd 100644
> --- a/drivers/gpu/drm/msm/hdmi/hdmi.h
> +++ b/drivers/gpu/drm/msm/hdmi/hdmi.h
> @@ -89,7 +89,7 @@ struct hdmi_platform_config {
>   	const char **pwr_reg_names;
>   	int pwr_reg_cnt;
>   
> -	/* clks that need to be on for hpd: */
> +	/* clks that need to be on: */
>   	const char **pwr_clk_names;
>   	int pwr_clk_cnt;
>   };
> 
> -- 
> 2.39.2
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c
index c39a1f3a7505..e160a23e962e 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi.c
@@ -223,24 +223,24 @@  int msm_hdmi_modeset_init(struct hdmi *hdmi,
  * The hdmi device:
  */
 
-#define HDMI_CFG(item, entry) \
-	.item ## _names = item ##_names_ ## entry, \
-	.item ## _cnt   = ARRAY_SIZE(item ## _names_ ## entry)
-
 static const char *pwr_reg_names_8960[] = {"core-vdda"};
 static const char *pwr_clk_names_8960[] = {"core", "master_iface", "slave_iface"};
 
 static const struct hdmi_platform_config hdmi_tx_8960_config = {
-		HDMI_CFG(pwr_reg, 8960),
-		HDMI_CFG(pwr_clk, 8960),
+	.pwr_reg_names = pwr_reg_names_8960,
+	.pwr_reg_cnt = ARRAY_SIZE(pwr_reg_names_8960),
+	.pwr_clk_names = pwr_clk_names_8960,
+	.pwr_clk_cnt = ARRAY_SIZE(pwr_clk_names_8960),
 };
 
 static const char *pwr_reg_names_8x74[] = {"core-vdda", "core-vcc"};
 static const char *pwr_clk_names_8x74[] = {"iface", "core", "mdp_core", "alt_iface"};
 
 static const struct hdmi_platform_config hdmi_tx_8974_config = {
-		HDMI_CFG(pwr_reg, 8x74),
-		HDMI_CFG(pwr_clk, 8x74),
+	.pwr_reg_names = pwr_reg_names_8x74,
+	.pwr_reg_cnt = ARRAY_SIZE(pwr_reg_names_8x74),
+	.pwr_clk_names = pwr_clk_names_8x74,
+	.pwr_clk_cnt = ARRAY_SIZE(pwr_clk_names_8x74),
 };
 
 /*
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.h b/drivers/gpu/drm/msm/hdmi/hdmi.h
index 1e346e697f8e..2a98efa8b6bd 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi.h
+++ b/drivers/gpu/drm/msm/hdmi/hdmi.h
@@ -89,7 +89,7 @@  struct hdmi_platform_config {
 	const char **pwr_reg_names;
 	int pwr_reg_cnt;
 
-	/* clks that need to be on for hpd: */
+	/* clks that need to be on: */
 	const char **pwr_clk_names;
 	int pwr_clk_cnt;
 };