From patchwork Sun Dec 7 21:10:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ?????? ?????? X-Patchwork-Id: 5452981 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 3B0119F2E8 for ; Sun, 7 Dec 2014 21:10:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 56A1C20155 for ; Sun, 7 Dec 2014 21:10:52 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 344AC20145 for ; Sun, 7 Dec 2014 21:10:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6A9BA6E30A; Sun, 7 Dec 2014 13:10:49 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-la0-f44.google.com (mail-la0-f44.google.com [209.85.215.44]) by gabe.freedesktop.org (Postfix) with ESMTP id AB25E6E2EC for ; Sun, 7 Dec 2014 13:10:48 -0800 (PST) Received: by mail-la0-f44.google.com with SMTP id gd6so2582208lab.17 for ; Sun, 07 Dec 2014 13:10:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=BCbOUPb4vPCj3GbSQcuh3Aejd/ljZ8eMnVFu+Uclhdc=; b=mZDT7F34qm7RR65NSOnun6cYxSzmoNCd9k1Q+9kgEs+anWhoGhES02/7r1GNoVu/rF l+nLk06B9ogAzQvAauWRiR4GRFQzVv7+ajQY51b+WTwdx3t6VUnsHxPmOC3pfmSYOlqd DBSBJ+nFBU88mJ6jm+AmCoU+ndsOeUuIgSFhHivcHTRJ3dVmU/+95GdwPQnd7LtCEwVF lmUgz9+fMhTDJuMI+jB055lGWmM4132xhaojwMOo3XBWCNr7HYwuCVxWQoN1MmCjaikA nYwRhmL48T24vY6ohVLPs6GAcWiI6rJoYUNnepm7NOtBSCgUMLjoo2fbez4oL2Pz38Qh cUhw== X-Received: by 10.112.42.114 with SMTP id n18mr13357722lbl.44.1417986647877; Sun, 07 Dec 2014 13:10:47 -0800 (PST) Received: from Heaven.lan ([95.140.92.49]) by mx.google.com with ESMTPSA id jj7sm10257813lbc.5.2014.12.07.13.10.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 07 Dec 2014 13:10:47 -0800 (PST) From: Oleg Chernovskiy To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/3] add common fan control asic callbacks Date: Mon, 8 Dec 2014 00:10:44 +0300 Message-Id: <1417986646-8989-1-git-send-email-algonkvel@gmail.com> X-Mailer: git-send-email 2.1.3 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 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.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, 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 Adds 4 callbacks for managing fan state/speed * fan_ctrl_set_mode - manages fan control mode (nonzero == manual) * fan_ctrl_get_mode - queries fan control mode * set_fan_speed_percent - manages fan speed as percentage value * get_fan_speed_percent - queries fan speed as percentage value Signed-off-by: Oleg Chernovskiy --- drivers/gpu/drm/radeon/radeon.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 54529b8..4195e6c 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h @@ -1967,6 +1967,10 @@ struct radeon_asic { bool (*vblank_too_short)(struct radeon_device *rdev); void (*powergate_uvd)(struct radeon_device *rdev, bool gate); void (*enable_bapm)(struct radeon_device *rdev, bool enable); + void (*fan_ctrl_set_mode)(struct radeon_device *rdev, u32 mode); + u32 (*fan_ctrl_get_mode)(struct radeon_device *rdev); + int (*set_fan_speed_percent)(struct radeon_device *rdev, u32 speed); + int (*get_fan_speed_percent)(struct radeon_device *rdev, u32 *speed); } dpm; /* pageflipping */ struct {