[PATCH v2 4/4] drm: rcar-du: lvds: Rename pclk enable/disable functions
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Mon Aug 22 13:52:01 UTC 2022
Hi Tomi,
Thank you for the patch.
On Mon, Aug 22, 2022 at 04:05:12PM +0300, Tomi Valkeinen wrote:
> From: Tomi Valkeinen <tomi.valkeinen+renesas at ideasonboard.com>
>
> Rename LVDS pclk enable/disable functions to match what we use for DSI.
I'd explain here the rationale for the new names:
The DU driver uses the rcar_lvds_clk_enable() and
rcar_lvds_clk_disable() functions enable or disable the pixel clock
generated by the LVDS encoder, as it requires that clock for proper DU
operation. Rename the functions by replacing "clk" with "pclk" to make
it clearer that they related to the pixel clock.
Then the patch could move to the beginning of the series.
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas at ideasonboard.com>
> ---
> drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 4 ++--
> drivers/gpu/drm/rcar-du/rcar_lvds.c | 4 ++--
> drivers/gpu/drm/rcar-du/rcar_lvds.h | 10 +++++-----
> 3 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
> index 31e33270e6db..3619e1ddeb62 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
> @@ -745,7 +745,7 @@ static void rcar_du_crtc_atomic_enable(struct drm_crtc *crtc,
> const struct drm_display_mode *mode =
> &crtc->state->adjusted_mode;
>
> - rcar_lvds_clk_enable(bridge, mode->clock * 1000);
> + rcar_lvds_pclk_enable(bridge, mode->clock * 1000);
> }
>
> /*
> @@ -790,7 +790,7 @@ static void rcar_du_crtc_atomic_disable(struct drm_crtc *crtc,
> * Disable the LVDS clock output, see
> * rcar_du_crtc_atomic_enable().
> */
> - rcar_lvds_clk_disable(bridge);
> + rcar_lvds_pclk_disable(bridge);
> }
>
> if ((rcdu->info->dsi_clk_mask & BIT(rcrtc->index)) &&
> diff --git a/drivers/gpu/drm/rcar-du/rcar_lvds.c b/drivers/gpu/drm/rcar-du/rcar_lvds.c
> index d85aa4bc7f84..f438d7d858c7 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_lvds.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_lvds.c
> @@ -306,7 +306,7 @@ static void rcar_lvds_pll_setup_d3_e3(struct rcar_lvds *lvds, unsigned int freq)
> * Clock - D3/E3 only
> */
>
> -int rcar_lvds_clk_enable(struct drm_bridge *bridge, unsigned long freq)
> +int rcar_lvds_pclk_enable(struct drm_bridge *bridge, unsigned long freq)
> {
> struct rcar_lvds *lvds = bridge_to_rcar_lvds(bridge);
> int ret;
> @@ -326,7 +326,7 @@ int rcar_lvds_clk_enable(struct drm_bridge *bridge, unsigned long freq)
> }
> EXPORT_SYMBOL_GPL(rcar_lvds_clk_enable);
>
> -void rcar_lvds_clk_disable(struct drm_bridge *bridge)
> +void rcar_lvds_pclk_disable(struct drm_bridge *bridge)
> {
> struct rcar_lvds *lvds = bridge_to_rcar_lvds(bridge);
>
> diff --git a/drivers/gpu/drm/rcar-du/rcar_lvds.h b/drivers/gpu/drm/rcar-du/rcar_lvds.h
> index 3097bf749bec..bee7033b60d6 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_lvds.h
> +++ b/drivers/gpu/drm/rcar-du/rcar_lvds.h
> @@ -13,17 +13,17 @@
> struct drm_bridge;
>
> #if IS_ENABLED(CONFIG_DRM_RCAR_LVDS)
> -int rcar_lvds_clk_enable(struct drm_bridge *bridge, unsigned long freq);
> -void rcar_lvds_clk_disable(struct drm_bridge *bridge);
> +int rcar_lvds_pclk_enable(struct drm_bridge *bridge, unsigned long freq);
> +void rcar_lvds_pclk_disable(struct drm_bridge *bridge);
> bool rcar_lvds_dual_link(struct drm_bridge *bridge);
> bool rcar_lvds_is_connected(struct drm_bridge *bridge);
> #else
> -static inline int rcar_lvds_clk_enable(struct drm_bridge *bridge,
> - unsigned long freq)
> +static inline int rcar_lvds_pclk_enable(struct drm_bridge *bridge,
> + unsigned long freq)
> {
> return -ENOSYS;
> }
> -static inline void rcar_lvds_clk_disable(struct drm_bridge *bridge) { }
> +static inline void rcar_lvds_pclk_disable(struct drm_bridge *bridge) { }
> static inline bool rcar_lvds_dual_link(struct drm_bridge *bridge)
> {
> return false;
--
Regards,
Laurent Pinchart
More information about the dri-devel
mailing list