Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Imre Deak <imre.deak@intel.com>
Cc: "intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"Zanoni, Paulo R" <paulo.r.zanoni@intel.com>
Subject: Re: [PATCH v3 3/8] drm/i915: Init aux_ch for HDMI ports too
Date: Wed, 31 Oct 2018 10:56:33 -0700	[thread overview]
Message-ID: <20181031175633.GE2396@intel.com> (raw)
In-Reply-To: <20181031173658.GD16496@ideak-desk.fi.intel.com>

On Wed, Oct 31, 2018 at 07:36:58PM +0200, Imre Deak wrote:
> On Wed, Oct 31, 2018 at 10:29:51AM -0700, Rodrigo Vivi wrote:
> > On Wed, Oct 31, 2018 at 05:14:52PM +0000, Souza, Jose wrote:
> > > On Wed, 2018-10-31 at 18:26 +0200, Imre Deak wrote:
> > > > From ICL onwards DDI/TypeC ports - even in HDMI static mode - need to
> > > > know
> > > > which AUX CH belongs to them, so initialize aux_ch for those ports
> > > > too.
> > > > For consistency do this for all HDMI ports, not only for DDI/TypeC
> > > > ones.
> > > > 
> > > > Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> > > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > Cc: José Roberto de Souza <jose.souza@intel.com>
> > > > Signed-off-by: Imre Deak <imre.deak@intel.com>
> > > > ---
> > > >  drivers/gpu/drm/i915/intel_ddi.c  | 1 +
> > > >  drivers/gpu/drm/i915/intel_dp.c   | 2 +-
> > > >  drivers/gpu/drm/i915/intel_hdmi.c | 1 +
> > > >  3 files changed, 3 insertions(+), 1 deletion(-)
> > > > 
> > > > diff --git a/drivers/gpu/drm/i915/intel_ddi.c
> > > > b/drivers/gpu/drm/i915/intel_ddi.c
> > > > index 32a080265d03..3739ef003819 100644
> > > > --- a/drivers/gpu/drm/i915/intel_ddi.c
> > > > +++ b/drivers/gpu/drm/i915/intel_ddi.c
> > > > @@ -3852,6 +3852,7 @@ void intel_ddi_init(struct drm_i915_private
> > > > *dev_priv, enum port port)
> > > >  			(DDI_BUF_PORT_REVERSAL | DDI_A_4_LANES);
> > > >  	intel_dig_port->dp.output_reg = INVALID_MMIO_REG;
> > > >  	intel_dig_port->max_lanes =
> > > > intel_ddi_max_lanes(intel_dig_port);
> > > > +	intel_dig_port->aux_ch = intel_aux_ch(dev_priv, port);
> > > >  
> > > >  	switch (port) {
> > > >  	case PORT_A:
> > > > diff --git a/drivers/gpu/drm/i915/intel_dp.c
> > > > b/drivers/gpu/drm/i915/intel_dp.c
> > > > index 5530c604c694..6645c9faca9a 100644
> > > > --- a/drivers/gpu/drm/i915/intel_dp.c
> > > > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > > > @@ -1654,7 +1654,6 @@ intel_dp_aux_init(struct intel_dp *intel_dp)
> > > >  	struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
> > > >  	struct intel_encoder *encoder = &dig_port->base;
> > > >  
> > > > -	dig_port->aux_ch = intel_aux_ch(dev_priv, encoder->port);
> > > >  	intel_dp->aux_power_domain = intel_aux_power_domain(intel_dp);
> > > >  
> > > >  	if (INTEL_GEN(dev_priv) >= 9) {
> > > > @@ -6706,6 +6705,7 @@ bool intel_dp_init(struct drm_i915_private
> > > > *dev_priv,
> > > >  	if (port != PORT_A)
> > > >  		intel_infoframe_init(intel_dig_port);
> > > >  
> > > > +	intel_dig_port->aux_ch = intel_aux_ch(dev_priv, port);
> > > >  	if (!intel_dp_init_connector(intel_dig_port, intel_connector))
> > > >  		goto err_init_connector;
> > > >  
> > > > diff --git a/drivers/gpu/drm/i915/intel_hdmi.c
> > > > b/drivers/gpu/drm/i915/intel_hdmi.c
> > > > index 129b880bce64..b50c5497048a 100644
> > > > --- a/drivers/gpu/drm/i915/intel_hdmi.c
> > > > +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> > > > @@ -2506,5 +2506,6 @@ void intel_hdmi_init(struct drm_i915_private
> > > > *dev_priv,
> > > >  
> > > >  	intel_infoframe_init(intel_dig_port);
> > > >  
> > > > +	intel_dig_port->aux_ch = intel_aux_ch(dev_priv, port);
> > > 
> > > Everything else looks good, I'm not just 100% confortable in
> > > initializing it here just for consistency, can someone else comment
> > > here?
> > 
> > The place is fine. My concern with this approach is the impact
> > on some legacy platforms that could be using this aux for something else.
> > 
> > Like... That SKL with edp-to-vga converter plugged on port-E which
> > uses aux from port B because this was unused because it was an HDMI plugged
> > on port B.
> > 
> > What could be the impact in a case like this?
> > 
> > So to avoid regressions in some old frankensteins maybe it is better
> > to add some check for type c no?!
> 
> We would have a check for type C after this patchset, we would enable
> AUX on HDMI ports only if that port is a typeC port (which is always
> false on SKL). I guess that's the config you mean. See the
> intel_ddi_pre_pll_enable hook I added.

cool, it makes sense.

Also I was looking to the series as a whole thinking about this
case that came to my mind and I don't see any possible regression.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

for the series.

> 
> > 
> > > 
> > > >  	intel_hdmi_init_connector(intel_dig_port, intel_connector);
> > > >  }
> > > _______________________________________________
> > > Intel-gfx mailing list
> > > Intel-gfx@lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-10-31 17:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-31 16:26 [PATCH v3 0/8] drm/i915/icl: Fix HDMI on TypeC static ports Imre Deak
2018-10-31 16:26 ` [PATCH v3 1/8] drm/i915: Move intel_aux_ch() to intel_bios.c Imre Deak
2018-10-31 16:26 ` [PATCH v3 2/8] drm/i915: Move aux_ch to intel_digital_port Imre Deak
2018-10-31 17:11   ` Souza, Jose
2018-10-31 16:26 ` [PATCH v3 3/8] drm/i915: Init aux_ch for HDMI ports too Imre Deak
2018-10-31 17:14   ` Souza, Jose
2018-10-31 17:29     ` Rodrigo Vivi
2018-10-31 17:36       ` Imre Deak
2018-10-31 17:56         ` Rodrigo Vivi [this message]
2018-10-31 16:26 ` [PATCH v3 4/8] drm/i915: Use a helper to get the aux power domain Imre Deak
2018-10-31 17:12   ` Souza, Jose
2018-10-31 16:26 ` [PATCH v3 5/8] drm/i915: Enable AUX power earlier Imre Deak
2018-10-31 16:26 ` [PATCH v3 6/8] drm/i915: Enable AUX power for HDMI DDI/TypeC main link too Imre Deak
2018-10-31 16:27 ` [PATCH v3 7/8] drm/i915: Configure AUX_CH_CTL when enabling the AUX power domain Imre Deak
2018-10-31 16:27 ` [PATCH v3 8/8] drm/i915/icl+: Sanitize port to PLL mapping Imre Deak
2018-10-31 16:42 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/icl: Fix HDMI on TypeC static ports (rev3) Patchwork
2018-10-31 16:46 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-10-31 17:00 ` ✓ Fi.CI.BAT: success " Patchwork
2018-11-01  0:02 ` ✓ 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=20181031175633.GE2396@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@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