From patchwork Wed Jun 26 13:23:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 2786641 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 4CC2DC0AB1 for ; Wed, 26 Jun 2013 15:29:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 141552057D for ; Wed, 26 Jun 2013 15:29:36 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id E498220548 for ; Wed, 26 Jun 2013 15:29:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E1741E5D29 for ; Wed, 26 Jun 2013 08:29:34 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qa0-f49.google.com (mail-qa0-f49.google.com [209.85.216.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 14235E6339 for ; Wed, 26 Jun 2013 06:25:31 -0700 (PDT) Received: by mail-qa0-f49.google.com with SMTP id hu16so1510226qab.15 for ; Wed, 26 Jun 2013 06:25:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=Vgmsh3kU9PuWjXPmego1iO2/NTblMXdB5HS0gPKg3aQ=; b=nYle2flcfT4uRxicpXK2EXLtR5ZmdCj3vXF7P3E1FIASfGPHKUv6Yk6Q4fir+KMRV9 WZjbyfCMc4X9cVqHWMOyB4zeUKEd78689uVk0T+zj/rczn/XBKgYq7hTD5JMUiyQciFm UUAUkv5nRxLFFfWYDUGuhMcJQSRtQUYrz42IxDf1MoHG9ItyfUzaFm4eLbW8oe0KZ+T1 xsU3GaH5YuY+DFIYO4FCBN6e4gMquhZxd52A+W58wKpbsOJnR2PAtEuBTuHTlx/T0EZG VAzBi8HFOrGC66nYFL2jpUynp5kHJRt+EjZdh45tZIsEj9zYWoLYH2suqDoTWnIshTnm x/wA== X-Received: by 10.224.22.143 with SMTP id n15mr5359061qab.93.1372253129807; Wed, 26 Jun 2013 06:25:29 -0700 (PDT) Received: from localhost.localdomain (static-74-96-105-49.washdc.fios.verizon.net. [74.96.105.49]) by mx.google.com with ESMTPSA id r10sm32665096qeu.4.2013.06.26.06.25.29 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 26 Jun 2013 06:25:29 -0700 (PDT) From: alexdeucher@gmail.com To: dri-devel@lists.freedesktop.org Subject: [PATCH 109/165] drm/radeon/dpm: remove broken dyn state remnants Date: Wed, 26 Jun 2013 09:23:09 -0400 Message-Id: <1372253045-17042-110-git-send-email-alexdeucher@gmail.com> X-Mailer: git-send-email 1.7.7.5 In-Reply-To: <1372253045-17042-1-git-send-email-alexdeucher@gmail.com> References: <1372253045-17042-1-git-send-email-alexdeucher@gmail.com> 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: , MIME-Version: 1.0 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 From: Alex Deucher Now that the proper fix has been implemented I can remove the last remnants of the initial implementation. Signed-off-by: Alex Deucher --- drivers/gpu/drm/radeon/radeon.h | 1 - drivers/gpu/drm/radeon/radeon_pm.c | 24 +++++------------------- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 657d224..0c6676a 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h @@ -1307,7 +1307,6 @@ struct radeon_dpm { struct radeon_ps *boot_ps; /* default uvd power state */ struct radeon_ps *uvd_ps; - struct radeon_ps hw_ps; enum radeon_pm_state_type state; enum radeon_pm_state_type user_state; u32 platform_caps; diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index a50efb0..c8688b3 100644 --- a/drivers/gpu/drm/radeon/radeon_pm.c +++ b/drivers/gpu/drm/radeon/radeon_pm.c @@ -687,17 +687,6 @@ restart_search: return NULL; } -static void radeon_dpm_update_requested_ps(struct radeon_device *rdev, - struct radeon_ps *ps) -{ - /* copy the ps to the hw ps and point the requested ps - * at the hw state in case the driver wants to modify - * the state dynamically. - */ - rdev->pm.dpm.hw_ps = *ps; - rdev->pm.dpm.requested_ps = &rdev->pm.dpm.hw_ps; -} - static void radeon_dpm_change_power_state_locked(struct radeon_device *rdev) { int i; @@ -719,7 +708,7 @@ static void radeon_dpm_change_power_state_locked(struct radeon_device *rdev) ps = radeon_dpm_pick_power_state(rdev, dpm_state); if (ps) - radeon_dpm_update_requested_ps(rdev, ps); + rdev->pm.dpm.requested_ps = ps; else return; @@ -770,11 +759,9 @@ static void radeon_dpm_change_power_state_locked(struct radeon_device *rdev) down_write(&rdev->pm.mclk_lock); mutex_lock(&rdev->ring_lock); - if (rdev->asic->dpm.pre_set_power_state) { - ret = radeon_dpm_pre_set_power_state(rdev); - if (ret) - goto done; - } + ret = radeon_dpm_pre_set_power_state(rdev); + if (ret) + goto done; /* update display watermarks based on new power state */ radeon_bandwidth_update(rdev); @@ -797,8 +784,7 @@ static void radeon_dpm_change_power_state_locked(struct radeon_device *rdev) /* update current power state */ rdev->pm.dpm.current_ps = rdev->pm.dpm.requested_ps; - if (rdev->asic->dpm.post_set_power_state) - radeon_dpm_post_set_power_state(rdev); + radeon_dpm_post_set_power_state(rdev); done: mutex_unlock(&rdev->ring_lock);