From patchwork Tue Nov 19 06:07:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vandana.kannan@intel.com X-Patchwork-Id: 3200201 Return-Path: X-Original-To: patchwork-intel-gfx@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 EA5849F26C for ; Tue, 19 Nov 2013 06:01:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1887120142 for ; Tue, 19 Nov 2013 06:01:30 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 1B5A7200DB for ; Tue, 19 Nov 2013 06:01:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 20B2CFD4C2 for ; Mon, 18 Nov 2013 22:01:29 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 36598FD484 for ; Mon, 18 Nov 2013 22:00:30 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 18 Nov 2013 22:00:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.93,535,1378882800"; d="scan'208";a="437577615" Received: from vkannan-desktop.iind.intel.com ([10.223.25.35]) by orsmga002.jf.intel.com with ESMTP; 18 Nov 2013 22:00:28 -0800 From: Vandana Kannan To: intel-gfx@lists.freedesktop.org Date: Tue, 19 Nov 2013 11:37:03 +0530 Message-Id: <1384841225-4688-6-git-send-email-vandana.kannan@intel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1384841225-4688-1-git-send-email-vandana.kannan@intel.com> References: <1384841225-4688-1-git-send-email-vandana.kannan@intel.com> Subject: [Intel-gfx] [PATCH 5/6] drm/i915: Support to read DMRRS field from VBT structure 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 X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 From: Pradeep Bhat This patch provides necessary support to read the Dynamic Media Refresh Rate (DMRRS) field from VBT. This information will be used by DRRS feature to create additional refresh rates needed for media use cases like video playback. This patch is tested by enabling DRM Logs. This feature is for PV2 and not PV1. Signed-off-by: Pradeep Bhat Signed-off-by: Vandana Kannan --- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/intel_bios.c | 4 +++- drivers/gpu/drm/i915/intel_bios.h | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 7d228db..541791c 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -1151,6 +1151,8 @@ struct intel_vbt_data { int drrs_mode; /* DRRS enabled or disabled in VBT */ bool intel_drrs_enabled; + /* Dynamic media refresh rate enable/disable */ + bool intel_dmrrs_enabled; /* eDP */ int edp_rate; diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c index 4aaa0f9..c65dc7a 100644 --- a/drivers/gpu/drm/i915/intel_bios.c +++ b/drivers/gpu/drm/i915/intel_bios.c @@ -510,7 +510,9 @@ parse_driver_features(struct drm_i915_private *dev_priv, dev_priv->render_reclock_avail = true; dev_priv->vbt.intel_drrs_enabled = driver->intel_drrs_state; - DRM_DEBUG_KMS("DRRS State Enabled : %d\n", driver->intel_drrs_state); + dev_priv->vbt.intel_dmrrs_enabled = driver->dmrrs_state; + DRM_DEBUG_KMS("DRRS State Enabled : %d DMRRS: %d\n", + driver->intel_drrs_state, driver->dmrrs_state); } static void diff --git a/drivers/gpu/drm/i915/intel_bios.h b/drivers/gpu/drm/i915/intel_bios.h index 8ac6e1e..56b24b7 100644 --- a/drivers/gpu/drm/i915/intel_bios.h +++ b/drivers/gpu/drm/i915/intel_bios.h @@ -489,7 +489,9 @@ struct bdb_driver_features { u16 intel_tbt_state:1; u16 psr_state:1; u16 ips_state:1; - u16 reserved3:4; + u16 dfps_state:1; + u16 dmrrs_state:1; + u16 reserved3:2; u16 pc_feature_validity:1; } __attribute__((packed));