All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Cc: Ondrej Zary <linux@rainbow-software.org>
Subject: Re: [PATCH v2 1/3] drm/i915: Replace vbt edp.support with int_lvds_support
Date: Tue, 08 May 2018 17:18:47 +0300	[thread overview]
Message-ID: <874lji5iyg.fsf@intel.com> (raw)
In-Reply-To: <20180508140814.20105-1-ville.syrjala@linux.intel.com>

On Tue, 08 May 2018, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Replace dev_priv->vbt.edp.support with
> dev_priv->vbt.int_lvds_support. We'll want to extend its
> use beyond the LVDS vs. eDP case in the future.
>
> v2: Nuke the edp.support from parse_edp() (Jani)
>     Only clear int_lvds_support for gen5+ to preserve
>     the current behaviour (Jani)
>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Ondrej Zary <linux@rainbow-software.org>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  drivers/gpu/drm/i915/i915_drv.h   |  2 +-
>  drivers/gpu/drm/i915/intel_bios.c | 13 +++++++------
>  drivers/gpu/drm/i915/intel_lvds.c |  9 +++++----
>  3 files changed, 13 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 04e27806e581..3bdc7cfd4189 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1052,6 +1052,7 @@ struct intel_vbt_data {
>  	unsigned int lvds_vbt:1;
>  	unsigned int int_crt_support:1;
>  	unsigned int lvds_use_ssc:1;
> +	unsigned int int_lvds_support:1;
>  	unsigned int display_clock_mode:1;
>  	unsigned int fdi_rx_polarity_inverted:1;
>  	unsigned int panel_type:4;
> @@ -1067,7 +1068,6 @@ struct intel_vbt_data {
>  		int vswing;
>  		bool low_vswing;
>  		bool initialized;
> -		bool support;
>  		int bpp;
>  		struct edp_power_seq pps;
>  	} edp;
> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> index 702d3fab97fc..62cc9d3e20f5 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -518,8 +518,9 @@ parse_driver_features(struct drm_i915_private *dev_priv,
>  	if (!driver)
>  		return;
>  
> -	if (driver->lvds_config == BDB_DRIVER_FEATURE_EDP)
> -		dev_priv->vbt.edp.support = 1;
> +	if (INTEL_GEN(dev_priv) >= 5 &&
> +	    driver->lvds_config == BDB_DRIVER_FEATURE_EDP)
> +		dev_priv->vbt.int_lvds_support = 0;
>  
>  	DRM_DEBUG_KMS("DRRS State Enabled:%d\n", driver->drrs_enabled);
>  	/*
> @@ -541,11 +542,8 @@ parse_edp(struct drm_i915_private *dev_priv, const struct bdb_header *bdb)
>  	int panel_type = dev_priv->vbt.panel_type;
>  
>  	edp = find_section(bdb, BDB_EDP);
> -	if (!edp) {
> -		if (dev_priv->vbt.edp.support)
> -			DRM_DEBUG_KMS("No eDP BDB found but eDP panel supported.\n");
> +	if (!edp)
>  		return;
> -	}
>  
>  	switch ((edp->color_depth >> (panel_type * 2)) & 3) {
>  	case EDP_18BPP:
> @@ -1512,6 +1510,9 @@ init_vbt_defaults(struct drm_i915_private *dev_priv)
>  	dev_priv->vbt.int_tv_support = 1;
>  	dev_priv->vbt.int_crt_support = 1;
>  
> +	/* driver features */
> +	dev_priv->vbt.int_lvds_support = 1;
> +
>  	/* Default to using SSC */
>  	dev_priv->vbt.lvds_use_ssc = 1;
>  	/*
> diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
> index d35d2d50f595..05d012358df8 100644
> --- a/drivers/gpu/drm/i915/intel_lvds.c
> +++ b/drivers/gpu/drm/i915/intel_lvds.c
> @@ -965,6 +965,11 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)
>  	if (dmi_check_system(intel_no_lvds))
>  		return;
>  
> +	if (!dev_priv->vbt.int_lvds_support) {
> +		DRM_DEBUG_KMS("Internal LVDS support disabled by VBT\n");
> +		return;
> +	}
> +
>  	if (HAS_PCH_SPLIT(dev_priv))
>  		lvds_reg = PCH_LVDS;
>  	else
> @@ -975,10 +980,6 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)
>  	if (HAS_PCH_SPLIT(dev_priv)) {
>  		if ((lvds & LVDS_DETECTED) == 0)
>  			return;
> -		if (dev_priv->vbt.edp.support) {
> -			DRM_DEBUG_KMS("disable LVDS for eDP support\n");
> -			return;
> -		}
>  	}
>  
>  	pin = GMBUS_PIN_PANEL;

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

  reply	other threads:[~2018-05-08 14:16 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-08 12:41 [PATCH v2 1/3] drm/i915: Replace vbt edp.support with int_lvds_support Ville Syrjala
2018-05-08 12:41 ` [PATCH v2 2/3] drm/i915: Consult VBT "LVDS config" bits to determine whether internal LVDS is present Ville Syrjala
2018-05-08 14:08   ` [PATCH v3 " Ville Syrjala
2018-05-08 14:22     ` Jani Nikula
2018-05-16 14:34     ` Ville Syrjälä
2018-05-18 15:01   ` [PATCH v4 1/1] " Ville Syrjala
2018-05-25 15:02     ` Ville Syrjälä
2018-05-08 12:41 ` [PATCH v2 3/3] drm/i915: Eliminate the unused dev_priv->vbt.lvds_vbt Ville Syrjala
2018-05-08 13:29 ` [PATCH v2 1/3] drm/i915: Replace vbt edp.support with int_lvds_support Jani Nikula
2018-05-08 13:41   ` Ville Syrjälä
2018-05-08 14:08 ` Ville Syrjala
2018-05-08 14:18   ` Jani Nikula [this message]
2018-05-08 16:21 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [v2,1/3] drm/i915: Replace vbt edp.support with int_lvds_support (rev3) Patchwork
2018-05-08 16:22 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-05-08 16:41 ` ✓ Fi.CI.BAT: success " Patchwork
2018-05-08 19:47 ` ✓ Fi.CI.IGT: " Patchwork
2018-05-08 21:19 ` [PATCH v2 1/3] drm/i915: Replace vbt edp.support with int_lvds_support kbuild test robot
2018-05-08 22:39 ` kbuild test robot

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=874lji5iyg.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux@rainbow-software.org \
    --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 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.