public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 5/6] drm/i915/bios: Nuke DEVICE_TYPE_DP_DUAL_MODE_BITS
Date: Wed, 22 Dec 2021 11:34:47 +0200	[thread overview]
Message-ID: <8735mlyoco.fsf@intel.com> (raw)
In-Reply-To: <20211217155403.31477-6-ville.syrjala@linux.intel.com>

On Fri, 17 Dec 2021, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Replace the DEVICE_TYPE_DP_DUAL_MODE_BITS stuff with just
> a DP+HDMI check. The rest of the bits shouldn't really
> matter anyway.
>
> The slight change in behaviour here is that now we do look at
> the DEVICE_TYPE_NOT_HDMI_OUTPUT bit (via
> intel_bios_encoder_supports_hdmi()) when we previously ignored it.
> The one platform we know that has problems with that bit is VLV.
> But IIRC the problem was always that buggy VBTs basically never
> set that bit. So that should be OK since all it would do is make
> all DVI ports look like HDMI ports instead. Also can't imagine
> there are many VLV machines with actual DVI ports in existence.

One other thing is dropping the requirement for
DEVICE_TYPE_DIGITAL_OUTPUT. I don't know if that should be part of
intel_bios_encoder_supports_{hdmi,dp}(). *shrug*

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


>
> We still keep the rest of the dvo_port/aux_ch checks as we
> can't trust that DP+HDMI device type equals DP++ due to
> buggy VBTs.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_bios.c     | 10 ++++++----
>  drivers/gpu/drm/i915/display/intel_vbt_defs.h | 11 -----------
>  2 files changed, 6 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> index f5aa2c72b2fe..d1909ad28306 100644
> --- a/drivers/gpu/drm/i915/display/intel_bios.c
> +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> @@ -2684,10 +2684,12 @@ bool intel_bios_is_port_edp(struct drm_i915_private *i915, enum port port)
>  	return devdata && intel_bios_encoder_supports_edp(devdata);
>  }
>  
> -static bool child_dev_is_dp_dual_mode(const struct child_device_config *child)
> +static bool intel_bios_encoder_supports_dp_dual_mode(const struct intel_bios_encoder_data *devdata)
>  {
> -	if ((child->device_type & DEVICE_TYPE_DP_DUAL_MODE_BITS) !=
> -	    (DEVICE_TYPE_DP_DUAL_MODE & DEVICE_TYPE_DP_DUAL_MODE_BITS))
> +	const struct child_device_config *child = &devdata->child;
> +
> +	if (!intel_bios_encoder_supports_dp(devdata) ||
> +	    !intel_bios_encoder_supports_hdmi(devdata))
>  		return false;
>  
>  	if (dvo_port_type(child->dvo_port) == DVO_PORT_DPA)
> @@ -2707,7 +2709,7 @@ bool intel_bios_is_port_dp_dual_mode(struct drm_i915_private *i915,
>  	const struct intel_bios_encoder_data *devdata =
>  		intel_bios_encoder_data_lookup(i915, port);
>  
> -	return devdata && child_dev_is_dp_dual_mode(&devdata->child);
> +	return devdata && intel_bios_encoder_supports_dp_dual_mode(devdata);
>  }
>  
>  /**
> diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> index c23582769f34..a39d6cfea87a 100644
> --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> @@ -226,17 +226,6 @@ struct bdb_general_features {
>  #define DEVICE_TYPE_DIGITAL_OUTPUT	(1 << 1)
>  #define DEVICE_TYPE_ANALOG_OUTPUT	(1 << 0)
>  
> -#define DEVICE_TYPE_DP_DUAL_MODE_BITS \
> -	(DEVICE_TYPE_INTERNAL_CONNECTOR |	\
> -	 DEVICE_TYPE_MIPI_OUTPUT |		\
> -	 DEVICE_TYPE_COMPOSITE_OUTPUT |		\
> -	 DEVICE_TYPE_LVDS_SIGNALING |		\
> -	 DEVICE_TYPE_TMDS_DVI_SIGNALING |	\
> -	 DEVICE_TYPE_VIDEO_SIGNALING |		\
> -	 DEVICE_TYPE_DISPLAYPORT_OUTPUT |	\
> -	 DEVICE_TYPE_DIGITAL_OUTPUT |		\
> -	 DEVICE_TYPE_ANALOG_OUTPUT)
> -
>  #define DEVICE_CFG_NONE		0x00
>  #define DEVICE_CFG_12BIT_DVOB	0x01
>  #define DEVICE_CFG_12BIT_DVOC	0x02

-- 
Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2021-12-22  9:34 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-17 15:53 [Intel-gfx] [PATCH 0/6] drm/i915: Extend parse_ddi_port() to all g4x+ platforms Ville Syrjala
2021-12-17 15:53 ` [Intel-gfx] [PATCH 1/6] drm/i915/bios: Introduce has_ddi_port_info() Ville Syrjala
2021-12-22  8:48   ` Jani Nikula
2021-12-17 15:53 ` [Intel-gfx] [PATCH 2/6] drm/i915/bios: Use i915->vbt.ports[] on CHV Ville Syrjala
2021-12-22  9:05   ` Jani Nikula
2021-12-22 12:49     ` Ville Syrjälä
2021-12-22  9:13   ` Jani Nikula
2021-12-17 15:54 ` [Intel-gfx] [PATCH 3/6] drm/i915/bios: Use i915->vbt.ports[] for all g4x+ Ville Syrjala
2021-12-22  9:19   ` Jani Nikula
2021-12-17 15:54 ` [Intel-gfx] [PATCH 4/6] drm/i915/bios: Throw out the !has_ddi_port_info() codepaths Ville Syrjala
2021-12-22  9:25   ` Jani Nikula
2021-12-17 15:54 ` [Intel-gfx] [PATCH 5/6] drm/i915/bios: Nuke DEVICE_TYPE_DP_DUAL_MODE_BITS Ville Syrjala
2021-12-22  9:34   ` Jani Nikula [this message]
2021-12-22 12:53     ` Ville Syrjälä
2021-12-17 15:54 ` [Intel-gfx] [PATCH 6/6] drm/i915/hdmi: Ignore DP++ TMDS clock limit for native HDMI ports Ville Syrjala
2021-12-22  9:47   ` Jani Nikula
2021-12-22 12:46     ` Ville Syrjälä
2021-12-22 15:38   ` Ville Syrjälä
2021-12-22 16:17   ` [Intel-gfx] [PATCH v2 " Ville Syrjala
2021-12-17 17:17 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Extend parse_ddi_port() to all g4x+ platforms Patchwork
2021-12-17 19:56 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2021-12-22 17:32 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Extend parse_ddi_port() to all g4x+ platforms (rev2) Patchwork
2021-12-22 20:28 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-01-19 22:21 ` [Intel-gfx] [PATCH 0/6] drm/i915: Extend parse_ddi_port() to all g4x+ platforms Ville Syrjälä
2022-01-20 10:14   ` 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=8735mlyoco.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox