From: Daniel Vetter Subject: [PATCH 4/9] drm/i915: fixup g4x pll limits Date: Tue, 21 May 2013 21:54:54 +0200 Message-ID: <1369166099-1840-5-git-send-email-daniel.vetter@ffwll.ch> References: <1369166099-1840-1-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-we0-f169.google.com (mail-we0-f169.google.com [74.125.82.169]) by gabe.freedesktop.org (Postfix) with ESMTP id 8EF31E6262 for ; Tue, 21 May 2013 12:55:13 -0700 (PDT) Received: by mail-we0-f169.google.com with SMTP id q55so616847wes.0 for ; Tue, 21 May 2013 12:55:12 -0700 (PDT) In-Reply-To: <1369166099-1840-1-git-send-email-daniel.vetter@ffwll.ch> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Intel Graphics Development Cc: Daniel Vetter List-Id: intel-gfx@lists.freedesktop.org Again the same confusion that our code expects m1/m2 in register values. This time around with the added fun that many of the existing values have been all off by a bit in different directions. Hence extract a common #define. Note that n limits differ between lvds and other outputs. Strangely they've all been correct already. v2: Rebased on top of the DP pll rework, which makes it even more obvious that we can do this ... Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_display.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index ea8eb0c..cb54131 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -136,14 +136,16 @@ static const intel_limit_t intel_limits_i9xx_lvds = { .p2_slow = 14, .p2_fast = 7 }, }; +#define G4X_DPLL_M_LIMITS \ + .m = { .min = 104, .max = 138 },\ + .m1 = { .min = 15, .max = 21 },\ + .m2 = { .min = 3, .max = 11 }, static const intel_limit_t intel_limits_g4x_sdvo = { .dot = { .min = 25000, .max = 270000 }, .vco = { .min = 1750000, .max = 3500000}, .n = { .min = 1, .max = 4 }, - .m = { .min = 104, .max = 138 }, - .m1 = { .min = 17, .max = 23 }, - .m2 = { .min = 5, .max = 11 }, + G4X_DPLL_M_LIMITS .p = { .min = 10, .max = 30 }, .p1 = { .min = 1, .max = 3}, .p2 = { .dot_limit = 270000, @@ -156,9 +158,7 @@ static const intel_limit_t intel_limits_g4x_hdmi = { .dot = { .min = 22000, .max = 400000 }, .vco = { .min = 1750000, .max = 3500000}, .n = { .min = 1, .max = 4 }, - .m = { .min = 104, .max = 138 }, - .m1 = { .min = 16, .max = 23 }, - .m2 = { .min = 5, .max = 11 }, + G4X_DPLL_M_LIMITS .p = { .min = 5, .max = 80 }, .p1 = { .min = 1, .max = 8}, .p2 = { .dot_limit = 165000, @@ -169,9 +169,7 @@ static const intel_limit_t intel_limits_g4x_single_channel_lvds = { .dot = { .min = 20000, .max = 115000 }, .vco = { .min = 1750000, .max = 3500000 }, .n = { .min = 1, .max = 3 }, - .m = { .min = 104, .max = 138 }, - .m1 = { .min = 17, .max = 23 }, - .m2 = { .min = 5, .max = 11 }, + G4X_DPLL_M_LIMITS .p = { .min = 28, .max = 112 }, .p1 = { .min = 2, .max = 8 }, .p2 = { .dot_limit = 0, @@ -183,9 +181,7 @@ static const intel_limit_t intel_limits_g4x_dual_channel_lvds = { .dot = { .min = 80000, .max = 224000 }, .vco = { .min = 1750000, .max = 3500000 }, .n = { .min = 1, .max = 3 }, - .m = { .min = 104, .max = 138 }, - .m1 = { .min = 17, .max = 23 }, - .m2 = { .min = 5, .max = 11 }, + G4X_DPLL_M_LIMITS .p = { .min = 14, .max = 42 }, .p1 = { .min = 2, .max = 6 }, .p2 = { .dot_limit = 0, -- 1.7.11.7