From: Jani Nikula <jani.nikula@intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>,
"Madhav Chauhan" <madhav.chauhan@intel.com>
Cc: ander.conselvan.de.oliveira@intel.com, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/glk: CDCLK calculation changes for glk
Date: Tue, 07 Feb 2017 13:45:48 +0200 [thread overview]
Message-ID: <874m06w7f7.fsf@intel.com> (raw)
In-Reply-To: <20170207112449.GO31595@intel.com>
On Tue, 07 Feb 2017, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> On Tue, Feb 07, 2017 at 05:48:46AM -0500, Madhav Chauhan 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. So cdclk
>> should be calculated for the given pixclk as per that otherwise it may
>> lead to screen corruption for some scenarios.
>
> I this caused by the hw actually requiring some guardband or simply
> because of our sucky DPLL code not updating the dotclock with the actual
> value the hw is going to produce?
>
> If it's a genuine hw limitation is it documented? And if not has
> someone filed a spec issue for it? And what about other platforms
> (GLK isn't the only one without a guardband in our code after all)?
Indeed. What's the 99% based on? Where is it documented?
BR,
Jani.
>
>>
>> Signed-off-by: Madhav Chauhan <madhav.chauhan@intel.com>
>> ---
>> drivers/gpu/drm/i915/intel_display.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
>> index 45e5874..2e1bfe9 100644
>> --- a/drivers/gpu/drm/i915/intel_display.c
>> +++ b/drivers/gpu/drm/i915/intel_display.c
>> @@ -6544,9 +6544,9 @@ static int valleyview_calc_cdclk(struct drm_i915_private *dev_priv,
>>
>> static int glk_calc_cdclk(int max_pixclk)
>> {
>> - if (max_pixclk > 2 * 158400)
>> + if (max_pixclk > DIV_ROUND_UP(2 * 158400 * 99, 100))
>> return 316800;
>> - else if (max_pixclk > 2 * 79200)
>> + else if (max_pixclk > DIV_ROUND_UP(2 * 79200 * 99, 100))
>> return 158400;
>> else
>> return 79200;
>> --
>> 1.9.1
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-02-07 11:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-07 10:48 [PATCH] drm/i915/glk: CDCLK calculation changes for glk Madhav Chauhan
2017-02-07 11:22 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-02-07 11:24 ` [PATCH] " Ville Syrjälä
2017-02-07 11:45 ` Jani Nikula [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-02-16 7:21 Madhav Chauhan
2017-02-16 15:33 ` Jani Nikula
2017-03-16 10:31 ` 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
2017-03-20 18:03 Madhav Chauhan
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=874m06w7f7.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 \
--cc=ville.syrjala@linux.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