From patchwork Mon Feb 15 15:09:33 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaime Velasco Juan X-Patchwork-Id: 79418 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1FFDrnW001529 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 15 Feb 2010 15:14:30 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Nh2cw-0006tL-Nc; Mon, 15 Feb 2010 15:12:46 +0000 Received: from sfi-mx-4.v28.ch3.sourceforge.com ([172.29.28.124] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Nh2aX-0003qD-Gi for dri-devel@lists.sourceforge.net; Mon, 15 Feb 2010 15:10:17 +0000 Received-SPF: pass (sfi-mx-4.v28.ch3.sourceforge.com: domain of gmail.com designates 72.14.220.153 as permitted sender) client-ip=72.14.220.153; envelope-from=jsagarribay@gmail.com; helo=fg-out-1718.google.com; Received: from fg-out-1718.google.com ([72.14.220.153]) by sfi-mx-4.v28.ch3.sourceforge.com with esmtp (Exim 4.69) id 1Nh2aV-0006nB-Or for dri-devel@lists.sourceforge.net; Mon, 15 Feb 2010 15:10:17 +0000 Received: by fg-out-1718.google.com with SMTP id 16so144992fgg.10 for ; Mon, 15 Feb 2010 07:10:09 -0800 (PST) Received: by 10.87.11.34 with SMTP id o34mr9188591fgi.26.1266246608872; Mon, 15 Feb 2010 07:10:08 -0800 (PST) Received: from pogo (217.Red-79-149-93.staticIP.rima-tde.net [79.149.93.217]) by mx.google.com with ESMTPS id 14sm3066543fxm.3.2010.02.15.07.10.06 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 15 Feb 2010 07:10:08 -0800 (PST) Received: from jaime by pogo with local (Exim 4.71) (envelope-from ) id 1Nh2aE-000100-Rs; Mon, 15 Feb 2010 15:09:59 +0000 From: Jaime Velasco Juan To: airlied@linux.ie Subject: [PATCH] radeon/PM Really wait for vblank before reclocking Date: Mon, 15 Feb 2010 15:09:33 +0000 Message-Id: <1266246573-3810-1-git-send-email-jsagarribay@gmail.com> X-Mailer: git-send-email 1.6.6.1 X-Spam-Score: -1.5 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record -0.0 DKIM_VERIFIED Domain Keys Identified Mail: signature passes verification 0.0 DKIM_SIGNED Domain Keys Identified Mail: message has a signature X-Headers-End: 1Nh2aV-0006nB-Or X-Mailman-Approved-At: Mon, 15 Feb 2010 15:12:45 +0000 Cc: Jaime Velasco Juan , dri-devel@lists.sourceforge.net X-BeenThere: dri-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.sourceforge.net X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 15 Feb 2010 15:14:30 +0000 (UTC) diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index a8e151e..842952f 100644 --- a/drivers/gpu/drm/radeon/radeon_pm.c +++ b/drivers/gpu/drm/radeon/radeon_pm.c @@ -337,10 +337,12 @@ static void radeon_pm_set_clocks(struct radeon_device *rdev) rdev->pm.req_vblank |= (1 << 1); drm_vblank_get(rdev->ddev, 1); } - if (rdev->pm.active_crtcs) - wait_event_interruptible_timeout( - rdev->irq.vblank_queue, 0, - msecs_to_jiffies(RADEON_WAIT_VBLANK_TIMEOUT)); + if (rdev->pm.active_crtcs) { + long timeout = msecs_to_jiffies(RADEON_WAIT_VBLANK_TIMEOUT); + __wait_event_interruptible_timeout( + rdev->irq.vblank_queue, 1, + timeout); + } if (rdev->pm.req_vblank & (1 << 0)) { rdev->pm.req_vblank &= ~(1 << 0); drm_vblank_put(rdev->ddev, 0);