Commit 1e98f88c authored by Lucas De Marchi's avatar Lucas De Marchi

drm/i915: prefer 3-letter acronym for haswell

We are currently using a mix of platform name and acronym to name the
functions. Let's prefer the acronym as it should be clear what platform
it's about and it's shorter, so it doesn't go over 80 columns in a few
cases. This converts haswell to hsw where appropriate.
Signed-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Acked-by: default avatarJani Nikula <jani.nikula@linux.intel.com>
Acked-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191224084012.24241-3-lucas.demarchi@intel.com
parent 1d218220
...@@ -3465,14 +3465,14 @@ static void tgl_ddi_pre_enable_dp(struct intel_encoder *encoder, ...@@ -3465,14 +3465,14 @@ static void tgl_ddi_pre_enable_dp(struct intel_encoder *encoder,
* (DFLEXDPSP.DPX4TXLATC) * (DFLEXDPSP.DPX4TXLATC)
* *
* This was done before tgl_ddi_pre_enable_dp by * This was done before tgl_ddi_pre_enable_dp by
* haswell_crtc_enable()->intel_encoders_pre_pll_enable(). * hsw_crtc_enable()->intel_encoders_pre_pll_enable().
*/ */
/* /*
* 4. Enable the port PLL. * 4. Enable the port PLL.
* *
* The PLL enabling itself was already done before this function by * The PLL enabling itself was already done before this function by
* haswell_crtc_enable()->intel_enable_shared_dpll(). We need only * hsw_crtc_enable()->intel_enable_shared_dpll(). We need only
* configure the PLL to port mapping here. * configure the PLL to port mapping here.
*/ */
intel_ddi_clk_select(encoder, crtc_state); intel_ddi_clk_select(encoder, crtc_state);
......
...@@ -159,7 +159,7 @@ static void intel_cpu_transcoder_set_m_n(const struct intel_crtc_state *crtc_sta ...@@ -159,7 +159,7 @@ static void intel_cpu_transcoder_set_m_n(const struct intel_crtc_state *crtc_sta
const struct intel_link_m_n *m2_n2); const struct intel_link_m_n *m2_n2);
static void i9xx_set_pipeconf(const struct intel_crtc_state *crtc_state); static void i9xx_set_pipeconf(const struct intel_crtc_state *crtc_state);
static void ironlake_set_pipeconf(const struct intel_crtc_state *crtc_state); static void ironlake_set_pipeconf(const struct intel_crtc_state *crtc_state);
static void haswell_set_pipeconf(const struct intel_crtc_state *crtc_state); static void hsw_set_pipeconf(const struct intel_crtc_state *crtc_state);
static void bdw_set_pipemisc(const struct intel_crtc_state *crtc_state); static void bdw_set_pipemisc(const struct intel_crtc_state *crtc_state);
static void vlv_prepare_pll(struct intel_crtc *crtc, static void vlv_prepare_pll(struct intel_crtc *crtc,
const struct intel_crtc_state *pipe_config); const struct intel_crtc_state *pipe_config);
...@@ -6771,8 +6771,8 @@ static void hsw_set_frame_start_delay(const struct intel_crtc_state *crtc_state) ...@@ -6771,8 +6771,8 @@ static void hsw_set_frame_start_delay(const struct intel_crtc_state *crtc_state)
I915_WRITE(reg, val); I915_WRITE(reg, val);
} }
static void haswell_crtc_enable(struct intel_atomic_state *state, static void hsw_crtc_enable(struct intel_atomic_state *state,
struct intel_crtc *crtc) struct intel_crtc *crtc)
{ {
const struct intel_crtc_state *new_crtc_state = const struct intel_crtc_state *new_crtc_state =
intel_atomic_get_new_crtc_state(state, crtc); intel_atomic_get_new_crtc_state(state, crtc);
...@@ -6813,7 +6813,7 @@ static void haswell_crtc_enable(struct intel_atomic_state *state, ...@@ -6813,7 +6813,7 @@ static void haswell_crtc_enable(struct intel_atomic_state *state,
if (!transcoder_is_dsi(cpu_transcoder)) { if (!transcoder_is_dsi(cpu_transcoder)) {
hsw_set_frame_start_delay(new_crtc_state); hsw_set_frame_start_delay(new_crtc_state);
haswell_set_pipeconf(new_crtc_state); hsw_set_pipeconf(new_crtc_state);
} }
if (INTEL_GEN(dev_priv) >= 9 || IS_BROADWELL(dev_priv)) if (INTEL_GEN(dev_priv) >= 9 || IS_BROADWELL(dev_priv))
...@@ -6951,8 +6951,8 @@ static void ironlake_crtc_disable(struct intel_atomic_state *state, ...@@ -6951,8 +6951,8 @@ static void ironlake_crtc_disable(struct intel_atomic_state *state,
intel_set_pch_fifo_underrun_reporting(dev_priv, pipe, true); intel_set_pch_fifo_underrun_reporting(dev_priv, pipe, true);
} }
static void haswell_crtc_disable(struct intel_atomic_state *state, static void hsw_crtc_disable(struct intel_atomic_state *state,
struct intel_crtc *crtc) struct intel_crtc *crtc)
{ {
/* /*
* FIXME collapse everything to one hook. * FIXME collapse everything to one hook.
...@@ -9767,7 +9767,7 @@ static void ironlake_set_pipeconf(const struct intel_crtc_state *crtc_state) ...@@ -9767,7 +9767,7 @@ static void ironlake_set_pipeconf(const struct intel_crtc_state *crtc_state)
POSTING_READ(PIPECONF(pipe)); POSTING_READ(PIPECONF(pipe));
} }
static void haswell_set_pipeconf(const struct intel_crtc_state *crtc_state) static void hsw_set_pipeconf(const struct intel_crtc_state *crtc_state)
{ {
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
...@@ -10401,8 +10401,9 @@ static bool ironlake_get_pipe_config(struct intel_crtc *crtc, ...@@ -10401,8 +10401,9 @@ static bool ironlake_get_pipe_config(struct intel_crtc *crtc,
return ret; return ret;
} }
static int haswell_crtc_compute_clock(struct intel_crtc *crtc,
struct intel_crtc_state *crtc_state) static int hsw_crtc_compute_clock(struct intel_crtc *crtc,
struct intel_crtc_state *crtc_state)
{ {
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
struct intel_atomic_state *state = struct intel_atomic_state *state =
...@@ -10516,9 +10517,8 @@ static void skylake_get_ddi_pll(struct drm_i915_private *dev_priv, ...@@ -10516,9 +10517,8 @@ static void skylake_get_ddi_pll(struct drm_i915_private *dev_priv,
pipe_config->shared_dpll = intel_get_shared_dpll_by_id(dev_priv, id); pipe_config->shared_dpll = intel_get_shared_dpll_by_id(dev_priv, id);
} }
static void haswell_get_ddi_pll(struct drm_i915_private *dev_priv, static void hsw_get_ddi_pll(struct drm_i915_private *dev_priv, enum port port,
enum port port, struct intel_crtc_state *pipe_config)
struct intel_crtc_state *pipe_config)
{ {
enum intel_dpll_id id; enum intel_dpll_id id;
u32 ddi_pll_sel = I915_READ(PORT_CLK_SEL(port)); u32 ddi_pll_sel = I915_READ(PORT_CLK_SEL(port));
...@@ -10706,8 +10706,8 @@ static bool bxt_get_dsi_transcoder_state(struct intel_crtc *crtc, ...@@ -10706,8 +10706,8 @@ static bool bxt_get_dsi_transcoder_state(struct intel_crtc *crtc,
return transcoder_is_dsi(pipe_config->cpu_transcoder); return transcoder_is_dsi(pipe_config->cpu_transcoder);
} }
static void haswell_get_ddi_port_state(struct intel_crtc *crtc, static void hsw_get_ddi_port_state(struct intel_crtc *crtc,
struct intel_crtc_state *pipe_config) struct intel_crtc_state *pipe_config)
{ {
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
enum transcoder cpu_transcoder = pipe_config->cpu_transcoder; enum transcoder cpu_transcoder = pipe_config->cpu_transcoder;
...@@ -10735,7 +10735,7 @@ static void haswell_get_ddi_port_state(struct intel_crtc *crtc, ...@@ -10735,7 +10735,7 @@ static void haswell_get_ddi_port_state(struct intel_crtc *crtc,
else if (IS_GEN9_LP(dev_priv)) else if (IS_GEN9_LP(dev_priv))
bxt_get_ddi_pll(dev_priv, port, pipe_config); bxt_get_ddi_pll(dev_priv, port, pipe_config);
else else
haswell_get_ddi_pll(dev_priv, port, pipe_config); hsw_get_ddi_pll(dev_priv, port, pipe_config);
pll = pipe_config->shared_dpll; pll = pipe_config->shared_dpll;
if (pll) { if (pll) {
...@@ -10813,8 +10813,8 @@ static void icelake_get_trans_port_sync_config(struct intel_crtc_state *crtc_sta ...@@ -10813,8 +10813,8 @@ static void icelake_get_trans_port_sync_config(struct intel_crtc_state *crtc_sta
crtc_state->sync_mode_slaves_mask); crtc_state->sync_mode_slaves_mask);
} }
static bool haswell_get_pipe_config(struct intel_crtc *crtc, static bool hsw_get_pipe_config(struct intel_crtc *crtc,
struct intel_crtc_state *pipe_config) struct intel_crtc_state *pipe_config)
{ {
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
intel_wakeref_t wakerefs[POWER_DOMAIN_NUM], wf; intel_wakeref_t wakerefs[POWER_DOMAIN_NUM], wf;
...@@ -10849,7 +10849,7 @@ static bool haswell_get_pipe_config(struct intel_crtc *crtc, ...@@ -10849,7 +10849,7 @@ static bool haswell_get_pipe_config(struct intel_crtc *crtc,
if (!transcoder_is_dsi(pipe_config->cpu_transcoder) || if (!transcoder_is_dsi(pipe_config->cpu_transcoder) ||
INTEL_GEN(dev_priv) >= 11) { INTEL_GEN(dev_priv) >= 11) {
haswell_get_ddi_port_state(crtc, pipe_config); hsw_get_ddi_port_state(crtc, pipe_config);
intel_get_pipe_timings(crtc, pipe_config); intel_get_pipe_timings(crtc, pipe_config);
} }
...@@ -14038,7 +14038,7 @@ static void intel_modeset_clear_plls(struct intel_atomic_state *state) ...@@ -14038,7 +14038,7 @@ static void intel_modeset_clear_plls(struct intel_atomic_state *state)
* multiple pipes, and planes are enabled after the pipe, we need to wait at * multiple pipes, and planes are enabled after the pipe, we need to wait at
* least 2 vblanks on the first pipe before enabling planes on the second pipe. * least 2 vblanks on the first pipe before enabling planes on the second pipe.
*/ */
static int haswell_mode_set_planes_workaround(struct intel_atomic_state *state) static int hsw_mode_set_planes_workaround(struct intel_atomic_state *state)
{ {
struct intel_crtc_state *crtc_state; struct intel_crtc_state *crtc_state;
struct intel_crtc *crtc; struct intel_crtc *crtc;
...@@ -14133,7 +14133,7 @@ static int intel_modeset_checks(struct intel_atomic_state *state) ...@@ -14133,7 +14133,7 @@ static int intel_modeset_checks(struct intel_atomic_state *state)
intel_modeset_clear_plls(state); intel_modeset_clear_plls(state);
if (IS_HASWELL(dev_priv)) if (IS_HASWELL(dev_priv))
return haswell_mode_set_planes_workaround(state); return hsw_mode_set_planes_workaround(state);
return 0; return 0;
} }
...@@ -16915,21 +16915,20 @@ void intel_init_display_hooks(struct drm_i915_private *dev_priv) ...@@ -16915,21 +16915,20 @@ void intel_init_display_hooks(struct drm_i915_private *dev_priv)
intel_init_cdclk_hooks(dev_priv); intel_init_cdclk_hooks(dev_priv);
if (INTEL_GEN(dev_priv) >= 9) { if (INTEL_GEN(dev_priv) >= 9) {
dev_priv->display.get_pipe_config = haswell_get_pipe_config; dev_priv->display.get_pipe_config = hsw_get_pipe_config;
dev_priv->display.get_initial_plane_config = dev_priv->display.get_initial_plane_config =
skylake_get_initial_plane_config; skylake_get_initial_plane_config;
dev_priv->display.crtc_compute_clock = dev_priv->display.crtc_compute_clock = hsw_crtc_compute_clock;
haswell_crtc_compute_clock; dev_priv->display.crtc_enable = hsw_crtc_enable;
dev_priv->display.crtc_enable = haswell_crtc_enable; dev_priv->display.crtc_disable = hsw_crtc_disable;
dev_priv->display.crtc_disable = haswell_crtc_disable;
} else if (HAS_DDI(dev_priv)) { } else if (HAS_DDI(dev_priv)) {
dev_priv->display.get_pipe_config = haswell_get_pipe_config; dev_priv->display.get_pipe_config = hsw_get_pipe_config;
dev_priv->display.get_initial_plane_config = dev_priv->display.get_initial_plane_config =
i9xx_get_initial_plane_config; i9xx_get_initial_plane_config;
dev_priv->display.crtc_compute_clock = dev_priv->display.crtc_compute_clock =
haswell_crtc_compute_clock; hsw_crtc_compute_clock;
dev_priv->display.crtc_enable = haswell_crtc_enable; dev_priv->display.crtc_enable = hsw_crtc_enable;
dev_priv->display.crtc_disable = haswell_crtc_disable; dev_priv->display.crtc_disable = hsw_crtc_disable;
} else if (HAS_PCH_SPLIT(dev_priv)) { } else if (HAS_PCH_SPLIT(dev_priv)) {
dev_priv->display.get_pipe_config = ironlake_get_pipe_config; dev_priv->display.get_pipe_config = ironlake_get_pipe_config;
dev_priv->display.get_initial_plane_config = dev_priv->display.get_initial_plane_config =
......
...@@ -600,7 +600,7 @@ static void broadwell_sseu_info_init(struct drm_i915_private *dev_priv) ...@@ -600,7 +600,7 @@ static void broadwell_sseu_info_init(struct drm_i915_private *dev_priv)
sseu->has_eu_pg = 0; sseu->has_eu_pg = 0;
} }
static void haswell_sseu_info_init(struct drm_i915_private *dev_priv) static void hsw_sseu_info_init(struct drm_i915_private *dev_priv)
{ {
struct sseu_dev_info *sseu = &RUNTIME_INFO(dev_priv)->sseu; struct sseu_dev_info *sseu = &RUNTIME_INFO(dev_priv)->sseu;
u32 fuse1; u32 fuse1;
...@@ -1021,7 +1021,7 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv) ...@@ -1021,7 +1021,7 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
/* Initialize slice/subslice/EU info */ /* Initialize slice/subslice/EU info */
if (IS_HASWELL(dev_priv)) if (IS_HASWELL(dev_priv))
haswell_sseu_info_init(dev_priv); hsw_sseu_info_init(dev_priv);
else if (IS_CHERRYVIEW(dev_priv)) else if (IS_CHERRYVIEW(dev_priv))
cherryview_sseu_info_init(dev_priv); cherryview_sseu_info_init(dev_priv);
else if (IS_BROADWELL(dev_priv)) else if (IS_BROADWELL(dev_priv))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment