Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v2 07/18] drm/i915: Sanitize child devices later
Date: Tue, 21 Feb 2023 16:47:20 +0200	[thread overview]
Message-ID: <Y/TZeHrjdT/4bRkN@intel.com> (raw)
In-Reply-To: <20230220234046.29716-8-ville.syrjala@linux.intel.com>

On Tue, Feb 21, 2023 at 01:40:35AM +0200, Ville Syrjala wrote:
> diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> index f35ef3675d39..19be8862261b 100644
> --- a/drivers/gpu/drm/i915/display/intel_bios.c
> +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> @@ -2221,33 +2221,33 @@ static u8 map_ddc_pin(struct drm_i915_private *i915, u8 vbt_pin)
>  		    vbt_pin);
>  	return 0;
>  }
>  
> -static enum port get_port_by_ddc_pin(struct drm_i915_private *i915, u8 ddc_pin)
> +static struct intel_encoder *
> +get_encoder_by_ddc_pin(struct drm_i915_private *i915, u8 ddc_pin)
>  {
> -	enum port port;
> +	struct intel_encoder *encoder;
>  
>  	if (!ddc_pin)
> -		return PORT_NONE;
> +		return NULL;
>  
> -	for_each_port(port) {
> -		const struct intel_bios_encoder_data *devdata =
> -			i915->display.vbt.ports[port];
> +	for_each_intel_encoder(&i915->drm, encoder) {
> +		const struct intel_bios_encoder_data *devdata = encoder->devdata;
>  
>  		if (devdata && ddc_pin == devdata->child.ddc_pin)
> -			return port;
> +			return encoder;

This still screws up bat-jsl-3 where DDI A and DDI C both claim to use
the same ddc_pin. But DDI A is declared as eDP, so won't even use DDC.
Se we should just ignore it here. 

I suppose to correct fix would to look at the actually selected
ddc_pin/aux_ch here, rather than what the VBT declared.

>  	}
>  
> -	return PORT_NONE;
> +	return NULL;
>  }
>  

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2023-02-21 14:47 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-20 23:40 [Intel-gfx] [PATCH v2 00/18] drm/i915: Init DDI ports in VBT order Ville Syrjala
2023-02-20 23:40 ` [Intel-gfx] [PATCH v2 01/18] drm/i915: Populate dig_port->connected() before connector init Ville Syrjala
2023-02-20 23:40 ` [Intel-gfx] [PATCH v2 02/18] drm/i915: Fix SKL DDI A digital port .connected() Ville Syrjala
2023-02-20 23:40 ` [Intel-gfx] [PATCH v2 03/18] drm/i915: Get rid of the gm45 HPD live state nonsense Ville Syrjala
2023-02-20 23:40 ` [Intel-gfx] [PATCH v2 04/18] drm/i915: Introduce <platoform>_hotplug_mask() Ville Syrjala
2023-02-20 23:40 ` [Intel-gfx] [PATCH v2 05/18] drm/i915: Introduce intel_hpd_detection() Ville Syrjala
2023-02-20 23:40 ` [Intel-gfx] [PATCH v2 06/18] drm/i915: Check HPD live state during eDP probe Ville Syrjala
2023-02-20 23:40 ` [Intel-gfx] [PATCH v2 07/18] drm/i915: Sanitize child devices later Ville Syrjala
2023-02-21 14:47   ` Ville Syrjälä [this message]
2023-02-21 14:59     ` Ville Syrjälä
2023-02-20 23:40 ` [Intel-gfx] [PATCH v2 08/18] drm/i915: Split map_aux_ch() into per-platform arrays Ville Syrjala
2023-02-20 23:40 ` [Intel-gfx] [PATCH v2 09/18] drm/i915: Flip VBT DDC pin maps around Ville Syrjala
2023-02-20 23:40 ` [Intel-gfx] [PATCH v2 10/18] drm/i915: Nuke intel_bios_is_port_dp_dual_mode() Ville Syrjala
2023-02-20 23:40 ` [Intel-gfx] [PATCH v2 11/18] drm/i915: Remove bogus DDI-F from hsw/bdw output init Ville Syrjala
2023-02-20 23:40 ` [Intel-gfx] [PATCH v2 12/18] drm/i915: Introduce device info port_mask Ville Syrjala
2023-02-20 23:40 ` [Intel-gfx] [PATCH v2 13/18] drm/i915: Assert that device info bitmasks have enough bits Ville Syrjala
2023-02-20 23:40 ` [Intel-gfx] [PATCH v2 14/18] drm/i915: Assert that the port being initialized is valid Ville Syrjala
2023-02-20 23:40 ` [Intel-gfx] [PATCH v2 15/18] drm/i915: Beef up SDVO/HDMI port checks Ville Syrjala
2023-02-20 23:40 ` [Intel-gfx] [PATCH v2 16/18] drm/i915: Init DDI outputs based on port_mask on skl+ Ville Syrjala
2023-02-20 23:40 ` [Intel-gfx] [PATCH v2 17/18] drm/i915: Try to initialize DDI/ICL+ DSI ports for every VBT child device Ville Syrjala
2023-02-20 23:40 ` [Intel-gfx] [PATCH v2 18/18] drm/i915: Convert HSW/BDW to use VBT driven DDI probe Ville Syrjala
2023-02-21  0:10 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: Init DDI ports in VBT order (rev2) Patchwork
2023-02-21  0:33 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-02-21  3:31 ` [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=Y/TZeHrjdT/4bRkN@intel.com \
    --to=ville.syrjala@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox