All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Heiko Stübner" <heiko@sntech.de>
To: Andy Yan <andy.yan@rock-chips.com>, chf.fritz@googlemail.com
Cc: Sandy Huang <hjc@rock-chips.com>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	linux-rockchip <linux-rockchip@lists.infradead.org>
Subject: Re: [PATCH] drm/rockchip: rk3288-lvds: honor DCLK edge via GRF CON15
Date: Tue, 14 Oct 2025 11:39:57 +0200	[thread overview]
Message-ID: <1983151.taCxCBeP46@diego> (raw)
In-Reply-To: <9dd924871a81364a922131461339dec2a45d434e.camel@googlemail.com>

Hi Christoph,

Am Montag, 15. September 2025, 19:35:22 Mitteleuropäische Sommerzeit schrieb Christoph Fritz:
> Set the DCLK edge (normal or invert) via GRF_SOC_CON15 when the specific
> drm_bus_flag is enabled. Keep track of the vop source in use so that the
> right DCLK (BIG: dclk0 or LIT: dclk1) gets set.
> 
> This change is especially necessary for RGB output configurations to
> actually propagate the DCLK inversion.
> 
> Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
> ---
>  drivers/gpu/drm/rockchip/rockchip_lvds.c | 17 +++++++++++++++++
>  drivers/gpu/drm/rockchip/rockchip_lvds.h |  4 ++++
>  2 files changed, 21 insertions(+)
> 
> diff --git a/drivers/gpu/drm/rockchip/rockchip_lvds.c b/drivers/gpu/drm/rockchip/rockchip_lvds.c
> index 2411260db51d7..08784c3ecf703 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_lvds.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_lvds.c
> @@ -235,8 +236,11 @@ static int rk3288_lvds_grf_config(struct drm_encoder *encoder,
>  				  struct drm_display_mode *mode)
>  {
>  	struct rockchip_lvds *lvds = encoder_to_lvds(encoder);
> +	u32 bus_flgs = lvds->connector.display_info.bus_flags;
> +	u8 con15_dclk = (bus_flgs & DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE) ? 1 : 0;
>  	u8 pin_hsync = (mode->flags & DRM_MODE_FLAG_PHSYNC) ? 1 : 0;
>  	u8 pin_dclk = (mode->flags & DRM_MODE_FLAG_PCSYNC) ? 1 : 0;
> +	unsigned int con15_dclk_mask;

I think the variables might be nicer named as dclk_inv and dclk_inv_mask
instead of referencing the that con15 thing.

But on the more important side

  CC [M]  drivers/gpu/drm/rockchip/rockchip_lvds.o
../drivers/gpu/drm/rockchip/rockchip_lvds.c: In function ‘rk3288_lvds_grf_config’:
../drivers/gpu/drm/rockchip/rockchip_lvds.c:239:28: error: ‘struct rockchip_lvds’ has no member named ‘connector’
  239 |         u32 bus_flgs = lvds->connector.display_info.bus_flags;
      |                            ^~

because of commit 40a382aae1d4 ("drm/rockchip: lvds: Convert to drm bridge").

So you'll need to adapt to that change.


Heiko




WARNING: multiple messages have this Message-ID (diff)
From: "Heiko Stübner" <heiko@sntech.de>
To: Andy Yan <andy.yan@rock-chips.com>, chf.fritz@googlemail.com
Cc: Sandy Huang <hjc@rock-chips.com>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	linux-rockchip <linux-rockchip@lists.infradead.org>
Subject: Re: [PATCH] drm/rockchip: rk3288-lvds: honor DCLK edge via GRF CON15
Date: Tue, 14 Oct 2025 11:39:57 +0200	[thread overview]
Message-ID: <1983151.taCxCBeP46@diego> (raw)
In-Reply-To: <9dd924871a81364a922131461339dec2a45d434e.camel@googlemail.com>

Hi Christoph,

Am Montag, 15. September 2025, 19:35:22 Mitteleuropäische Sommerzeit schrieb Christoph Fritz:
> Set the DCLK edge (normal or invert) via GRF_SOC_CON15 when the specific
> drm_bus_flag is enabled. Keep track of the vop source in use so that the
> right DCLK (BIG: dclk0 or LIT: dclk1) gets set.
> 
> This change is especially necessary for RGB output configurations to
> actually propagate the DCLK inversion.
> 
> Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
> ---
>  drivers/gpu/drm/rockchip/rockchip_lvds.c | 17 +++++++++++++++++
>  drivers/gpu/drm/rockchip/rockchip_lvds.h |  4 ++++
>  2 files changed, 21 insertions(+)
> 
> diff --git a/drivers/gpu/drm/rockchip/rockchip_lvds.c b/drivers/gpu/drm/rockchip/rockchip_lvds.c
> index 2411260db51d7..08784c3ecf703 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_lvds.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_lvds.c
> @@ -235,8 +236,11 @@ static int rk3288_lvds_grf_config(struct drm_encoder *encoder,
>  				  struct drm_display_mode *mode)
>  {
>  	struct rockchip_lvds *lvds = encoder_to_lvds(encoder);
> +	u32 bus_flgs = lvds->connector.display_info.bus_flags;
> +	u8 con15_dclk = (bus_flgs & DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE) ? 1 : 0;
>  	u8 pin_hsync = (mode->flags & DRM_MODE_FLAG_PHSYNC) ? 1 : 0;
>  	u8 pin_dclk = (mode->flags & DRM_MODE_FLAG_PCSYNC) ? 1 : 0;
> +	unsigned int con15_dclk_mask;

I think the variables might be nicer named as dclk_inv and dclk_inv_mask
instead of referencing the that con15 thing.

But on the more important side

  CC [M]  drivers/gpu/drm/rockchip/rockchip_lvds.o
../drivers/gpu/drm/rockchip/rockchip_lvds.c: In function ‘rk3288_lvds_grf_config’:
../drivers/gpu/drm/rockchip/rockchip_lvds.c:239:28: error: ‘struct rockchip_lvds’ has no member named ‘connector’
  239 |         u32 bus_flgs = lvds->connector.display_info.bus_flags;
      |                            ^~

because of commit 40a382aae1d4 ("drm/rockchip: lvds: Convert to drm bridge").

So you'll need to adapt to that change.


Heiko



_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

  reply	other threads:[~2025-10-14  9:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-15 17:35 [PATCH] drm/rockchip: rk3288-lvds: honor DCLK edge via GRF CON15 Christoph Fritz
2025-09-15 17:35 ` Christoph Fritz
2025-10-14  9:39 ` Heiko Stübner [this message]
2025-10-14  9:39   ` Heiko Stübner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1983151.taCxCBeP46@diego \
    --to=heiko@sntech.de \
    --cc=andy.yan@rock-chips.com \
    --cc=chf.fritz@googlemail.com \
    --cc=hjc@rock-chips.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.