[Intel-gfx] [PATCH v2 07/18] drm/i915: Sanitize child devices later
Ville Syrjälä
ville.syrjala at linux.intel.com
Tue Feb 21 14:59:34 UTC 2023
On Tue, Feb 21, 2023 at 04:47:20PM +0200, Ville Syrjälä wrote:
> 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.
bat-jsl-1 has the same issue.
bat-rpls-1/2 also have a similar thing, but there the eDP is a ghost
so won't actually trip here.
I also noticed that bat-rplp-1 declares eDP on both DDI A and B,
and it's the one on DDI B that is the real one. Curious.
>
> 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
--
Ville Syrjälä
Intel
More information about the Intel-gfx
mailing list