[Intel-gfx] [PATCH 10/11] drm/i915/bios: Parse the seamless DRRS min refresh rate

Ville Syrjala ville.syrjala at linux.intel.com
Thu Mar 17 17:19:47 UTC 2022


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

Extract the seamless DRRS min refresh rate from the VBT.

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_bios.c | 7 ++++++-
 drivers/gpu/drm/i915/i915_drv.h           | 1 +
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
index 3d56fd440c0b..542ad289cc49 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -648,6 +648,7 @@ parse_lfp_data(struct drm_i915_private *i915,
 	const struct bdb_lvds_lfp_data *data;
 	const struct bdb_lvds_lfp_data_tail *tail;
 	const struct bdb_lvds_lfp_data_ptrs *ptrs;
+	int panel_type = i915->vbt.panel_type;
 
 	ptrs = find_section(i915, bdb, BDB_LVDS_LFP_DATA_PTRS,
 			    sizeof(*ptrs));
@@ -666,7 +667,11 @@ parse_lfp_data(struct drm_i915_private *i915,
 	if (!tail)
 		return;
 
-	(void)tail;
+	i915->vbt.seamless_drrs_min_refresh_rate =
+		tail->seamless_drrs_min_refresh_rate[panel_type];
+	drm_dbg_kms(&i915->drm,
+		    "Seamless DRRS min refresh rate: %d Hz\n",
+		    i915->vbt.seamless_drrs_min_refresh_rate);
 }
 
 static void
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 0f52ce62281e..0d51028ec553 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -329,6 +329,7 @@ struct intel_vbt_data {
 	bool override_afc_startup;
 	u8 override_afc_startup_val;
 
+	u8 seamless_drrs_min_refresh_rate;
 	enum drrs_type drrs_type;
 
 	struct {
-- 
2.34.1



More information about the Intel-gfx mailing list