From patchwork Wed Jun 26 17:51:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Joshua C." X-Patchwork-Id: 2791711 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C57369F756 for ; Thu, 27 Jun 2013 10:59:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6548A2021C for ; Thu, 27 Jun 2013 10:59:26 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 283442020A for ; Thu, 27 Jun 2013 10:59:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2F81FE6118 for ; Thu, 27 Jun 2013 03:59:25 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ee0-f44.google.com (mail-ee0-f44.google.com [74.125.83.44]) by gabe.freedesktop.org (Postfix) with ESMTP id 5EA58E5C3D for ; Wed, 26 Jun 2013 10:51:52 -0700 (PDT) Received: by mail-ee0-f44.google.com with SMTP id c13so7519093eek.17 for ; Wed, 26 Jun 2013 10:51:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=NGyn2exA00FaHv0Y2/3e43P/o4K8jTeBN7hpZewBD5k=; b=QREx7ht5me1yillvPiopOvVJadIEyHYmAqxnEnxDwngmZOS6VuUlJIfjXCXaSFVLh3 j3ukKWcsyQczeHehO3VgV8iwlUsUeoHk4PzQICy7/eVkVXHCOoRwrWAD6WwVyJHqeln0 lVv0eerTrTgD1R0gg+CI0rCi9XEAI4FEKxHiiTDJqX8/7XY5Kcpt+rvv9+m+uGFCJIE2 FC7tb16rXYIkvRg2/NjTK0bH9vDcFir8NXUH3CZHlhlZwDlA0xLpUyZwpKadOLXqDAwb RX7GC/zzLJr/4Kwh441KeJMk3lpNn/9JJMTS+vMuwA+7wG44ybNG2kdWcvQuxsoR8YVu CvxA== MIME-Version: 1.0 X-Received: by 10.15.61.67 with SMTP id h43mr5155842eex.102.1372269111294; Wed, 26 Jun 2013 10:51:51 -0700 (PDT) Received: by 10.223.170.129 with HTTP; Wed, 26 Jun 2013 10:51:50 -0700 (PDT) Date: Wed, 26 Jun 2013 19:51:50 +0200 Message-ID: Subject: RADEON / DPM: GPU cannot properly up-clock From: "Joshua C." To: dri-devel@lists.freedesktop.org X-Mailman-Approved-At: Thu, 27 Jun 2013 03:51:42 -0700 Cc: Alex Deucher X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP First of all thank you guys for pushing this out! Great work! I tried the latest code in drm-next-3.11-wip (up to commit b3c1e0c3ba885db44 “drm/radeon: fix endian issues in atombios dpm code”) in connection with the latest radeon_ucode (latest update on 2013-06-26). I also reintroduced the debugfs info so that I can better observe the gpu-settings. For this I put back the following patch: --- 1.8.2.1 Everything works fine, however I think that my gpu (ati 6670, see below) doesn't reclock properly (OR doesn't reclock at all). I observed the gpu-temps and compared those with the readings when using “profile” and “dynpm”. Usually (with dynpm) the temps stay low and jump up when I start glxgears or any HD-movie. With the latest dpm my temps and the gpu stay in the lowest profile all the time. It doesn't reclock even if I start any demanding work like HD-Movie. Dmesg shows this: *** [ 1.307529] == power state 0 == [ 1.307530] ui class: none [ 1.307531] internal class: boot [ 1.307532] caps: [ 1.307533] uvd vclk: 0 dclk: 0 [ 1.307534] power level 0 sclk: 10000 mclk: 15000 vddc: 900 vddci: 0 [ 1.307535] power level 1 sclk: 10000 mclk: 15000 vddc: 900 vddci: 0 [ 1.307536] power level 2 sclk: 10000 mclk: 15000 vddc: 900 vddci: 0 [ 1.307537] status: c r b [ 1.307538] == power state 1 == [ 1.307539] ui class: performance [ 1.307539] internal class: none [ 1.307540] caps: [ 1.307541] uvd vclk: 0 dclk: 0 [ 1.307542] power level 0 sclk: 10000 mclk: 15000 vddc: 900 vddci: 0 [ 1.307543] power level 1 sclk: 40000 mclk: 100000 vddc: 1100 vddci: 0 [ 1.307544] power level 2 sclk: 80000 mclk: 100000 vddc: 1100 vddci: 0 [ 1.307544] status: [ 1.307545] == power state 2 == [ 1.307546] ui class: none [ 1.307546] internal class: uvd [ 1.307547] caps: video [ 1.307549] uvd vclk: 70000 dclk: 56000 [ 1.307549] power level 0 sclk: 80000 mclk: 100000 vddc: 1100 vddci: 0 [ 1.307550] power level 1 sclk: 80000 mclk: 100000 vddc: 1100 vddci: 0 [ 1.307551] power level 2 sclk: 80000 mclk: 100000 vddc: 1100 vddci: 0 [ 1.307552] status: [ 1.311858] switching from power state: [ 1.311859] ui class: none [ 1.311860] internal class: boot [ 1.311860] caps: [ 1.311861] uvd vclk: 0 dclk: 0 [ 1.311862] power level 0 sclk: 10000 mclk: 15000 vddc: 900 vddci: 0 [ 1.311863] power level 1 sclk: 10000 mclk: 15000 vddc: 900 vddci: 0 [ 1.311864] power level 2 sclk: 10000 mclk: 15000 vddc: 900 vddci: 0 [ 1.311865] status: c b [ 1.311866] switching to power state: [ 1.311866] ui class: performance [ 1.311867] internal class: none [ 1.311868] caps: [ 1.311869] uvd vclk: 0 dclk: 0 [ 1.311869] power level 0 sclk: 10000 mclk: 15000 vddc: 900 vddci: 0 [ 1.311870] power level 1 sclk: 40000 mclk: 100000 vddc: 1100 vddci: 0 [ 1.311871] power level 2 sclk: 80000 mclk: 100000 vddc: 1100 vddci: 0 [ 1.311872] status: r and later (other dmesg output is attached) [ 1.360509] switching from power state: [ 1.360510] ui class: performance [ 1.360510] internal class: none [ 1.360511] caps: [ 1.360511] uvd vclk: 0 dclk: 0 [ 1.360512] power level 0 sclk: 10000 mclk: 15000 vddc: 900 vddci: 0 [ 1.360512] power level 1 sclk: 40000 mclk: 100000 vddc: 1100 vddci: 0 [ 1.360513] power level 2 sclk: 80000 mclk: 100000 vddc: 1100 vddci: 0 [ 1.360513] status: c r [ 1.360514] switching to power state: [ 1.360514] ui class: performance [ 1.360515] internal class: none [ 1.360515] caps: [ 1.360515] uvd vclk: 0 dclk: 0 [ 1.360516] power level 0 sclk: 10000 mclk: 15000 vddc: 900 vddci: 0 [ 1.360516] power level 1 sclk: 40000 mclk: 100000 vddc: 1100 vddci: 0 [ 1.360517] power level 2 sclk: 80000 mclk: 100000 vddc: 1100 vddci: 0 [ 1.360517] status: c r *** The radeon_pm_info shows all the time: [root@localhost ~]# cat /sys/kernel/debug/dri/0/radeon_pm_info default engine clock: 800000 kHz current engine clock: 99990 kHz default memory clock: 1000000 kHz current memory clock: 150000 kHz voltage: 1100 mV PCIE lanes: 16 When using the “dynpm” settings I could see the voltage dropping back to 900mV (as in performace, power level 0) but now it stays high all the time. When playing a HD-Moving I can see the film in a “slow-motion” which also confirms that the gpu doesn't reclock. Setting dynpm reclocks fine and the HD-movie plays smoothly. My gpu is: 01:00.0 VGA compatible controller: ATI Technologies Inc Turks XT [AMD Radeon HD 6600 Series] (prog-if 00 [VGA controller]) Subsystem: PC Partner Limited Device e194 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+ Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- Capabilities: [150 v1] Advanced Error Reporting UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol- UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol- UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol- CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+ CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+ AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn- Kernel driver in use: radeon Can some take a look at this? Thanks, joshua diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index 7ba5d6f..9367234 100644 --- a/drivers/gpu/drm/radeon/radeon_pm.c +++ b/drivers/gpu/drm/radeon/radeon_pm.c @@ -1066,6 +1066,11 @@ static int radeon_pm_init_dpm(struct radeon_device *rdev) ret = device_create_file(rdev->dev, &dev_attr_power_method); if (ret) DRM_ERROR("failed to create device file for power method\n"); + + if (radeon_debugfs_pm_init(rdev)) { + DRM_ERROR("Failed to register debugfs file for PM!\n"); + } + DRM_INFO("radeon: dpm initialized\n"); }