]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/pps: rename edp_panel_* to intel_pps_*_unlocked
authorJani Nikula <jani.nikula@intel.com>
Fri, 8 Jan 2021 17:44:13 +0000 (19:44 +0200)
committerJani Nikula <jani.nikula@intel.com>
Thu, 14 Jan 2021 08:23:28 +0000 (10:23 +0200)
Follow the usual naming pattern for functions, both for the prefix and
the _unlocked suffix for functions that expect the lock to be held when
calling. No functional changes.

Reviewed-by: Anshuman Gupta <anshuman.gupta@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/d119605ba3d9c86647a524375de2d7e3d57a5676.1610127741.git.jani.nikula@intel.com
drivers/gpu/drm/i915/display/intel_dp.c
drivers/gpu/drm/i915/display/intel_pps.c
drivers/gpu/drm/i915/display/intel_pps.h

index 1b538dae5ac26f930e79d67bbca19fc03e365875..e10ed2707ab9007a411dbdf935768b8d0bcde3b1 100644 (file)
@@ -1068,7 +1068,7 @@ intel_dp_aux_xfer(struct intel_dp *intel_dp,
         * to turn it off. But for eg. i2c-dev access we need to turn it on/off
         * ourselves.
         */
-       vdd = edp_panel_vdd_on(intel_dp);
+       vdd = intel_pps_vdd_on_unlocked(intel_dp);
 
        /* dp aux is extremely sensitive to irq latency, hence request the
         * lowest possible wakeup latency and so prevent the cpu from going into
@@ -1210,7 +1210,7 @@ out:
        cpu_latency_qos_update_request(&intel_dp->pm_qos, PM_QOS_DEFAULT_VALUE);
 
        if (vdd)
-               edp_panel_vdd_off(intel_dp, false);
+               intel_pps_vdd_off_unlocked(intel_dp, false);
 
        intel_pps_unlock(intel_dp, pps_wakeref);
        intel_display_power_put_async(i915, aux_domain, aux_wakeref);
@@ -3577,9 +3577,9 @@ static void intel_enable_dp(struct intel_atomic_state *state,
 
                intel_dp_enable_port(intel_dp, pipe_config);
 
-               edp_panel_vdd_on(intel_dp);
-               edp_panel_on(intel_dp);
-               edp_panel_vdd_off(intel_dp, true);
+               intel_pps_vdd_on_unlocked(intel_dp);
+               intel_pps_on_unlocked(intel_dp);
+               intel_pps_vdd_off_unlocked(intel_dp, true);
        }
 
        if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
@@ -6309,7 +6309,7 @@ void intel_dp_encoder_flush_work(struct drm_encoder *encoder)
                 * Make sure vdd is actually turned off here.
                 */
                with_intel_pps_lock(intel_dp, wakeref)
-                       edp_panel_vdd_off_sync(intel_dp);
+                       intel_pps_vdd_off_sync_unlocked(intel_dp);
        }
 
        intel_dp_aux_fini(intel_dp);
@@ -6337,7 +6337,7 @@ void intel_dp_encoder_suspend(struct intel_encoder *intel_encoder)
         */
        cancel_delayed_work_sync(&intel_dp->panel_vdd_work);
        with_intel_pps_lock(intel_dp, wakeref)
-               edp_panel_vdd_off_sync(intel_dp);
+               intel_pps_vdd_off_sync_unlocked(intel_dp);
 }
 
 void intel_dp_encoder_shutdown(struct intel_encoder *intel_encoder)
@@ -7197,7 +7197,7 @@ out_vdd_off:
         * Make sure vdd is actually turned off here.
         */
        with_intel_pps_lock(intel_dp, wakeref)
-               edp_panel_vdd_off_sync(intel_dp);
+               intel_pps_vdd_off_sync_unlocked(intel_dp);
 
        return false;
 }
index 59215cfd7d978f04493c49caa953e46719b008cb..fd3677948800ee96aac1a3e6ea821b32002a82b8 100644 (file)
@@ -556,11 +556,11 @@ static  u32 ilk_get_pp_control(struct intel_dp *intel_dp)
 }
 
 /*
- * Must be paired with edp_panel_vdd_off().
+ * Must be paired with intel_pps_vdd_off_unlocked().
  * Must hold pps_mutex around the whole on/off sequence.
  * Can be nested with intel_pps_vdd_{on,off}() calls.
  */
-bool edp_panel_vdd_on(struct intel_dp *intel_dp)
+bool intel_pps_vdd_on_unlocked(struct intel_dp *intel_dp)
 {
        struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
        struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
@@ -631,13 +631,13 @@ void intel_pps_vdd_on(struct intel_dp *intel_dp)
 
        vdd = false;
        with_intel_pps_lock(intel_dp, wakeref)
-               vdd = edp_panel_vdd_on(intel_dp);
+               vdd = intel_pps_vdd_on_unlocked(intel_dp);
        I915_STATE_WARN(!vdd, "[ENCODER:%d:%s] VDD already requested on\n",
                        dp_to_dig_port(intel_dp)->base.base.base.id,
                        dp_to_dig_port(intel_dp)->base.base.name);
 }
 
-void edp_panel_vdd_off_sync(struct intel_dp *intel_dp)
+void intel_pps_vdd_off_sync_unlocked(struct intel_dp *intel_dp)
 {
        struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
        struct intel_digital_port *dig_port =
@@ -687,7 +687,7 @@ void edp_panel_vdd_work(struct work_struct *__work)
 
        with_intel_pps_lock(intel_dp, wakeref) {
                if (!intel_dp->want_panel_vdd)
-                       edp_panel_vdd_off_sync(intel_dp);
+                       intel_pps_vdd_off_sync_unlocked(intel_dp);
        }
 }
 
@@ -709,7 +709,7 @@ static void edp_panel_vdd_schedule_off(struct intel_dp *intel_dp)
  * Must hold pps_mutex around the whole on/off sequence.
  * Can be nested with intel_pps_vdd_{on,off}() calls.
  */
-void edp_panel_vdd_off(struct intel_dp *intel_dp, bool sync)
+void intel_pps_vdd_off_unlocked(struct intel_dp *intel_dp, bool sync)
 {
        struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
 
@@ -725,12 +725,12 @@ void edp_panel_vdd_off(struct intel_dp *intel_dp, bool sync)
        intel_dp->want_panel_vdd = false;
 
        if (sync)
-               edp_panel_vdd_off_sync(intel_dp);
+               intel_pps_vdd_off_sync_unlocked(intel_dp);
        else
                edp_panel_vdd_schedule_off(intel_dp);
 }
 
-void edp_panel_on(struct intel_dp *intel_dp)
+void intel_pps_on_unlocked(struct intel_dp *intel_dp)
 {
        struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
        u32 pp;
@@ -787,10 +787,10 @@ void intel_pps_on(struct intel_dp *intel_dp)
                return;
 
        with_intel_pps_lock(intel_dp, wakeref)
-               edp_panel_on(intel_dp);
+               intel_pps_on_unlocked(intel_dp);
 }
 
-void edp_panel_off(struct intel_dp *intel_dp)
+void intel_pps_off_unlocked(struct intel_dp *intel_dp)
 {
        struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
        struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
@@ -839,7 +839,7 @@ void intel_pps_off(struct intel_dp *intel_dp)
                return;
 
        with_intel_pps_lock(intel_dp, wakeref)
-               edp_panel_off(intel_dp);
+               intel_pps_off_unlocked(intel_dp);
 }
 
 /* Enable backlight in the panel power control. */
@@ -930,7 +930,7 @@ static void vlv_detach_power_sequencer(struct intel_dp *intel_dp)
        if (drm_WARN_ON(&dev_priv->drm, pipe != PIPE_A && pipe != PIPE_B))
                return;
 
-       edp_panel_vdd_off_sync(intel_dp);
+       intel_pps_vdd_off_sync_unlocked(intel_dp);
 
        /*
         * VLV seems to get confused when multiple power sequencers
@@ -1245,7 +1245,7 @@ intel_dp_init_panel_power_sequencer_registers(struct intel_dp *intel_dp,
         * hooked up to any port. This would mess up the
         * power domain tracking the first time we pick
         * one of these power sequencers for use since
-        * edp_panel_vdd_on() would notice that the VDD was
+        * intel_pps_vdd_on_unlocked() would notice that the VDD was
         * already on and therefore wouldn't grab the power
         * domain reference. Disable VDD first to avoid this.
         * This also avoids spuriously turning the VDD on as
index 69f670678d0e649629093e7d90585088c4e682bb..e7f0473be9a7dab5b34c9facb32ac2ce7b87add9 100644 (file)
@@ -27,11 +27,11 @@ void intel_pps_backlight_on(struct intel_dp *intel_dp);
 void intel_pps_backlight_off(struct intel_dp *intel_dp);
 void intel_pps_backlight_power(struct intel_connector *connector, bool enable);
 
-bool edp_panel_vdd_on(struct intel_dp *intel_dp);
-void edp_panel_vdd_off(struct intel_dp *intel_dp, bool sync);
-void edp_panel_vdd_off_sync(struct intel_dp *intel_dp);
-void edp_panel_on(struct intel_dp *intel_dp);
-void edp_panel_off(struct intel_dp *intel_dp);
+bool intel_pps_vdd_on_unlocked(struct intel_dp *intel_dp);
+void intel_pps_vdd_off_unlocked(struct intel_dp *intel_dp, bool sync);
+void intel_pps_vdd_off_sync_unlocked(struct intel_dp *intel_dp);
+void intel_pps_on_unlocked(struct intel_dp *intel_dp);
+void intel_pps_off_unlocked(struct intel_dp *intel_dp);
 void edp_panel_vdd_work(struct work_struct *__work);
 
 void intel_pps_vdd_sanitize(struct intel_dp *intel_dp);