From: Imre Deak <imre.deak@intel.com>
To: "Souza, Jose" <jose.souza@intel.com>
Cc: "intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"Zanoni, Paulo R" <paulo.r.zanoni@intel.com>
Subject: Re: [PATCH 2/8] drm/i915: Move aux_ch to intel_digital_port
Date: Wed, 31 Oct 2018 15:36:21 +0200 [thread overview]
Message-ID: <20181031133621.GC16496@ideak-desk.fi.intel.com> (raw)
In-Reply-To: <aa7b2d4a3da5795f593f92b132ff4168a69bae2c.camel@intel.com>
On Wed, Oct 31, 2018 at 12:36:00AM +0200, Souza, Jose wrote:
> On Tue, 2018-10-30 at 17:40 +0200, Imre Deak wrote:
> > From ICL onwards all DDI/TypeC ports - even working in HDMI mode -
> > need
> > to know their corresponding AUX CH, so move the field to a common
> > struct.
> >
> > No functional change.
> >
> > Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Signed-off-by: Imre Deak <imre.deak@intel.com>
> > ---
> > drivers/gpu/drm/i915/intel_ddi.c | 4 +++-
> > drivers/gpu/drm/i915/intel_dp.c | 35 +++++++++++++++++++++++-------
> > -----
> > drivers/gpu/drm/i915/intel_drv.h | 2 +-
> > 3 files changed, 27 insertions(+), 14 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_ddi.c
> > b/drivers/gpu/drm/i915/intel_ddi.c
> > index e40a8c97d34b..32a080265d03 100644
> > --- a/drivers/gpu/drm/i915/intel_ddi.c
> > +++ b/drivers/gpu/drm/i915/intel_ddi.c
> > @@ -2084,6 +2084,8 @@ bool intel_ddi_get_hw_state(struct
> > intel_encoder *encoder,
> > static inline enum intel_display_power_domain
> > intel_ddi_main_link_aux_domain(struct intel_dp *intel_dp)
> > {
> > + struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
> > +
> > /* CNL+ HW requires corresponding AUX IOs to be powered up for
> > PSR with
> > * DC states enabled at the same time, while for driver
> > initiated AUX
> > * transfers we need the same AUX IOs to be powered but with DC
> > states
> > @@ -2096,7 +2098,7 @@ intel_ddi_main_link_aux_domain(struct intel_dp
> > *intel_dp)
> > * Note that PSR is enabled only on Port A even though this
> > function
> > * returns the correct domain for other ports too.
> > */
> > - return intel_dp->aux_ch == AUX_CH_A ? POWER_DOMAIN_AUX_IO_A :
> > + return dig_port->aux_ch == AUX_CH_A ? POWER_DOMAIN_AUX_IO_A :
> > intel_dp-
> > >aux_power_domain;
> > }
> >
> > diff --git a/drivers/gpu/drm/i915/intel_dp.c
> > b/drivers/gpu/drm/i915/intel_dp.c
> > index 2445897b8f6c..5530c604c694 100644
> > --- a/drivers/gpu/drm/i915/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > @@ -1156,6 +1156,7 @@ static uint32_t
> > g4x_get_aux_clock_divider(struct intel_dp *intel_dp, int index)
> > static uint32_t ilk_get_aux_clock_divider(struct intel_dp *intel_dp,
> > int index)
> > {
> > struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
> > + struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
> >
> > if (index)
> > return 0;
> > @@ -1165,7 +1166,7 @@ static uint32_t
> > ilk_get_aux_clock_divider(struct intel_dp *intel_dp, int index)
> > * like to run at 2MHz. So, take the cdclk or PCH rawclk value
> > and
> > * divide by 2000 and use that
> > */
> > - if (intel_dp->aux_ch == AUX_CH_A)
> > + if (dig_port->aux_ch == AUX_CH_A)
> > return DIV_ROUND_CLOSEST(dev_priv->cdclk.hw.cdclk,
> > 2000);
> > else
> > return DIV_ROUND_CLOSEST(dev_priv->rawclk_freq, 2000);
> > @@ -1174,8 +1175,9 @@ static uint32_t
> > ilk_get_aux_clock_divider(struct intel_dp *intel_dp, int index)
> > static uint32_t hsw_get_aux_clock_divider(struct intel_dp *intel_dp,
> > int index)
> > {
> > struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
> > + struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
> >
> > - if (intel_dp->aux_ch != AUX_CH_A && HAS_PCH_LPT_H(dev_priv)) {
> > + if (dig_port->aux_ch != AUX_CH_A && HAS_PCH_LPT_H(dev_priv)) {
> > /* Workaround for non-ULT HSW */
> > switch (index) {
> > case 0: return 63;
> > @@ -1506,7 +1508,9 @@ intel_dp_aux_transfer(struct drm_dp_aux *aux,
> > struct drm_dp_aux_msg *msg)
> > static enum intel_display_power_domain
> > intel_aux_power_domain(struct intel_dp *intel_dp)
> > {
> > - switch (intel_dp->aux_ch) {
> > + struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
> > +
> > + switch (dig_port->aux_ch) {
> > case AUX_CH_A:
> > return POWER_DOMAIN_AUX_A;
> > case AUX_CH_B:
> > @@ -1520,7 +1524,7 @@ intel_aux_power_domain(struct intel_dp
> > *intel_dp)
> > case AUX_CH_F:
> > return POWER_DOMAIN_AUX_F;
> > default:
> > - MISSING_CASE(intel_dp->aux_ch);
> > + MISSING_CASE(dig_port->aux_ch);
> > return POWER_DOMAIN_AUX_A;
> > }
> > }
> > @@ -1528,7 +1532,8 @@ intel_aux_power_domain(struct intel_dp
> > *intel_dp)
> > static i915_reg_t g4x_aux_ctl_reg(struct intel_dp *intel_dp)
> > {
> > struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
> > - enum aux_ch aux_ch = intel_dp->aux_ch;
> > + struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
> > + enum aux_ch aux_ch = dig_port->aux_ch;
> >
> > switch (aux_ch) {
> > case AUX_CH_B:
> > @@ -1544,7 +1549,8 @@ static i915_reg_t g4x_aux_ctl_reg(struct
> > intel_dp *intel_dp)
> > static i915_reg_t g4x_aux_data_reg(struct intel_dp *intel_dp, int
> > index)
> > {
> > struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
> > - enum aux_ch aux_ch = intel_dp->aux_ch;
> > + struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
> > + enum aux_ch aux_ch = dig_port->aux_ch;
> >
> > switch (aux_ch) {
> > case AUX_CH_B:
> > @@ -1560,7 +1566,8 @@ static i915_reg_t g4x_aux_data_reg(struct
> > intel_dp *intel_dp, int index)
> > static i915_reg_t ilk_aux_ctl_reg(struct intel_dp *intel_dp)
> > {
> > struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
> > - enum aux_ch aux_ch = intel_dp->aux_ch;
> > + struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
> > + enum aux_ch aux_ch = dig_port->aux_ch;
> >
> > switch (aux_ch) {
> > case AUX_CH_A:
> > @@ -1578,7 +1585,8 @@ static i915_reg_t ilk_aux_ctl_reg(struct
> > intel_dp *intel_dp)
> > static i915_reg_t ilk_aux_data_reg(struct intel_dp *intel_dp, int
> > index)
> > {
> > struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
> > - enum aux_ch aux_ch = intel_dp->aux_ch;
> > + struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
> > + enum aux_ch aux_ch = dig_port->aux_ch;
> >
> > switch (aux_ch) {
> > case AUX_CH_A:
> > @@ -1596,7 +1604,8 @@ static i915_reg_t ilk_aux_data_reg(struct
> > intel_dp *intel_dp, int index)
> > static i915_reg_t skl_aux_ctl_reg(struct intel_dp *intel_dp)
> > {
> > struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
> > - enum aux_ch aux_ch = intel_dp->aux_ch;
> > + struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
> > + enum aux_ch aux_ch = dig_port->aux_ch;
> >
> > switch (aux_ch) {
> > case AUX_CH_A:
> > @@ -1615,7 +1624,8 @@ static i915_reg_t skl_aux_ctl_reg(struct
> > intel_dp *intel_dp)
> > static i915_reg_t skl_aux_data_reg(struct intel_dp *intel_dp, int
> > index)
> > {
> > struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
> > - enum aux_ch aux_ch = intel_dp->aux_ch;
> > + struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
> > + enum aux_ch aux_ch = dig_port->aux_ch;
> >
> > switch (aux_ch) {
> > case AUX_CH_A:
> > @@ -1641,9 +1651,10 @@ static void
> > intel_dp_aux_init(struct intel_dp *intel_dp)
> > {
> > struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
> > - struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)-
> > >base;
> > + struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
> > + struct intel_encoder *encoder = &dig_port->base;
> >
> > - intel_dp->aux_ch = intel_aux_ch(dev_priv, encoder->port);
> > + 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) {
> > diff --git a/drivers/gpu/drm/i915/intel_drv.h
> > b/drivers/gpu/drm/i915/intel_drv.h
> > index 268afb6d2746..a242a118389d 100644
> > --- a/drivers/gpu/drm/i915/intel_drv.h
> > +++ b/drivers/gpu/drm/i915/intel_drv.h
> > @@ -1109,7 +1109,6 @@ struct intel_dp {
> > bool link_trained;
> > bool has_audio;
> > bool reset_link_params;
> > - enum aux_ch aux_ch;
> > uint8_t dpcd[DP_RECEIVER_CAP_SIZE];
> > uint8_t psr_dpcd[EDP_PSR_RECEIVER_CAP_SIZE];
> > uint8_t downstream_ports[DP_MAX_DOWNSTREAM_PORTS];
> > @@ -1213,6 +1212,7 @@ struct intel_digital_port {
> > enum irqreturn (*hpd_pulse)(struct intel_digital_port *, bool);
> > bool release_cl2_override;
> > uint8_t max_lanes;
>
> Please leave a comment here, with the commit message explanation so no
> one uses it my mistake like using for HDMI in combophy ports.
Ok.
>
> > + enum aux_ch aux_ch;
> > enum intel_display_power_domain ddi_io_power_domain;
> > enum tc_port_type tc_type;
> >
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-10-31 13:36 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-30 15:40 [PATCH 0/8] drm/i915/icl: Fix HDMI on TypeC static ports Imre Deak
2018-10-30 15:40 ` [PATCH 1/8] drm/i915: Move intel_aux_ch() to intel_bios.c Imre Deak
2018-10-30 22:36 ` Souza, Jose
2018-10-30 15:40 ` [PATCH 2/8] drm/i915: Move aux_ch to intel_digital_port Imre Deak
2018-10-30 22:36 ` Souza, Jose
2018-10-31 13:36 ` Imre Deak [this message]
2018-10-30 15:40 ` [PATCH 3/8] drm/i915: Init aux_ch for HDMI ports too Imre Deak
2018-10-30 22:32 ` Souza, Jose
2018-10-30 22:38 ` Imre Deak
2018-10-31 0:03 ` Souza, Jose
2018-10-30 15:40 ` [PATCH 4/8] drm/i915: Use a helper to get the aux power domain Imre Deak
2018-10-30 21:16 ` Lucas De Marchi
2018-10-30 21:31 ` Imre Deak
2018-10-30 15:40 ` [PATCH 5/8] drm/i915: Enable AUX power earlier Imre Deak
2018-10-30 19:05 ` [PATCH v2 " Imre Deak
2018-10-30 21:55 ` Manasi Navare
2018-10-30 22:04 ` Imre Deak
2018-10-30 23:07 ` [PATCH " Souza, Jose
2018-10-30 23:12 ` Imre Deak
2018-10-30 23:18 ` Souza, Jose
2018-10-30 23:28 ` Imre Deak
2018-10-30 23:52 ` Souza, Jose
2018-10-31 0:04 ` Imre Deak
2018-10-31 0:17 ` Souza, Jose
2018-10-31 0:33 ` Imre Deak
2018-10-31 0:40 ` Souza, Jose
2018-10-30 15:40 ` [PATCH 6/8] drm/i915: Enable AUX power for HDMI DDI/TypeC main link too Imre Deak
2018-10-30 23:08 ` Souza, Jose
2018-10-30 15:40 ` [PATCH 7/8] drm/i915: Configure AUX_CH_CTL when enabling the AUX power domain Imre Deak
2018-10-30 21:57 ` Lucas De Marchi
2018-10-31 13:30 ` Imre Deak
2018-10-30 23:28 ` Souza, Jose
2018-10-31 13:34 ` Imre Deak
2018-10-30 15:40 ` [PATCH 8/8] drm/i915/icl+: Sanitize port to PLL mapping Imre Deak
2018-10-30 23:57 ` Souza, Jose
2018-10-30 16:09 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/icl: Fix HDMI on TypeC static ports Patchwork
2018-10-30 16:13 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-10-30 16:28 ` ✗ Fi.CI.BAT: failure " Patchwork
2018-10-30 19:32 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/icl: Fix HDMI on TypeC static ports (rev2) Patchwork
2018-10-30 19:35 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-10-30 19:50 ` ✓ Fi.CI.BAT: success " Patchwork
2018-10-31 0:36 ` ✓ 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=20181031133621.GC16496@ideak-desk.fi.intel.com \
--to=imre.deak@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jose.souza@intel.com \
--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 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.