All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Vivek Kasireddy <vivek.kasireddy@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/ehl: Check VBT before updating the transcoder for pipe
Date: Tue, 04 Feb 2020 12:50:25 +0200	[thread overview]
Message-ID: <87blqe39u6.fsf@intel.com> (raw)
In-Reply-To: <20200204000242.30542-1-vivek.kasireddy@intel.com>

On Mon, 03 Feb 2020, Vivek Kasireddy <vivek.kasireddy@intel.com> wrote:
> Since the pipe->transcoder mapping is not expected to change unless
> there is either eDP or DSI connectors present, check the VBT to confirm
> their presence in addition to checking TRANS_DDI_FUNC_CTL(transcoder).
> This additional check is needed on platforms like Elkhart Lake because
> we cannot just rely on GOP/Firmware programmed values in
> TRANS_DDI_FUNC_CTL(transcoder) before updating the transcoder mapping.
>
> This patch is only relevant to EHL -- and a no-op on others --
> because some of the PHYs are shared between the different DDIs and
> we rely on the VBT to present the most accurate information to the
> driver.
>
> Cc: Matt Roper <matthew.d.roper@intel.com>
> Cc: José Roberto de Souza <jose.souza@intel.com>
> Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index c0e5002ce64c..4b38f293bd88 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -10805,6 +10805,18 @@ static void hsw_get_ddi_pll(struct drm_i915_private *dev_priv, enum port port,
>  	pipe_config->shared_dpll = intel_get_shared_dpll_by_id(dev_priv, id);
>  }
>  
> +static bool ehl_vbt_edp_dsi_present(struct drm_i915_private *dev_priv,
> +				    enum transcoder transcoder)
> +{
> +	bool edp_present = intel_bios_is_port_present(dev_priv, PORT_A);
> +	bool dsi_present = intel_bios_is_dsi_present(dev_priv, NULL);
> +
> +	if (IS_ELKHARTLAKE(dev_priv))
> +		return transcoder == TRANSCODER_EDP ? edp_present : dsi_present;
> +
> +	return true;
> +}

One of those things... this jumps out and immediately feels all wrong,
just like ehl_vbt_ddi_d_present() feels all wrong in
intel_combo_phy.c. But I don't know what would be the right thing to do
without spending time that I don't have on this.

BR,
Jani.



> +
>  static bool hsw_get_transcoder_state(struct intel_crtc *crtc,
>  				     struct intel_crtc_state *pipe_config,
>  				     u64 *power_domain_mask,
> @@ -10844,7 +10856,8 @@ static bool hsw_get_transcoder_state(struct intel_crtc *crtc,
>  
>  		tmp = intel_de_read(dev_priv,
>  				    TRANS_DDI_FUNC_CTL(panel_transcoder));
> -		if (!(tmp & TRANS_DDI_FUNC_ENABLE))
> +		if (!(tmp & TRANS_DDI_FUNC_ENABLE) ||
> +		    !ehl_vbt_edp_dsi_present(dev_priv, panel_transcoder))
>  			continue;
>  
>  		/*

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

  reply	other threads:[~2020-02-04 11:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-04  0:02 [Intel-gfx] [PATCH] drm/i915/ehl: Check VBT before updating the transcoder for pipe Vivek Kasireddy
2020-02-04 10:50 ` Jani Nikula [this message]
2020-02-04 22:44   ` Vivek Kasireddy
2020-02-04 23:49     ` Souza, Jose
2020-02-04 22:13 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2020-02-06 22:50 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

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=87blqe39u6.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=vivek.kasireddy@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.