From patchwork Tue May 2 15:07:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: oscar.mateo@intel.com X-Patchwork-Id: 9708609 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5554C60385 for ; Tue, 2 May 2017 22:07:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 44890284DA for ; Tue, 2 May 2017 22:07:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 35F9A284EE; Tue, 2 May 2017 22:07:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00, DATE_IN_PAST_06_12, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C671D284DA for ; Tue, 2 May 2017 22:07:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2DAB96E284; Tue, 2 May 2017 22:07:55 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id D64FE6E284 for ; Tue, 2 May 2017 22:07:53 +0000 (UTC) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 May 2017 15:07:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.38,281,1491289200"; d="scan'208"; a="1142856589" Received: from omateolo-linux.fm.intel.com ([10.1.27.118]) by fmsmga001.fm.intel.com with ESMTP; 02 May 2017 15:07:53 -0700 From: Oscar Mateo To: intel-gfx@lists.freedesktop.org Date: Tue, 2 May 2017 15:07:54 +0000 Message-Id: <1493737674-5282-1-git-send-email-oscar.mateo@intel.com> X-Mailer: git-send-email 1.9.1 Subject: [Intel-gfx] [RFC] drm/i915: Allow the UMD to configure their own power clock state X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP This allows userspace to shutdown slices at will for performance/power reasons (because it doesn't have a use for more slices). Cc: Dmitry Rogozhkin Cc: Chris Wilson Signed-off-by: Oscar Mateo --- drivers/gpu/drm/i915/intel_engine_cs.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c index 402769d..17ff88d 100644 --- a/drivers/gpu/drm/i915/intel_engine_cs.c +++ b/drivers/gpu/drm/i915/intel_engine_cs.c @@ -628,6 +628,7 @@ static int wa_ring_whitelist_reg(struct intel_engine_cs *engine, static int gen8_init_workarounds(struct intel_engine_cs *engine) { struct drm_i915_private *dev_priv = engine->i915; + int ret; WA_SET_BIT_MASKED(INSTPM, INSTPM_FORCE_ORDERING); @@ -673,6 +674,11 @@ static int gen8_init_workarounds(struct intel_engine_cs *engine) GEN6_WIZ_HASHING_MASK, GEN6_WIZ_HASHING_16x4); + /* Allow the UMD to configure their own power clock state */ + ret = wa_ring_whitelist_reg(engine, GEN8_R_PWR_CLK_STATE); + if (ret) + return ret; + return 0; } @@ -841,6 +847,11 @@ static int gen9_init_workarounds(struct intel_engine_cs *engine) if (ret) return ret; + /* Allow the UMD to configure their own power clock state */ + ret = wa_ring_whitelist_reg(engine, GEN8_R_PWR_CLK_STATE); + if (ret) + return ret; + return 0; }