From patchwork Fri Apr 11 15:24:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christian_K=C3=B6nig?= X-Patchwork-Id: 3970091 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8530BBFF02 for ; Fri, 11 Apr 2014 15:24:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AEC4E20783 for ; Fri, 11 Apr 2014 15:24:42 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 54B01201DC for ; Fri, 11 Apr 2014 15:24:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5B4CD6EDED; Fri, 11 Apr 2014 08:24:40 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from pegasos-out.vodafone.de (pegasos-out.vodafone.de [80.84.1.38]) by gabe.freedesktop.org (Postfix) with ESMTP id 706516EDED for ; Fri, 11 Apr 2014 08:24:39 -0700 (PDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by pegasos-out.vodafone.de (Rohrpostix2 Daemon) with ESMTP id 7288A640906 for ; Fri, 11 Apr 2014 17:24:38 +0200 (CEST) X-Virus-Scanned: amavisd-new at vodafone.de X-Spam-Score: 0.2 X-Spam-Level: X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Authentication-Results: rohrpostix2.prod.vfnet.de (amavisd-new); dkim=pass header.i=@vodafone.de Received: from pegasos-out.vodafone.de ([127.0.0.1]) by localhost (rohrpostix2.prod.vfnet.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Abk6vfOyyE61 for ; Fri, 11 Apr 2014 17:24:33 +0200 (CEST) Received: from smtp-04.vodafone.de (xsmail-dmz10.prod.vfnet.de [10.215.254.41]) by pegasos-out.vodafone.de (Rohrpostix2 Daemon) with ESMTP id EC532640BA2 for ; Fri, 11 Apr 2014 17:24:32 +0200 (CEST) X-DKIM: OpenDKIM Filter v2.6.8 pegasos-out.vodafone.de EC532640BA2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafone.de; s=mail; t=1397229872; bh=8nj8dVR7l98eE1fy31+PFXx1A8QrVa55p18p9lTSXsg=; h=From:To:Subject:Date; b=NoSxjKT9Kru+AZtudZqGY7pUW2gzpREwvy1CsCRlxgzOD/T7nO8nRaskxqJiAkdRV cGwHOPJSCxhEtS1iMezuEEdT0pT/u3RamXrq9VeV9XGA4pktCasdmh7/3pdwje9fjR pzVnNxga3eCjgxAG/rGwJuKuN9z3+c5uxB/Ho5hg= Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp-04.vodafone.de (Postfix) with ESMTP id D0D4DE4ED3 for ; Fri, 11 Apr 2014 17:24:32 +0200 (CEST) X-DKIM: OpenDKIM Filter v2.0.2 smtp-04.vodafone.de D0D4DE4ED3 X-Virus-Scanned: amavisd-new at vodafone.de Received: from smtp-04.vodafone.de ([127.0.0.1]) by localhost (xsmail-dmz10.prod.vfnet.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MiBBodGpYttv for ; Fri, 11 Apr 2014 17:24:26 +0200 (CEST) From: =?UTF-8?q?Christian=20K=C3=B6nig?= To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/radeon: apply more strict limits for PLL params v2 Date: Fri, 11 Apr 2014 17:24:25 +0200 Message-Id: <1397229865-2836-1-git-send-email-deathsimple@vodafone.de> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Christian König Letting post and refernce divider get to big is bad for signal stability. v2: increase the limit to 210 Signed-off-by: Christian König Reviewed-by: Alex Deucher --- drivers/gpu/drm/radeon/radeon_display.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c index 386cfa4..2f42912 100644 --- a/drivers/gpu/drm/radeon/radeon_display.c +++ b/drivers/gpu/drm/radeon/radeon_display.c @@ -937,6 +937,9 @@ void radeon_compute_pll_avivo(struct radeon_pll *pll, } post_div = post_div_best; + /* limit reference * post divider to a maximum */ + ref_div_max = min(210 / post_div, ref_div_max); + /* get matching reference and feedback divider */ ref_div = max(den / post_div, 1u); fb_div = nom;