Re: [PATCH] drm: lcdif: Use adjusted_mode .clock instead of .crtc_clock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Freitag, 31. Mai 2024, 22:27:21 CEST schrieb Marek Vasut:
> In case an upstream bridge modified the required clock frequency
> in its .atomic_check callback by setting adjusted_mode.clock ,
> make sure that clock frequency is generated by the LCDIFv3 block.
> 
> This is useful e.g. when LCDIFv3 feeds DSIM which feeds TC358767
> with (e)DP output, where the TC358767 expects precise timing on
> its input side, the precise timing must be generated by the LCDIF.
> 
> Signed-off-by: Marek Vasut <marex@xxxxxxx>

With the other rc358767 patches in place, this does the trick.
Reviewed-by: Alexander Stein <alexander.stein@xxxxxxxxxxxxxxx>

> ---
> Cc: Daniel Vetter <daniel@xxxxxxxx>
> Cc: David Airlie <airlied@xxxxxxxxx>
> Cc: Fabio Estevam <festevam@xxxxxxxxx>
> Cc: Lucas Stach <l.stach@xxxxxxxxxxxxxx>
> Cc: Lukas F. Hartmann <lukas@xxxxxxxxx>
> Cc: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
> Cc: Maxime Ripard <mripard@xxxxxxxxxx>
> Cc: Pengutronix Kernel Team <kernel@xxxxxxxxxxxxxx>
> Cc: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
> Cc: Shawn Guo <shawnguo@xxxxxxxxxx>
> Cc: Stefan Agner <stefan@xxxxxxxx>
> Cc: Thomas Zimmermann <tzimmermann@xxxxxxx>
> Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
> Cc: imx@xxxxxxxxxxxxxxx
> Cc: kernel@xxxxxxxxxxxxxxxxxx
> Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
> ---
>  drivers/gpu/drm/mxsfb/lcdif_kms.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/mxsfb/lcdif_kms.c b/drivers/gpu/drm/mxsfb/lcdif_kms.c
> index 2541d2de4e45f..dbd42cc1da87f 100644
> --- a/drivers/gpu/drm/mxsfb/lcdif_kms.c
> +++ b/drivers/gpu/drm/mxsfb/lcdif_kms.c
> @@ -407,8 +407,7 @@ static void lcdif_crtc_mode_set_nofb(struct drm_crtc_state *crtc_state,
>  	struct drm_display_mode *m = &crtc_state->adjusted_mode;
>  
>  	DRM_DEV_DEBUG_DRIVER(drm->dev, "Pixel clock: %dkHz (actual: %dkHz)\n",
> -			     m->crtc_clock,
> -			     (int)(clk_get_rate(lcdif->clk) / 1000));
> +			     m->clock, (int)(clk_get_rate(lcdif->clk) / 1000));
>  	DRM_DEV_DEBUG_DRIVER(drm->dev, "Bridge bus_flags: 0x%08X\n",
>  			     lcdif_crtc_state->bus_flags);
>  	DRM_DEV_DEBUG_DRIVER(drm->dev, "Mode flags: 0x%08X\n", m->flags);
> @@ -538,7 +537,7 @@ static void lcdif_crtc_atomic_enable(struct drm_crtc *crtc,
>  	struct drm_device *drm = lcdif->drm;
>  	dma_addr_t paddr;
>  
> -	clk_set_rate(lcdif->clk, m->crtc_clock * 1000);
> +	clk_set_rate(lcdif->clk, m->clock * 1000);
>  
>  	pm_runtime_get_sync(drm->dev);
>  
> 


-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/






[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux