dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Anitha Chrisanthus <anitha.chrisanthus@intel.com>
Cc: dri-devel@lists.freedesktop.org, edmund.j.dea@intel.com
Subject: Re: [PATCH v2 1/8] drm/kmb: Work around for higher system clock
Date: Tue, 17 Aug 2021 20:53:52 +0200	[thread overview]
Message-ID: <YRwFwGY7BsO7CoO+@ravnborg.org> (raw)
In-Reply-To: <20210803220452.52379-1-anitha.chrisanthus@intel.com>

Hi Anitha,

On Tue, Aug 03, 2021 at 03:04:45PM -0700, Anitha Chrisanthus wrote:
> Use a different value for system clock offset in the
> ppl/llp ratio calculations for clocks higher than 500 Mhz.
> 
> Fixes: 98521f4d4b4c ("drm/kmb: Mipi DSI part of the display driver")
> Signed-off-by: Anitha Chrisanthus <anitha.chrisanthus@intel.com>
> ---
>  drivers/gpu/drm/kmb/kmb_dsi.c | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/kmb/kmb_dsi.c b/drivers/gpu/drm/kmb/kmb_dsi.c
> index 231041b269f5..7e2371ffcb18 100644
> --- a/drivers/gpu/drm/kmb/kmb_dsi.c
> +++ b/drivers/gpu/drm/kmb/kmb_dsi.c
> @@ -482,6 +482,10 @@ static u32 mipi_tx_fg_section_cfg(struct kmb_dsi *kmb_dsi,
>  	return 0;
>  }
>  
> +#define CLK_DIFF_LOW 50
> +#define CLK_DIFF_HI 60
> +#define SYSCLK_500  500
> +
>  static void mipi_tx_fg_cfg_regs(struct kmb_dsi *kmb_dsi, u8 frame_gen,
>  				struct mipi_tx_frame_timing_cfg *fg_cfg)
>  {
> @@ -492,7 +496,12 @@ static void mipi_tx_fg_cfg_regs(struct kmb_dsi *kmb_dsi, u8 frame_gen,
>  	/* 500 Mhz system clock minus 50 to account for the difference in
>  	 * MIPI clock speed in RTL tests
>  	 */
The comment should be updated to match the code.

	Sam

> -	sysclk = kmb_dsi->sys_clk_mhz - 50;
> +	if (kmb_dsi->sys_clk_mhz == SYSCLK_500) {
> +		sysclk = kmb_dsi->sys_clk_mhz - CLK_DIFF_LOW;
> +	} else {
> +		/* 700 Mhz clk*/
> +		sysclk = kmb_dsi->sys_clk_mhz - CLK_DIFF_HI;
> +	}
>  
>  	/* PPL-Pixel Packing Layer, LLP-Low Level Protocol
>  	 * Frame genartor timing parameters are clocked on the system clock,
> -- 
> 2.25.1

      parent reply	other threads:[~2021-08-17 18:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-03 22:04 [PATCH v2 1/8] drm/kmb: Work around for higher system clock Anitha Chrisanthus
2021-08-03 22:04 ` [PATCH v2 2/8] drm/kmb : W/A for 256B cache alignment for video Anitha Chrisanthus
2021-08-03 22:04 ` [PATCH v2 3/8] drm/kmb: Limit supported mode to 1080p Anitha Chrisanthus
2021-08-03 22:04 ` [PATCH v2 4/8] drm/kmb: Remove clearing DPHY regs Anitha Chrisanthus
2021-08-03 22:04 ` [PATCH v2 5/8] drm/kmb: Disable change of plane parameters Anitha Chrisanthus
2021-08-03 22:04 ` [PATCH v2 6/8] drm/kmb: Corrected typo in handle_lcd_irq Anitha Chrisanthus
2021-08-03 22:04 ` [PATCH v2 7/8] drm/kmb: Enable ADV bridge after modeset Anitha Chrisanthus
2021-08-03 22:04 ` [PATCH v2 8/8] drm/kmb: Enable support for fbcon (framebuffer console) Anitha Chrisanthus
2021-08-17 18:53 ` Sam Ravnborg [this message]

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=YRwFwGY7BsO7CoO+@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=anitha.chrisanthus@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=edmund.j.dea@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox