Re: [PATCH 3/6] drm/i915: s/crtc_mask/pipe_mask/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 02, 2019 at 11:00:45AM -0700, Lucas De Marchi wrote:
> On Wed, Oct 2, 2019 at 9:25 AM Ville Syrjala
> <ville.syrjala@xxxxxxxxxxxxxxx> wrote:
> >
> > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> >
> > Rename the encoder->crtc_mask to encoder->pipe_mask to better
> > reflect what it actually contains.
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> 
> Reviewed-by: Lucas De Marchi <lucas.demarchi@xxxxxxxxx>
> 
> but... aren't they synonym? Like crtc means nothing these days and
> just translates to pipe.

Crtc is a higher level concept. In the future we probably want to
have pipe!=drm_crtc_index() so I'm trying to make the distinction
100% obvious everywhere.

> 
> Lucas De Marchi
> 
> > ---
> >  drivers/gpu/drm/i915/display/icl_dsi.c             | 2 +-
> >  drivers/gpu/drm/i915/display/intel_crt.c           | 4 ++--
> >  drivers/gpu/drm/i915/display/intel_ddi.c           | 2 +-
> >  drivers/gpu/drm/i915/display/intel_display.c       | 2 +-
> >  drivers/gpu/drm/i915/display/intel_display_types.h | 4 ++--
> >  drivers/gpu/drm/i915/display/intel_dp.c            | 6 +++---
> >  drivers/gpu/drm/i915/display/intel_dp_mst.c        | 2 +-
> >  drivers/gpu/drm/i915/display/intel_dvo.c           | 2 +-
> >  drivers/gpu/drm/i915/display/intel_hdmi.c          | 6 +++---
> >  drivers/gpu/drm/i915/display/intel_lvds.c          | 4 ++--
> >  drivers/gpu/drm/i915/display/intel_sdvo.c          | 2 +-
> >  drivers/gpu/drm/i915/display/intel_tv.c            | 2 +-
> >  drivers/gpu/drm/i915/display/vlv_dsi.c             | 6 +++---
> >  13 files changed, 22 insertions(+), 22 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/icl_dsi.c b/drivers/gpu/drm/i915/display/icl_dsi.c
> > index 6e398c33a524..4cea8ed2bd31 100644
> > --- a/drivers/gpu/drm/i915/display/icl_dsi.c
> > +++ b/drivers/gpu/drm/i915/display/icl_dsi.c
> > @@ -1584,7 +1584,7 @@ void icl_dsi_init(struct drm_i915_private *dev_priv)
> >         encoder->get_hw_state = gen11_dsi_get_hw_state;
> >         encoder->type = INTEL_OUTPUT_DSI;
> >         encoder->cloneable = 0;
> > -       encoder->crtc_mask = BIT(PIPE_A) | BIT(PIPE_B) | BIT(PIPE_C);
> > +       encoder->pipe_mask = BIT(PIPE_A) | BIT(PIPE_B) | BIT(PIPE_C);
> >         encoder->power_domain = POWER_DOMAIN_PORT_DSI;
> >         encoder->get_power_domains = gen11_dsi_get_power_domains;
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_crt.c b/drivers/gpu/drm/i915/display/intel_crt.c
> > index ff6126ea793c..6e6c77971a5f 100644
> > --- a/drivers/gpu/drm/i915/display/intel_crt.c
> > +++ b/drivers/gpu/drm/i915/display/intel_crt.c
> > @@ -994,9 +994,9 @@ void intel_crt_init(struct drm_i915_private *dev_priv)
> >         crt->base.type = INTEL_OUTPUT_ANALOG;
> >         crt->base.cloneable = (1 << INTEL_OUTPUT_DVO) | (1 << INTEL_OUTPUT_HDMI);
> >         if (IS_I830(dev_priv))
> > -               crt->base.crtc_mask = BIT(PIPE_A);
> > +               crt->base.pipe_mask = BIT(PIPE_A);
> >         else
> > -               crt->base.crtc_mask = BIT(PIPE_A) | BIT(PIPE_B) | BIT(PIPE_C);
> > +               crt->base.pipe_mask = BIT(PIPE_A) | BIT(PIPE_B) | BIT(PIPE_C);
> >
> >         if (IS_GEN(dev_priv, 2))
> >                 connector->interlace_allowed = 0;
> > diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> > index b463e51f8b45..99aa798c9ea7 100644
> > --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> > +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> > @@ -4641,7 +4641,7 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port)
> >         intel_encoder->port = port;
> >         intel_encoder->cloneable = 0;
> >         for_each_pipe(dev_priv, pipe)
> > -               intel_encoder->crtc_mask |= BIT(pipe);
> > +               intel_encoder->pipe_mask |= BIT(pipe);
> >
> >         if (INTEL_GEN(dev_priv) >= 11)
> >                 intel_dig_port->saved_port_bits = I915_READ(DDI_BUF_CTL(port)) &
> > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> > index d10e118b9a7c..eadb856b0d5b 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display.c
> > @@ -15261,7 +15261,7 @@ static u32 intel_encoder_possible_crtcs(struct intel_encoder *encoder)
> >         u32 possible_crtcs = 0;
> >
> >         for_each_intel_crtc(dev, crtc) {
> > -               if (encoder->crtc_mask & BIT(crtc->pipe))
> > +               if (encoder->pipe_mask & BIT(crtc->pipe))
> >                         possible_crtcs |= drm_crtc_mask(&crtc->base);
> >         }
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
> > index 976669f01a8c..5930ed12a8a4 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> > +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> > @@ -128,7 +128,8 @@ struct intel_encoder {
> >
> >         enum intel_output_type type;
> >         enum port port;
> > -       unsigned int cloneable;
> > +       u16 cloneable;
> > +       u8 pipe_mask;
> >         enum intel_hotplug_state (*hotplug)(struct intel_encoder *encoder,
> >                                             struct intel_connector *connector,
> >                                             bool irq_received);
> > @@ -187,7 +188,6 @@ struct intel_encoder {
> >          * device interrupts are disabled.
> >          */
> >         void (*suspend)(struct intel_encoder *);
> > -       int crtc_mask;
> >         enum hpd_pin hpd_pin;
> >         enum intel_display_power_domain power_domain;
> >         /* for communication with audio component; protected by av_mutex */
> > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> > index 1aa39e92f0df..e7114edbc18e 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> > @@ -7364,11 +7364,11 @@ bool intel_dp_init(struct drm_i915_private *dev_priv,
> >         intel_encoder->power_domain = intel_port_to_power_domain(port);
> >         if (IS_CHERRYVIEW(dev_priv)) {
> >                 if (port == PORT_D)
> > -                       intel_encoder->crtc_mask = BIT(PIPE_C);
> > +                       intel_encoder->pipe_mask = BIT(PIPE_C);
> >                 else
> > -                       intel_encoder->crtc_mask = BIT(PIPE_A) | BIT(PIPE_B);
> > +                       intel_encoder->pipe_mask = BIT(PIPE_A) | BIT(PIPE_B);
> >         } else {
> > -               intel_encoder->crtc_mask = BIT(PIPE_A) | BIT(PIPE_B) | BIT(PIPE_C);
> > +               intel_encoder->pipe_mask = BIT(PIPE_A) | BIT(PIPE_B) | BIT(PIPE_C);
> >         }
> >         intel_encoder->cloneable = 0;
> >         intel_encoder->port = port;
> > diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> > index 2203be28ea01..1b1674ef679e 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> > @@ -618,7 +618,7 @@ intel_dp_create_fake_mst_encoder(struct intel_digital_port *intel_dig_port, enum
> >         intel_encoder->port = intel_dig_port->base.port;
> >         intel_encoder->cloneable = 0;
> >         for_each_pipe(dev_priv, pipe_iter)
> > -               intel_encoder->crtc_mask |= BIT(pipe_iter);
> > +               intel_encoder->pipe_mask |= BIT(pipe_iter);
> >
> >         intel_encoder->compute_config = intel_dp_mst_compute_config;
> >         intel_encoder->disable = intel_mst_disable_dp;
> > diff --git a/drivers/gpu/drm/i915/display/intel_dvo.c b/drivers/gpu/drm/i915/display/intel_dvo.c
> > index 9827f99491d1..a6c165d857e0 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dvo.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dvo.c
> > @@ -505,7 +505,7 @@ void intel_dvo_init(struct drm_i915_private *dev_priv)
> >                 intel_encoder->type = INTEL_OUTPUT_DVO;
> >                 intel_encoder->power_domain = POWER_DOMAIN_PORT_OTHER;
> >                 intel_encoder->port = port;
> > -               intel_encoder->crtc_mask = BIT(PIPE_A) | BIT(PIPE_B);
> > +               intel_encoder->pipe_mask = BIT(PIPE_A) | BIT(PIPE_B);
> >
> >                 switch (dvo->type) {
> >                 case INTEL_DVO_CHIP_TMDS:
> > diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
> > index 0a6846c5ba95..c561e10e7d13 100644
> > --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> > +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> > @@ -3274,11 +3274,11 @@ void intel_hdmi_init(struct drm_i915_private *dev_priv,
> >         intel_encoder->port = port;
> >         if (IS_CHERRYVIEW(dev_priv)) {
> >                 if (port == PORT_D)
> > -                       intel_encoder->crtc_mask = BIT(PIPE_C);
> > +                       intel_encoder->pipe_mask = BIT(PIPE_C);
> >                 else
> > -                       intel_encoder->crtc_mask = BIT(PIPE_A) | BIT(PIPE_B);
> > +                       intel_encoder->pipe_mask = BIT(PIPE_A) | BIT(PIPE_B);
> >         } else {
> > -               intel_encoder->crtc_mask = BIT(PIPE_A) | BIT(PIPE_B) | BIT(PIPE_C);
> > +               intel_encoder->pipe_mask = BIT(PIPE_A) | BIT(PIPE_B) | BIT(PIPE_C);
> >         }
> >         intel_encoder->cloneable = 1 << INTEL_OUTPUT_ANALOG;
> >         /*
> > diff --git a/drivers/gpu/drm/i915/display/intel_lvds.c b/drivers/gpu/drm/i915/display/intel_lvds.c
> > index cf1cd2295b9b..e358a6da5aaf 100644
> > --- a/drivers/gpu/drm/i915/display/intel_lvds.c
> > +++ b/drivers/gpu/drm/i915/display/intel_lvds.c
> > @@ -900,9 +900,9 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)
> >         intel_encoder->port = PORT_NONE;
> >         intel_encoder->cloneable = 0;
> >         if (INTEL_GEN(dev_priv) < 4)
> > -               intel_encoder->crtc_mask = BIT(PIPE_B);
> > +               intel_encoder->pipe_mask = BIT(PIPE_B);
> >         else
> > -               intel_encoder->crtc_mask = BIT(PIPE_A) | BIT(PIPE_B) | BIT(PIPE_C);
> > +               intel_encoder->pipe_mask = BIT(PIPE_A) | BIT(PIPE_B) | BIT(PIPE_C);
> >
> >         drm_connector_helper_add(connector, &intel_lvds_connector_helper_funcs);
> >         connector->display_info.subpixel_order = SubPixelHorizontalRGB;
> > diff --git a/drivers/gpu/drm/i915/display/intel_sdvo.c b/drivers/gpu/drm/i915/display/intel_sdvo.c
> > index 47f5d87a938a..fed738effbc3 100644
> > --- a/drivers/gpu/drm/i915/display/intel_sdvo.c
> > +++ b/drivers/gpu/drm/i915/display/intel_sdvo.c
> > @@ -2921,7 +2921,7 @@ intel_sdvo_output_setup(struct intel_sdvo *intel_sdvo, u16 flags)
> >                               bytes[0], bytes[1]);
> >                 return false;
> >         }
> > -       intel_sdvo->base.crtc_mask = BIT(PIPE_A) | BIT(PIPE_B) | BIT(PIPE_C);
> > +       intel_sdvo->base.pipe_mask = BIT(PIPE_A) | BIT(PIPE_B) | BIT(PIPE_C);
> >
> >         return true;
> >  }
> > diff --git a/drivers/gpu/drm/i915/display/intel_tv.c b/drivers/gpu/drm/i915/display/intel_tv.c
> > index 70726b481244..35e929423e48 100644
> > --- a/drivers/gpu/drm/i915/display/intel_tv.c
> > +++ b/drivers/gpu/drm/i915/display/intel_tv.c
> > @@ -1947,7 +1947,7 @@ intel_tv_init(struct drm_i915_private *dev_priv)
> >         intel_encoder->type = INTEL_OUTPUT_TVOUT;
> >         intel_encoder->power_domain = POWER_DOMAIN_PORT_OTHER;
> >         intel_encoder->port = PORT_NONE;
> > -       intel_encoder->crtc_mask = BIT(PIPE_A) | BIT(PIPE_B);
> > +       intel_encoder->pipe_mask = BIT(PIPE_A) | BIT(PIPE_B);
> >         intel_encoder->cloneable = 0;
> >         intel_tv->type = DRM_MODE_CONNECTOR_Unknown;
> >
> > diff --git a/drivers/gpu/drm/i915/display/vlv_dsi.c b/drivers/gpu/drm/i915/display/vlv_dsi.c
> > index 50064cde0724..11a7c77d64bc 100644
> > --- a/drivers/gpu/drm/i915/display/vlv_dsi.c
> > +++ b/drivers/gpu/drm/i915/display/vlv_dsi.c
> > @@ -1870,11 +1870,11 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv)
> >          * port C. BXT isn't limited like this.
> >          */
> >         if (IS_GEN9_LP(dev_priv))
> > -               intel_encoder->crtc_mask = BIT(PIPE_A) | BIT(PIPE_B) | BIT(PIPE_C);
> > +               intel_encoder->pipe_mask = BIT(PIPE_A) | BIT(PIPE_B) | BIT(PIPE_C);
> >         else if (port == PORT_A)
> > -               intel_encoder->crtc_mask = BIT(PIPE_A);
> > +               intel_encoder->pipe_mask = BIT(PIPE_A);
> >         else
> > -               intel_encoder->crtc_mask = BIT(PIPE_B);
> > +               intel_encoder->pipe_mask = BIT(PIPE_B);
> >
> >         if (dev_priv->vbt.dsi.config->dual_link)
> >                 intel_dsi->ports = BIT(PORT_A) | BIT(PORT_C);
> > --
> > 2.21.0
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> 
> 
> -- 
> Lucas De Marchi

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux