OSDN Git Service

drm/i915/crtc: rename intel_get_crtc_for_pipe() to intel_crtc_for_pipe()
authorJani Nikula <jani.nikula@intel.com>
Wed, 1 Dec 2021 13:57:04 +0000 (15:57 +0200)
committerJani Nikula <jani.nikula@intel.com>
Thu, 2 Dec 2021 10:53:50 +0000 (12:53 +0200)
The "get" in the name implies reference counting, remove it. This also
makes the function conform to naming style.

Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/6105d0ff44efac3c999af6382e4b0729e251f1e1.1638366969.git.jani.nikula@intel.com
12 files changed:
drivers/gpu/drm/i915/display/intel_atomic_plane.c
drivers/gpu/drm/i915/display/intel_cdclk.c
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_display_types.h
drivers/gpu/drm/i915/display/intel_dpll.c
drivers/gpu/drm/i915/display/intel_fdi.c
drivers/gpu/drm/i915/display/intel_fifo_underrun.c
drivers/gpu/drm/i915/display/intel_sprite.c
drivers/gpu/drm/i915/display/intel_vdsc.c
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/i915_trace.h
drivers/gpu/drm/i915/intel_pm.c

index 089fb46..7a9e778 100644 (file)
@@ -395,7 +395,7 @@ int intel_plane_atomic_check(struct intel_atomic_state *state,
        const struct intel_plane_state *old_plane_state =
                intel_atomic_get_old_plane_state(state, plane);
        const struct intel_plane_state *new_master_plane_state;
-       struct intel_crtc *crtc = intel_get_crtc_for_pipe(i915, plane->pipe);
+       struct intel_crtc *crtc = intel_crtc_for_pipe(i915, plane->pipe);
        const struct intel_crtc_state *old_crtc_state =
                intel_atomic_get_old_crtc_state(state, crtc);
        struct intel_crtc_state *new_crtc_state =
index 91c19e0..5a475aa 100644 (file)
@@ -2592,7 +2592,7 @@ int intel_modeset_calc_cdclk(struct intel_atomic_state *state)
                struct intel_crtc_state *crtc_state;
 
                pipe = ilog2(new_cdclk_state->active_pipes);
-               crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
+               crtc = intel_crtc_for_pipe(dev_priv, pipe);
 
                crtc_state = intel_atomic_get_crtc_state(&state->base, crtc);
                if (IS_ERR(crtc_state))
index 0be204d..5d7b9a9 100644 (file)
@@ -4830,7 +4830,7 @@ intel_encoder_current_mode(struct intel_encoder *encoder)
        if (!encoder->get_hw_state(encoder, &pipe))
                return NULL;
 
-       crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
+       crtc = intel_crtc_for_pipe(dev_priv, pipe);
 
        mode = kzalloc(sizeof(*mode), GFP_KERNEL);
        if (!mode)
@@ -8962,8 +8962,8 @@ static void intel_plane_possible_crtcs_init(struct drm_i915_private *dev_priv)
        struct intel_plane *plane;
 
        for_each_intel_plane(&dev_priv->drm, plane) {
-               struct intel_crtc *crtc = intel_get_crtc_for_pipe(dev_priv,
-                                                                 plane->pipe);
+               struct intel_crtc *crtc = intel_crtc_for_pipe(dev_priv,
+                                                             plane->pipe);
 
                plane->base.possible_crtcs = drm_crtc_mask(&crtc->base);
        }
@@ -9956,7 +9956,7 @@ int intel_modeset_init(struct drm_i915_private *i915)
 
 void i830_enable_pipe(struct drm_i915_private *dev_priv, enum pipe pipe)
 {
-       struct intel_crtc *crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
+       struct intel_crtc *crtc = intel_crtc_for_pipe(dev_priv, pipe);
        /* 640x480@60Hz, ~25175 kHz */
        struct dpll clock = {
                .m1 = 18,
@@ -10029,7 +10029,7 @@ void i830_enable_pipe(struct drm_i915_private *dev_priv, enum pipe pipe)
 
 void i830_disable_pipe(struct drm_i915_private *dev_priv, enum pipe pipe)
 {
-       struct intel_crtc *crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
+       struct intel_crtc *crtc = intel_crtc_for_pipe(dev_priv, pipe);
 
        drm_dbg_kms(&dev_priv->drm, "disabling pipe %c due to force quirk\n",
                    pipe_name(pipe));
@@ -10081,7 +10081,7 @@ intel_sanitize_plane_mapping(struct drm_i915_private *dev_priv)
                            "[PLANE:%d:%s] attached to the wrong pipe, disabling plane\n",
                            plane->base.base.id, plane->base.name);
 
-               plane_crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
+               plane_crtc = intel_crtc_for_pipe(dev_priv, pipe);
                intel_plane_disable_noatomic(plane_crtc, plane);
        }
 }
@@ -10334,7 +10334,7 @@ static void readout_plane_state(struct drm_i915_private *dev_priv)
 
                visible = plane->get_hw_state(plane, &pipe);
 
-               crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
+               crtc = intel_crtc_for_pipe(dev_priv, pipe);
                crtc_state = to_intel_crtc_state(crtc->base.state);
 
                intel_set_plane_visible(crtc_state, plane_state, visible);
@@ -10401,7 +10401,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
                pipe = 0;
 
                if (encoder->get_hw_state(encoder, &pipe)) {
-                       crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
+                       crtc = intel_crtc_for_pipe(dev_priv, pipe);
                        crtc_state = to_intel_crtc_state(crtc->base.state);
 
                        encoder->base.crtc = &crtc->base;
index 286c55c..8009bcf 100644 (file)
@@ -1788,7 +1788,7 @@ intel_get_first_crtc(struct drm_i915_private *dev_priv)
 }
 
 static inline struct intel_crtc *
-intel_get_crtc_for_pipe(struct drm_i915_private *dev_priv, enum pipe pipe)
+intel_crtc_for_pipe(struct drm_i915_private *dev_priv, enum pipe pipe)
 {
        /* pipe_to_crtc_mapping may have hole on any of 3 display pipe system */
        drm_WARN_ON(&dev_priv->drm,
@@ -2028,7 +2028,7 @@ intel_crtc_wait_for_next_vblank(struct intel_crtc *crtc)
 static inline void
 intel_wait_for_vblank(struct drm_i915_private *dev_priv, enum pipe pipe)
 {
-       struct intel_crtc *crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
+       struct intel_crtc *crtc = intel_crtc_for_pipe(dev_priv, pipe);
 
        intel_crtc_wait_for_next_vblank(crtc);
 }
@@ -2036,7 +2036,7 @@ intel_wait_for_vblank(struct drm_i915_private *dev_priv, enum pipe pipe)
 static inline void
 intel_wait_for_vblank_if_active(struct drm_i915_private *dev_priv, enum pipe pipe)
 {
-       struct intel_crtc *crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
+       struct intel_crtc *crtc = intel_crtc_for_pipe(dev_priv, pipe);
 
        if (crtc->active)
                intel_crtc_wait_for_next_vblank(crtc);
index 04a7af8..1ce0c17 100644 (file)
@@ -1823,7 +1823,7 @@ void chv_enable_pll(const struct intel_crtc_state *crtc_state)
 int vlv_force_pll_on(struct drm_i915_private *dev_priv, enum pipe pipe,
                     const struct dpll *dpll)
 {
-       struct intel_crtc *crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
+       struct intel_crtc *crtc = intel_crtc_for_pipe(dev_priv, pipe);
        struct intel_crtc_state *crtc_state;
 
        crtc_state = intel_crtc_state_alloc(crtc);
index 2b5f80f..be77be6 100644 (file)
@@ -157,7 +157,7 @@ static int ilk_check_fdi_lanes(struct drm_device *dev, enum pipe pipe,
                if (pipe_config->fdi_lanes <= 2)
                        return 0;
 
-               other_crtc = intel_get_crtc_for_pipe(dev_priv, PIPE_C);
+               other_crtc = intel_crtc_for_pipe(dev_priv, PIPE_C);
                other_crtc_state =
                        intel_atomic_get_crtc_state(state, other_crtc);
                if (IS_ERR(other_crtc_state))
@@ -178,7 +178,7 @@ static int ilk_check_fdi_lanes(struct drm_device *dev, enum pipe pipe,
                        return -EINVAL;
                }
 
-               other_crtc = intel_get_crtc_for_pipe(dev_priv, PIPE_B);
+               other_crtc = intel_crtc_for_pipe(dev_priv, PIPE_B);
                other_crtc_state =
                        intel_atomic_get_crtc_state(state, other_crtc);
                if (IS_ERR(other_crtc_state))
index 28d9eeb..98b401d 100644 (file)
@@ -61,7 +61,7 @@ static bool ivb_can_enable_err_int(struct drm_device *dev)
        lockdep_assert_held(&dev_priv->irq_lock);
 
        for_each_pipe(dev_priv, pipe) {
-               crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
+               crtc = intel_crtc_for_pipe(dev_priv, pipe);
 
                if (crtc->cpu_fifo_underrun_disabled)
                        return false;
@@ -79,7 +79,7 @@ static bool cpt_can_enable_serr_int(struct drm_device *dev)
        lockdep_assert_held(&dev_priv->irq_lock);
 
        for_each_pipe(dev_priv, pipe) {
-               crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
+               crtc = intel_crtc_for_pipe(dev_priv, pipe);
 
                if (crtc->pch_fifo_underrun_disabled)
                        return false;
@@ -279,7 +279,7 @@ static bool __intel_set_cpu_fifo_underrun_reporting(struct drm_device *dev,
                                                    enum pipe pipe, bool enable)
 {
        struct drm_i915_private *dev_priv = to_i915(dev);
-       struct intel_crtc *crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
+       struct intel_crtc *crtc = intel_crtc_for_pipe(dev_priv, pipe);
        bool old;
 
        lockdep_assert_held(&dev_priv->irq_lock);
@@ -348,7 +348,7 @@ bool intel_set_pch_fifo_underrun_reporting(struct drm_i915_private *dev_priv,
                                           bool enable)
 {
        struct intel_crtc *crtc =
-               intel_get_crtc_for_pipe(dev_priv, pch_transcoder);
+               intel_crtc_for_pipe(dev_priv, pch_transcoder);
        unsigned long flags;
        bool old;
 
@@ -391,7 +391,7 @@ bool intel_set_pch_fifo_underrun_reporting(struct drm_i915_private *dev_priv,
 void intel_cpu_fifo_underrun_irq_handler(struct drm_i915_private *dev_priv,
                                         enum pipe pipe)
 {
-       struct intel_crtc *crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
+       struct intel_crtc *crtc = intel_crtc_for_pipe(dev_priv, pipe);
        u32 underruns = 0;
 
        /* We may be called too early in init, thanks BIOS! */
index 1b99a95..6befd30 100644 (file)
@@ -1584,8 +1584,8 @@ int intel_sprite_set_colorkey_ioctl(struct drm_device *dev, void *data,
                 */
                if (!ret && has_dst_key_in_primary_plane(dev_priv)) {
                        struct intel_crtc *crtc =
-                               intel_get_crtc_for_pipe(dev_priv,
-                                                       to_intel_plane(plane)->pipe);
+                               intel_crtc_for_pipe(dev_priv,
+                                                   to_intel_plane(plane)->pipe);
 
                        plane_state = drm_atomic_get_plane_state(state,
                                                                 crtc->base.primary);
index bf8d3c7..c6851b0 100644 (file)
@@ -1116,7 +1116,7 @@ _get_crtc_for_pipe(struct drm_i915_private *i915, enum pipe pipe)
        if (!intel_pipe_valid(i915, pipe))
                return NULL;
 
-       return intel_get_crtc_for_pipe(i915, pipe);
+       return intel_crtc_for_pipe(i915, pipe);
 }
 
 struct intel_crtc *
index a4b0a0c..2634bdc 100644 (file)
@@ -224,7 +224,7 @@ static void intel_hpd_init_pins(struct drm_i915_private *dev_priv)
 static void
 intel_handle_vblank(struct drm_i915_private *dev_priv, enum pipe pipe)
 {
-       struct intel_crtc *crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
+       struct intel_crtc *crtc = intel_crtc_for_pipe(dev_priv, pipe);
 
        drm_crtc_handle_vblank(&crtc->base);
 }
@@ -1318,7 +1318,7 @@ static void display_pipe_crc_irq_handler(struct drm_i915_private *dev_priv,
                                         u32 crc2, u32 crc3,
                                         u32 crc4)
 {
-       struct intel_crtc *crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
+       struct intel_crtc *crtc = intel_crtc_for_pipe(dev_priv, pipe);
        struct intel_pipe_crc *pipe_crc = &crtc->pipe_crc;
        u32 crcs[5] = { crc0, crc1, crc2, crc3, crc4 };
 
@@ -1357,7 +1357,7 @@ display_pipe_crc_irq_handler(struct drm_i915_private *dev_priv,
 static void flip_done_handler(struct drm_i915_private *i915,
                              enum pipe pipe)
 {
-       struct intel_crtc *crtc = intel_get_crtc_for_pipe(i915, pipe);
+       struct intel_crtc *crtc = intel_crtc_for_pipe(i915, pipe);
        struct drm_crtc_state *crtc_state = crtc->base.state;
        struct drm_pending_vblank_event *e = crtc_state->event;
        struct drm_device *dev = &i915->drm;
index 6b8fb6f..26b8d75 100644 (file)
@@ -109,7 +109,7 @@ TRACE_EVENT(intel_cpu_fifo_underrun,
                             ),
 
            TP_fast_assign(
-                           struct intel_crtc *crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
+                           struct intel_crtc *crtc = intel_crtc_for_pipe(dev_priv, pipe);
                           __entry->pipe = pipe;
                           __entry->frame = intel_crtc_get_vblank_counter(crtc);
                           __entry->scanline = intel_get_crtc_scanline(crtc);
@@ -132,7 +132,7 @@ TRACE_EVENT(intel_pch_fifo_underrun,
 
            TP_fast_assign(
                           enum pipe pipe = pch_transcoder;
-                          struct intel_crtc *crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
+                          struct intel_crtc *crtc = intel_crtc_for_pipe(dev_priv, pipe);
                           __entry->pipe = pipe;
                           __entry->frame = intel_crtc_get_vblank_counter(crtc);
                           __entry->scanline = intel_get_crtc_scanline(crtc);
index e9f2e30..f9d1393 100644 (file)
@@ -989,7 +989,7 @@ static void g4x_write_wm_values(struct drm_i915_private *dev_priv,
        enum pipe pipe;
 
        for_each_pipe(dev_priv, pipe)
-               trace_g4x_wm(intel_get_crtc_for_pipe(dev_priv, pipe), wm);
+               trace_g4x_wm(intel_crtc_for_pipe(dev_priv, pipe), wm);
 
        intel_uncore_write(&dev_priv->uncore, DSPFW1,
                   FW_WM(wm->sr.plane, SR) |
@@ -1021,7 +1021,7 @@ static void vlv_write_wm_values(struct drm_i915_private *dev_priv,
        enum pipe pipe;
 
        for_each_pipe(dev_priv, pipe) {
-               trace_vlv_wm(intel_get_crtc_for_pipe(dev_priv, pipe), wm);
+               trace_vlv_wm(intel_crtc_for_pipe(dev_priv, pipe), wm);
 
                intel_uncore_write(&dev_priv->uncore, VLV_DDL(pipe),
                           (wm->ddl[pipe].plane[PLANE_CURSOR] << DDL_CURSOR_SHIFT) |
@@ -6909,7 +6909,7 @@ void g4x_wm_sanitize(struct drm_i915_private *dev_priv)
 
        for_each_intel_plane(&dev_priv->drm, plane) {
                struct intel_crtc *crtc =
-                       intel_get_crtc_for_pipe(dev_priv, plane->pipe);
+                       intel_crtc_for_pipe(dev_priv, plane->pipe);
                struct intel_crtc_state *crtc_state =
                        to_intel_crtc_state(crtc->base.state);
                struct intel_plane_state *plane_state =
@@ -7065,7 +7065,7 @@ void vlv_wm_sanitize(struct drm_i915_private *dev_priv)
 
        for_each_intel_plane(&dev_priv->drm, plane) {
                struct intel_crtc *crtc =
-                       intel_get_crtc_for_pipe(dev_priv, plane->pipe);
+                       intel_crtc_for_pipe(dev_priv, plane->pipe);
                struct intel_crtc_state *crtc_state =
                        to_intel_crtc_state(crtc->base.state);
                struct intel_plane_state *plane_state =