From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Damien Lespiau <damien.lespiau@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v6 2/8] drm/i915: Use cached cdclk value
Date: Mon, 15 Jun 2015 14:38:12 +0100 [thread overview]
Message-ID: <557ED544.40706@linux.intel.com> (raw)
In-Reply-To: <20150615130941.GE4361@strange.ger.corp.intel.com>
On 06/15/2015 02:09 PM, Damien Lespiau wrote:
> On Mon, Jun 15, 2015 at 01:40:24PM +0100, Tvrtko Ursulin wrote:
>>
>> On 06/15/2015 01:14 PM, Damien Lespiau wrote:
>>> On Mon, Jun 15, 2015 at 01:54:40PM +0200, Daniel Vetter wrote:
>>>> On Wed, Jun 03, 2015 at 03:45:08PM +0300, Mika Kahola wrote:
>>>>> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>>>>
>>>>> Rather than reading out the current cdclk value use the cached value we
>>>>> have tucked away in dev_priv.
>>>>>
>>>>> v2: Rebased to the latest
>>>>> v3: Rebased to the latest
>>>>> v4: Fix for patch style problems
>>>>>
>>>>> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>>>> Signed-off-by: Mika Kahola <mika.kahola@intel.com>
>>>>
>>>> This patch needs to be extended to also cover the recently added
>>>> skl_max_scale. Tvrtko has recently written a patch to add some checks to
>>>> that code too, would be good to resurrect that too. Chandra can help with
>>>> any questions wrt the skl scaler code.
>>>
>>> Not quite I'm afraid. The CDCLK used in skl_max_scale() has to be part
>>> of the atomic state, even bumping CDCLK if possible/needed.
>>>
>>> If you use the cached cdclk in skl_max_scale(), it won't do the right
>>> thing when CDCLK is off (ie cached frew is the fallback 24Mhz ref clock)
>>> and we try to do the first modeset before waking up the display.
>>>
>>> I filed a bug about it already to track it:
>>>
>>> https://bugs.freedesktop.org/show_bug.cgi?id=90874
>>
>> I know nothing about these specific clocks, but FWIW, my patch was only
>> about enabling new platforms - making skl_max_scale more robust in cases
>> where clock querying does not yet work correctly.
>>
>> My reasoning was based on a comment from Ville that one of those two clocks
>> must never be lower than the other.
>>
>> So it sounded reasonable to ignore such cases ie. assume no scaling is
>> possible and allow a normal (unscaled) modeset to succeed rather than fail
>> it and display nothing.
>
> So to be more specific, I believe this is because we detect CDCLK as
> being "disabled" or on the ref clock in simulation?
Probably a reference clock. It definitely wasn't zero since
skl_max_scale already handles that. But I forgot the exact details.
> Generally speaking, it's questionable if we want to work around such
> limitations in the code like that, I'd rather go for defaulting to max
> CDCLK in simulation.
>
> In this particular case, we really shouldn't get cdclk < crtc_clock at
> this point, I'd expect the cdclk we use (probably part of the atomic
> state) to be bumped to cover crtc_clock prior to plane checks (See
> Marteen's [PATCH v3 19/19] drm/i915: Make cdclk part of the atomic
> state.), I guess we could add a WARN_ON(cdclk < crtc_clock) in
> skl_max_scale() to ensure that's indeed the case?
WARN_ON sounds fine to me. For the other considerations - you're the
expert. :)
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-06-15 13:38 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-03 12:45 [PATCH v6 0/8] All sort of cdclk stuff Mika Kahola
2015-06-03 12:45 ` [PATCH v6 1/8] drm/i915: Cache current cdclk frequency in dev_priv Mika Kahola
2015-06-03 12:45 ` [PATCH v6 2/8] drm/i915: Use cached cdclk value Mika Kahola
2015-06-15 11:54 ` Daniel Vetter
2015-06-15 12:14 ` Damien Lespiau
2015-06-15 12:40 ` Tvrtko Ursulin
2015-06-15 13:09 ` Damien Lespiau
2015-06-15 13:38 ` Tvrtko Ursulin [this message]
2015-06-15 12:21 ` Kahola, Mika
2015-06-15 13:05 ` Daniel Vetter
2015-06-15 13:15 ` Damien Lespiau
2015-06-15 21:24 ` Konduru, Chandra
2015-06-03 12:45 ` [PATCH v6 3/8] drm/i915: Unify ilk and hsw .get_aux_clock_divider Mika Kahola
2015-06-04 13:24 ` Jani Nikula
2015-06-04 15:17 ` Ville Syrjälä
2015-06-05 7:58 ` Jani Nikula
2015-06-03 12:45 ` [PATCH v6 4/8] drm/i915: Store max cdclk value in dev_priv Mika Kahola
2015-06-03 12:45 ` [PATCH v6 5/8] drm/i915: Don't enable IPS when pixel rate exceeds 95% Mika Kahola
2015-06-03 12:45 ` [PATCH v6 6/8] drm/i915: Add IS_BDW_ULX Mika Kahola
2015-06-03 12:45 ` [PATCH v6 7/8] drm/i915: BDW clock change support Mika Kahola
2015-06-16 13:01 ` Jani Nikula
2015-06-16 13:07 ` Jani Nikula
2015-06-29 11:24 ` Jani Nikula
2015-06-29 11:36 ` Mika Kahola
2015-06-29 11:42 ` Jani Nikula
2015-06-29 11:46 ` Ville Syrjälä
2015-06-29 15:52 ` Daniel Vetter
2015-10-06 10:13 ` [PATCH v6 7/8] drm/i915: BDW clock change support [regression] Daniel Vetter
2015-06-03 12:45 ` [PATCH v6 8/8] drm/i915: HSW cdclk support Mika Kahola
2015-06-04 7:51 ` shuang.he
2015-06-04 13:26 ` Jani Nikula
2015-06-04 12:26 ` [PATCH v6 0/8] All sort of cdclk stuff Damien Lespiau
2015-06-04 13:28 ` 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=557ED544.40706@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=damien.lespiau@intel.com \
--cc=intel-gfx@lists.freedesktop.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.