From patchwork Sun Feb 21 22:46:30 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 81066 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 o1LMluj0022917 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 21 Feb 2010 22:48:32 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NjKZk-0002Y5-1I; Sun, 21 Feb 2010 22:46:56 +0000 Received: from sfi-mx-1.v28.ch3.sourceforge.com ([172.29.28.121] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NjKZj-0002Xz-97 for dri-devel@lists.sourceforge.net; Sun, 21 Feb 2010 22:46:55 +0000 Received-SPF: pass (sfi-mx-1.v28.ch3.sourceforge.com: domain of gmail.com designates 72.14.220.156 as permitted sender) client-ip=72.14.220.156; envelope-from=zajec5@gmail.com; helo=fg-out-1718.google.com; Received: from fg-out-1718.google.com ([72.14.220.156]) by sfi-mx-1.v28.ch3.sourceforge.com with esmtp (Exim 4.69) id 1NjKZh-0004ql-8e for dri-devel@lists.sourceforge.net; Sun, 21 Feb 2010 22:46:54 +0000 Received: by fg-out-1718.google.com with SMTP id l26so584678fgb.10 for ; Sun, 21 Feb 2010 14:46:47 -0800 (PST) Received: by 10.87.40.18 with SMTP id s18mr9862894fgj.7.1266792400082; Sun, 21 Feb 2010 14:46:40 -0800 (PST) Received: from localhost.localdomain (77-253-200-80.ip.netia.com.pl [77.253.200.80]) by mx.google.com with ESMTPS id 15sm1136432fxm.4.2010.02.21.14.46.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 21 Feb 2010 14:46:39 -0800 (PST) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: dri-devel@lists.sourceforge.net, Dave Airlie Subject: [PATCH] drm/radeon/kms: for downclocking non-mobility check PERFORMANCE state Date: Sun, 21 Feb 2010 23:46:30 +0100 Message-Id: <1266792390-13637-1-git-send-email-zajec5@gmail.com> X-Mailer: git-send-email 1.6.4.2 MIME-Version: 1.0 X-Spam-Score: -1.9 (-) 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 -0.4 AWL AWL: From: address is in the auto white-list X-Headers-End: 1NjKZh-0004ql-8e 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: , 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]); Sun, 21 Feb 2010 22:48:33 +0000 (UTC) diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index f46d574..97375d3 100644 --- a/drivers/gpu/drm/radeon/radeon_pm.c +++ b/drivers/gpu/drm/radeon/radeon_pm.c @@ -91,14 +91,24 @@ static struct radeon_power_state * radeon_pick_power_state(struct radeon_device default: return rdev->pm.default_power_state; case POWER_STATE_TYPE_POWERSAVE: - wanted_types[0] = POWER_STATE_TYPE_POWERSAVE; - wanted_types[1] = POWER_STATE_TYPE_BATTERY; - wanted_count = 2; + if (rdev->flags & RADEON_IS_MOBILITY) { + wanted_types[0] = POWER_STATE_TYPE_POWERSAVE; + wanted_types[1] = POWER_STATE_TYPE_BATTERY; + wanted_count = 2; + } else { + wanted_types[0] = POWER_STATE_TYPE_PERFORMANCE; + wanted_count = 1; + } break; case POWER_STATE_TYPE_BATTERY: - wanted_types[0] = POWER_STATE_TYPE_BATTERY; - wanted_types[1] = POWER_STATE_TYPE_POWERSAVE; - wanted_count = 2; + if (rdev->flags & RADEON_IS_MOBILITY) { + wanted_types[0] = POWER_STATE_TYPE_BATTERY; + wanted_types[1] = POWER_STATE_TYPE_POWERSAVE; + wanted_count = 2; + } else { + wanted_types[0] = POWER_STATE_TYPE_PERFORMANCE; + wanted_count = 1; + } break; case POWER_STATE_TYPE_BALANCED: case POWER_STATE_TYPE_PERFORMANCE: