From patchwork Wed Oct 24 19:01:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 1640191 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id AB22ADFABE for ; Wed, 24 Oct 2012 19:05:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AC658A02D3 for ; Wed, 24 Oct 2012 12:05:34 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-gh0-f177.google.com (mail-gh0-f177.google.com [209.85.160.177]) by gabe.freedesktop.org (Postfix) with ESMTP id BD268A0920 for ; Wed, 24 Oct 2012 12:04:47 -0700 (PDT) Received: by mail-gh0-f177.google.com with SMTP id f20so169310ghb.36 for ; Wed, 24 Oct 2012 12:04:47 -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; bh=63T/itlUc5p1ZILadTmU1iUt0N8syo5pWE1VGhlaOfo=; b=iwa7yKn0xSqTvd60HsCKDI+MF3fB9jHZltLP6zkmf245ky0zhCv+IYJXjOhnqKedZ7 6YGbrM9dvI9YFEBgnoLtVMGLKzLuLnuV9CyREb/cBNPaSLAOTnO51VUbdAnSeNy1T18J MNFZN+yrmUazpRP0LjNzgAwhQkAG7l3y17mLTW4OpQitRvnUpF3ODmoEN0y3bJuYvBJU ynhwP4O41ULQ/oHrcyxgMEpKQibTYPmloXlbl/L81DrGiKpjq6sKoNFhPZGZ4ikHJgJS 3hLtsXvdWddCKDWwOEUJ3d9Km70KmKq1vqbrHE8pyxbDoN+d3piHh3xR8whZd9AoBJZ0 nJUg== Received: by 10.236.134.18 with SMTP id r18mr16485543yhi.45.1351105487170; Wed, 24 Oct 2012 12:04:47 -0700 (PDT) Received: from localhost.localdomain (200.188.217.18.dedicated.neoviatelecom.com.br. [200.188.217.18]) by mx.google.com with ESMTPS id b11sm14046391ank.21.2012.10.24.12.04.45 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 24 Oct 2012 12:04:46 -0700 (PDT) From: Rodrigo Vivi To: intel-gfx@lists.freedesktop.org Date: Wed, 24 Oct 2012 17:01:22 -0200 Message-Id: <1351105282-26499-1-git-send-email-rodrigo.vivi@gmail.com> X-Mailer: git-send-email 1.7.11.7 Subject: [Intel-gfx] [PATCH] drm/i915: Respect HW RC6 states availability X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org If Hardware doesn't allow RC6p or RC6pp we shall avoid end users turning them on, falling back to the only RC6 deepness available. Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/i915/intel_pm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 50f5809..a8c6c08 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -2370,7 +2370,7 @@ static void gen6_disable_rps(struct drm_device *dev) int intel_enable_rc6(const struct drm_device *dev) { /* Respect the kernel parameter if it is set */ - if (i915_enable_rc6 >= 0) + if (i915_enable_rc6 = 0) return i915_enable_rc6; if (INTEL_INFO(dev)->gen == 5) { @@ -2394,6 +2394,9 @@ int intel_enable_rc6(const struct drm_device *dev) return INTEL_RC6_ENABLE; } + if (i915_enable_rc6 > 0) + return i915_enable_rc6; + DRM_DEBUG_DRIVER("RC6 and deep RC6 enabled\n"); return (INTEL_RC6_ENABLE | INTEL_RC6p_ENABLE); }