On 05/10/2025 06:02, Marek Vasut wrote:
> The register PHTR bitfield TESTDOUT is not a single bit, but a
> bitfield. Add a MASK macro and a _TEST bitfield value, which is
> used by the driver to poll for completion. No functional change.
> 
> Signed-off-by: Marek Vasut <[email protected]>
> ---
> Cc: David Airlie <[email protected]>
> Cc: Geert Uytterhoeven <[email protected]>
> Cc: Kieran Bingham <[email protected]>
> Cc: Laurent Pinchart <[email protected]>
> Cc: Maarten Lankhorst <[email protected]>
> Cc: Magnus Damm <[email protected]>
> Cc: Maxime Ripard <[email protected]>
> Cc: Simona Vetter <[email protected]>
> Cc: Thomas Zimmermann <[email protected]>
> Cc: Tomi Valkeinen <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> ---
> V3: New patch
> ---
>  drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c      | 4 ++--
>  drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi_regs.h | 3 ++-
>  2 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c 
> b/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c
> index 5c73a513f678e..c24721a1eddf2 100644
> --- a/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c
> +++ b/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c
> @@ -316,8 +316,8 @@ rcar_mipi_dsi_post_init_phtw_v4h(struct rcar_mipi_dsi 
> *dsi,
>               WRITE_PHTW(0x01020100, 0x00000180);
>  
>               ret = read_poll_timeout(rcar_mipi_dsi_read, status,
> -                                     status & PHTR_TEST, 2000, 10000, false,
> -                                     dsi, PHTR);
> +                                     status & PHTR_TESTDOUT_TEST,
> +                                     2000, 10000, false, dsi, PHTR);
>               if (ret < 0) {
>                       dev_err(dsi->dev, "failed to test PHTR\n");
>                       return ret;
> diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi_regs.h 
> b/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi_regs.h
> index b8a719a13c006..90e8e3de3e580 100644
> --- a/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi_regs.h
> +++ b/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi_regs.h
> @@ -293,7 +293,8 @@
>  #define PHTW_TESTDIN_CODE(x)         (((x) & 0xff) << 0)
>  
>  #define PHTR                         0x1038
> -#define PHTR_TEST                    (1 << 16)
> +#define PHTW_TESTDOUT                        (0xff << 16)

Should this be PHTR_TESTDOUT?

> +#define PHTR_TESTDOUT_TEST           (1 << 16)
>  
>  #define PHTC                         0x103c
>  #define PHTC_TESTCLR                 (1 << 0)

Reply via email to