All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Shobhit Kumar <shobhit.kumar@intel.com>
Subject: Re: [v4] drm/i915/skl: While sanitizing cdclock check the	SWF18 as well
Date: Thu, 05 Nov 2015 15:04:40 +0200	[thread overview]
Message-ID: <877flwmwbb.fsf@intel.com> (raw)
In-Reply-To: <1446726932-14078-1-git-send-email-shobhit.kumar@intel.com>

On Thu, 05 Nov 2015, Shobhit Kumar <shobhit.kumar@intel.com> wrote:
> SWF18 is set if the display has been intialized by the pre-os. It also
> gives what configuration is enabled on which pipe. In skl_sanitize_cdclk,
> the DPLL sanity check can pass even if GOP/VBIOS is not loaded as BIOS
> enables DPLL for integrated audio codec related programming.
> So fisrt check if SWF18 is set and then follow through with other DPLL
> and CDCLK verification. If not set then for sure we need to sanitize the
> cdclock.
>
> v2: Update the commit message for clarity (Siva)
> v3: Correct the mask to check for bits[23:0] instead of only bits[16:0].
>     Had missed checking for PIPE C altogether. Remaining are reserved (Siva)
> v4: Use ILK_SWF macro for SWF register definitions. Taken from Ville's patch
>     http://lists.freedesktop.org/archives/intel-gfx/2015-November/079480.html
>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Shobhit Kumar <shobhit.kumar@intel.com>

Pushed to drm-intel-next-queued, thanks for the patch and review.

BR,
Jani.

> ---
>  drivers/gpu/drm/i915/i915_reg.h      | 1 +
>  drivers/gpu/drm/i915/intel_display.c | 8 ++++++++
>  2 files changed, 9 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 9ee9481..e8f1d42 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -5005,6 +5005,7 @@ enum skl_disp_power_wells {
>  #define SWF0(i)	(dev_priv->info.display_mmio_offset + 0x70410 + (i) * 4)
>  #define SWF1(i)	(dev_priv->info.display_mmio_offset + 0x71410 + (i) * 4)
>  #define SWF3(i)	(dev_priv->info.display_mmio_offset + 0x72414 + (i) * 4)
> +#define SWF_ILK(i)	(0x4F000 + (i) * 4)
>  
>  /* Pipe B */
>  #define _PIPEBDSL		(dev_priv->info.display_mmio_offset + 0x71000)
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 103cacb..512747a 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -5761,6 +5761,14 @@ int skl_sanitize_cdclk(struct drm_i915_private *dev_priv)
>  	uint32_t cdctl = I915_READ(CDCLK_CTL);
>  	int freq = dev_priv->skl_boot_cdclk;
>  
> +	/*
> +	 * check if the pre-os intialized the display
> +	 * There is SWF18 scratchpad register defined which is set by the
> +	 * pre-os which can be used by the OS drivers to check the status
> +	 */
> +	if ((I915_READ(SWF_ILK(0x18)) & 0x00FFFFFF) == 0)
> +		goto sanitize;
> +
>  	/* Is PLL enabled and locked ? */
>  	if (!((lcpll1 & LCPLL_PLL_ENABLE) && (lcpll1 & LCPLL_PLL_LOCK)))
>  		goto sanitize;

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

  reply	other threads:[~2015-11-05 13:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-02 11:55 [PATCH] CDCLOCK Sanitization continued for SKL Shobhit Kumar
2015-11-02 11:55 ` [PATCH] drm/i915/skl: While sanitizing cdclock check the SWF18 as well Shobhit Kumar
2015-11-02 13:10   ` Jani Nikula
2015-11-02 13:19     ` Kumar, Shobhit
2015-11-02 16:37       ` Thulasimani, Sivakumar
2015-11-02 17:47         ` Kumar, Shobhit
2015-11-02 18:18           ` Thulasimani, Sivakumar
2015-11-03  2:59             ` Kumar, Shobhit
2015-11-05  7:43             ` [v2] " Shobhit Kumar
2015-11-05  9:35               ` [v3] " Shobhit Kumar
2015-11-05  9:38                 ` Thulasimani, Sivakumar
2015-11-05 11:23                 ` Ville Syrjälä
2015-11-05 12:35                   ` [v4] " Shobhit Kumar
2015-11-05 13:04                     ` Jani Nikula [this message]
2015-11-04  3:47   ` [PATCH] " Kumar, Shobhit
2015-11-03  3:12 ` [PATCH] CDCLOCK Sanitization continued for SKL Kumar, Shobhit

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=877flwmwbb.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=shobhit.kumar@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.