All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Madhav Chauhan <madhav.chauhan@intel.com>,
	intel-gfx@lists.freedesktop.org
Cc: ander.conselvan.de.oliveira@intel.com
Subject: Re: [PATCH] drm/i915/glk: CDCLK calculation changes for glk
Date: Thu, 16 Feb 2017 17:33:15 +0200	[thread overview]
Message-ID: <87wpcqkv5w.fsf@intel.com> (raw)
In-Reply-To: <1487229700-1391-1-git-send-email-madhav.chauhan@intel.com>

On Thu, 16 Feb 2017, Madhav Chauhan <madhav.chauhan@intel.com> wrote:
> As per BSPEC, valid cdclk values for glk are 79.2, 158.4, 316.8 Mhz.
> Practically we can achive only 99% of these cdclk values(HW team
> checking on this). So cdclk should be calculated for the given pixclk as
> per that otherwise it may lead to screen corruption for some scenarios.
>
> v2: Rebased to new CDLCK code framework
>
> Signed-off-by: Madhav Chauhan <madhav.chauhan@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_cdclk.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_cdclk.c b/drivers/gpu/drm/i915/intel_cdclk.c
> index d643c0c..834df68 100644
> --- a/drivers/gpu/drm/i915/intel_cdclk.c
> +++ b/drivers/gpu/drm/i915/intel_cdclk.c
> @@ -1071,9 +1071,9 @@ static int bxt_calc_cdclk(int max_pixclk)
>  
>  static int glk_calc_cdclk(int max_pixclk)
>  {
> -	if (max_pixclk > 2 * 158400)
> +	if (max_pixclk > DIV_ROUND_UP(2 * 158400 * 99, 100))

Where do we ensure we don't use pixel clock 312841..316800? Clearly we
shouldn't use that because we can't guarantee it works, right?

Before we get the spec update to confirm what to do, I think we need a
comment here explaining what's going on.

BR,
Jani.

>  		return 316800;
> -	else if (max_pixclk > 2 * 79200)
> +	else if (max_pixclk > DIV_ROUND_UP(2 * 79200 * 99, 100))
>  		return 158400;
>  	else
>  		return 79200;

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2017-02-16 15:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-16  7:21 [PATCH] drm/i915/glk: CDCLK calculation changes for glk Madhav Chauhan
2017-02-16  7:53 ` ✗ Fi.CI.BAT: failure for drm/i915/glk: CDCLK calculation changes for glk (rev2) Patchwork
2017-02-16 13:34 ` ✓ Fi.CI.BAT: success " Patchwork
2017-02-16 15:33 ` Jani Nikula [this message]
2017-03-16 10:31   ` [PATCH] drm/i915/glk: CDCLK calculation changes for glk Chauhan, Madhav
2017-03-16 13:10     ` Jani Nikula
2017-03-16 13:23       ` Ander Conselvan De Oliveira
2017-03-16 13:30         ` Jani Nikula
2017-03-17 13:40           ` Chauhan, Madhav
2017-03-20  8:00             ` Chauhan, Madhav
  -- strict thread matches above, loose matches on Subject: below --
2017-03-20 18:03 Madhav Chauhan
2017-02-07 10:48 Madhav Chauhan
2017-02-07 11:24 ` Ville Syrjälä
2017-02-07 11:45   ` Jani Nikula

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=87wpcqkv5w.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=ander.conselvan.de.oliveira@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=madhav.chauhan@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 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.