diff mbox

[5/6] drm/i915: Support to read DMRRS field from VBT structure

Message ID 1384841225-4688-6-git-send-email-vandana.kannan@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

vandana.kannan@intel.com Nov. 19, 2013, 6:07 a.m. UTC
From: Pradeep Bhat <pradeep.bhat@intel.com>

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 <pradeep.bhat@intel.com>
Signed-off-by: Vandana Kannan <vandana.kannan@intel.com>
---
 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 mbox

Patch

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));