[v2,4/5] drm/i915/vlv: move the vlv PLL helper next to its platform counterparts
diff mbox

Message ID 1435005352-27604-1-git-send-email-imre.deak@intel.com
State New
Headers show

Commit Message

Imre Deak June 22, 2015, 8:35 p.m. UTC
Move the helper next to the PLL helpers of the other platforms for
clarity.

No functional change.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

Comments

sonika.jindal@intel.com June 30, 2015, 3:13 a.m. UTC | #1
Reviewed-by: Sonika Jindal <sonika.jindal@intel.com>

On 6/23/2015 2:05 AM, Imre Deak wrote:
> Move the helper next to the PLL helpers of the other platforms for
> clarity.
>
> No functional change.
>
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
>   drivers/gpu/drm/i915/intel_display.c | 20 ++++++++++----------
>   1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index b030ce4..fb7fd5f 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -418,16 +418,6 @@ static const intel_limit_t intel_limits_bxt = {
>   	.p2 = { .p2_slow = 1, .p2_fast = 20 },
>   };
>
> -static void vlv_clock(int refclk, intel_clock_t *clock)
> -{
> -	clock->m = clock->m1 * clock->m2;
> -	clock->p = clock->p1 * clock->p2;
> -	if (WARN_ON(clock->n == 0 || clock->p == 0))
> -		return;
> -	clock->vco = DIV_ROUND_CLOSEST(refclk * clock->m, clock->n);
> -	clock->dot = DIV_ROUND_CLOSEST(clock->vco, clock->p);
> -}
> -
>   static bool
>   needs_modeset(struct drm_crtc_state *state)
>   {
> @@ -589,6 +579,16 @@ static void i9xx_clock(int refclk, intel_clock_t *clock)
>   	clock->dot = DIV_ROUND_CLOSEST(clock->vco, clock->p);
>   }
>
> +static void vlv_clock(int refclk, intel_clock_t *clock)
> +{
> +	clock->m = clock->m1 * clock->m2;
> +	clock->p = clock->p1 * clock->p2;
> +	if (WARN_ON(clock->n == 0 || clock->p == 0))
> +		return;
> +	clock->vco = DIV_ROUND_CLOSEST(refclk * clock->m, clock->n);
> +	clock->dot = DIV_ROUND_CLOSEST(clock->vco, clock->p);
> +}
> +
>   static void chv_clock(int refclk, intel_clock_t *clock)
>   {
>   	clock->m = clock->m1 * clock->m2;
>

Patch
diff mbox

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index b030ce4..fb7fd5f 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -418,16 +418,6 @@  static const intel_limit_t intel_limits_bxt = {
 	.p2 = { .p2_slow = 1, .p2_fast = 20 },
 };
 
-static void vlv_clock(int refclk, intel_clock_t *clock)
-{
-	clock->m = clock->m1 * clock->m2;
-	clock->p = clock->p1 * clock->p2;
-	if (WARN_ON(clock->n == 0 || clock->p == 0))
-		return;
-	clock->vco = DIV_ROUND_CLOSEST(refclk * clock->m, clock->n);
-	clock->dot = DIV_ROUND_CLOSEST(clock->vco, clock->p);
-}
-
 static bool
 needs_modeset(struct drm_crtc_state *state)
 {
@@ -589,6 +579,16 @@  static void i9xx_clock(int refclk, intel_clock_t *clock)
 	clock->dot = DIV_ROUND_CLOSEST(clock->vco, clock->p);
 }
 
+static void vlv_clock(int refclk, intel_clock_t *clock)
+{
+	clock->m = clock->m1 * clock->m2;
+	clock->p = clock->p1 * clock->p2;
+	if (WARN_ON(clock->n == 0 || clock->p == 0))
+		return;
+	clock->vco = DIV_ROUND_CLOSEST(refclk * clock->m, clock->n);
+	clock->dot = DIV_ROUND_CLOSEST(clock->vco, clock->p);
+}
+
 static void chv_clock(int refclk, intel_clock_t *clock)
 {
 	clock->m = clock->m1 * clock->m2;