drm/i915: Accept more fixed modes with VRR/DMRRS panels
Subsystems (3)
cover drm/i915: Accept more fixed modes with VRR/DMRRS panels
From: Ville Syrjälä <[email protected]>
VRR panels generally declare modes with different timings instead of just modes with different clocks that we get with DRRS panels. Let's accept more fixed modes for VRR panels.
There are also funny machines that declare DMRRS support but not DRRS support. Treating those as static DRRS seems like the easiest short term solution.
Ville Syrjälä (6):
drm/i915: Parse VRR capability from VBT drm/i915: Print out rejected fixed modes drm/i915: Accept more fixed modes with VRR panels drm/i915/bios: Fix aggressiveness typos drm/i915/bios: Define more BDB contents drm/i915: Treat DMRRS as static DRRS
drivers/gpu/drm/i915/display/intel_bios.c | 29 ++++++++-- .../drm/i915/display/intel_display_types.h | 2 + drivers/gpu/drm/i915/display/intel_dp.c | 3 +- drivers/gpu/drm/i915/display/intel_lvds.c | 3 +- drivers/gpu/drm/i915/display/intel_panel.c | 52 +++++++++++++---- drivers/gpu/drm/i915/display/intel_panel.h | 3 +- drivers/gpu/drm/i915/display/intel_sdvo.c | 2 +- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 58 +++++++++++++++---- drivers/gpu/drm/i915/display/intel_vrr.c | 22 +++++-- 9 files changed, 137 insertions(+), 37 deletions(-)
Signature · 1 line
2.35.1
PATCH 1/6 drm/i915: Parse VRR capability from VBT
From: Ville Syrjälä <[email protected]>
VBT seems to have an extra flag for VRR vs. not. Let's consult that for eDP panels.
--- drivers/gpu/drm/i915/display/intel_bios.c | 5 +++++ .../drm/i915/display/intel_display_types.h | 2 ++ drivers/gpu/drm/i915/display/intel_vrr.c | 22 ++++++++++++++----- 3 files changed, 23 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/display/intel_bios.c +5 -0
@@ -1293,6 +1293,8 @@ parse_power_conservation_features(struct drm_i915_private *i915,const struct bdb_lfp_power *power;u8 panel_type = panel->vbt.panel_type; + panel->vbt.vrr = true;/* matches Windows behaviour */ +if (i915->vbt.version <228 )return ;
@@ -1313,6 +1315,9 @@ parse_power_conservation_features(struct drm_i915_private *i915,if (i915->vbt.version >=232 ) panel->vbt.edp.hobl = power->hobl &BIT (panel_type); + +if (i915->vbt.version >=233 ) + panel->vbt.vrr = power->vrr_feature_enabled &BIT (panel_type); } static void
drivers/gpu/drm/i915/display/intel_display_types.h +2 -0
@@ -294,6 +294,8 @@ struct intel_vbt_panel_data { unsigned int lvds_dither:1;unsigned int bios_lvds_val;/* initial [PCH_]LVDS reg val in VBIOS */ +bool vrr; +u8 seamless_drrs_min_refresh_rate;enum drrs_type drrs_type;
drivers/gpu/drm/i915/display/intel_vrr.c +16 -6
@@ -15,19 +15,29 @@ bool intel_vrr_is_capable(struct intel_connector *connector)struct drm_i915_private *i915 =to_i915 (connector->base.dev);struct intel_dp *intel_dp; -if (connector->base.connector_type != DRM_MODE_CONNECTOR_eDP && - connector->base.connector_type != DRM_MODE_CONNECTOR_DisplayPort) -return false; - - intel_dp =intel_attached_dp (connector);/* * DP Sink is capable of VRR video timings if * Ignore MSA bit is set in DPCD. * EDID monitor range also should be atleast 10 for reasonable * Adaptive Sync or Variable Refresh Rate end user experience. */ +switch (connector->base.connector_type) { +case DRM_MODE_CONNECTOR_eDP: +if (!connector->panel.vbt.vrr) +return false; + fallthrough; +case DRM_MODE_CONNECTOR_DisplayPort: + intel_dp =intel_attached_dp (connector); + +if (!drm_dp_sink_can_do_video_without_timing_msa (intel_dp->dpcd)) +return false; + +break ; +default : +return false; + } +return HAS_VRR (i915) && -drm_dp_sink_can_do_video_without_timing_msa (intel_dp->dpcd) && info->monitor_range.max_vfreq - info->monitor_range.min_vfreq >10 ; }
Signature · 1 line
2.35.1
Re: [Intel-gfx] [PATCH 1/6] drm/i915: Parse VRR capability from VBT
Quoted 74 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
VBT seems to have an extra flag for VRR vs. not. Let's consult that for eDP panels.
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/display/intel_bios.c | 5 +++++ .../drm/i915/display/intel_display_types.h | 2 ++ drivers/gpu/drm/i915/display/intel_vrr.c | 22 ++++++++++++++----- 3 files changed, 23 insertions(+), 6 deletions(-)drivers/gpu/drm/i915/display/intel_bios.c +5
-0@@ -1293,6 +1293,8 @@ parse_power_conservation_features(struct drm_i915_private *i915,const struct bdb_lfp_power *power;u8 panel_type = panel->vbt.panel_type; + panel->vbt.vrr = true;/* matches Windows behaviour */ +if (i915->vbt.version <228 )return ;@@ -1313,6 +1315,9 @@ parse_power_conservation_features(struct drm_i915_private *i915,if (i915->vbt.version >=232 ) panel->vbt.edp.hobl = power->hobl &BIT (panel_type); + +if (i915->vbt.version >=233 ) + panel->vbt.vrr = power->vrr_feature_enabled &BIT (panel_type); } static voiddrivers/gpu/drm/i915/display/intel_display_types.h +2
-0@@ -294,6 +294,8 @@ struct intel_vbt_panel_data { unsigned int lvds_dither:1;unsigned int bios_lvds_val;/* initial [PCH_]LVDS reg val in VBIOS */ +bool vrr; +u8 seamless_drrs_min_refresh_rate;enum drrs_type drrs_type;drivers/gpu/drm/i915/display/intel_vrr.c +7
-5@@ -15,19 +15,29 @@ bool intel_vrr_is_capable(struct intel_connector *connector)struct drm_i915_private *i915 =to_i915 (connector->base.dev);struct intel_dp *intel_dp; -if (connector->base.connector_type != DRM_MODE_CONNECTOR_eDP && - connector->base.connector_type != DRM_MODE_CONNECTOR_DisplayPort) -return false; - - intel_dp =intel_attached_dp (connector);/* * DP Sink is capable of VRR video timings if * Ignore MSA bit is set in DPCD. * EDID monitor range also should be atleast 10 for reasonable * Adaptive Sync or Variable Refresh Rate end user experience. */ +switch (connector->base.connector_type) { +case DRM_MODE_CONNECTOR_eDP: +if (!connector->panel.vbt.vrr) +return false; + fallthrough; +case DRM_MODE_CONNECTOR_DisplayPort: + intel_dp =intel_attached_dp (connector);
drivers/gpu/drm/i915/display/intel_vrr.c bool intel_vrr_is_capable(struct intel_connector *connector) · line 40
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_vrr.c +9
-0+ +if (!drm_dp_sink_can_do_video_without_timing_msa (intel_dp->dpcd)) +return false; + +break ; +default : +return false; + } + return HAS_VRR(i915) &&
Feels like !HAS_VRR() should be an early return at the top. But that's not part of this patch.
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_vrr.c +0
-1-drm_dp_sink_can_do_video_without_timing_msa (intel_dp->dpcd) && info->monitor_range.max_vfreq - info->monitor_range.min_vfreq >10 ; }
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
PATCH 2/6 drm/i915: Print out rejected fixed modes
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
To help with debugging DRRS/VRR panel init let's dump out all the fixed modes we rejected for whatever reason.
--- drivers/gpu/drm/i915/display/intel_panel.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/i915/display/intel_panel.c +4 -0
@@ -217,6 +217,10 @@ static void intel_panel_destroy_probed_modes(struct intel_connector *connector)struct drm_display_mode *mode, *next;list_for_each_entry_safe (mode, next, &connector->base.probed_modes, head) { +drm_dbg_kms (&i915->drm, +"[CONNECTOR:%d:%s] not using EDID mode: " DRM_MODE_FMT "\n" , + connector->base.base.id, connector->base.name, +DRM_MODE_ARG (mode));list_del (&mode->head);drm_mode_destroy (&i915->drm, mode); }
Signature · 1 line
2.35.1
Re: [Intel-gfx] [PATCH 2/6] drm/i915: Print out rejected fixed modes
Quoted 6 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
To help with debugging DRRS/VRR panel init let's dump out all the fixed modes we rejected for whatever reason.
Signed-off-by Ville Syrjälä <[email protected]>
Quoted 19 lines
--- drivers/gpu/drm/i915/display/intel_panel.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/i915/display/intel_panel.c +4
-0@@ -217,6 +217,10 @@ static void intel_panel_destroy_probed_modes(struct intel_connector *connector)struct drm_display_mode *mode, *next;list_for_each_entry_safe (mode, next, &connector->base.probed_modes, head) { +drm_dbg_kms (&i915->drm, +"[CONNECTOR:%d:%s] not using EDID mode: " DRM_MODE_FMT "\n" , + connector->base.base.id, connector->base.name, +DRM_MODE_ARG (mode));list_del (&mode->head);drm_mode_destroy (&i915->drm, mode); }
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
PATCH 3/6 drm/i915: Accept more fixed modes with VRR panels
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
It seem that when dealing with VRR capable eDP panels we need to accept fixed modes with variable vblank length (which is what VRR varies dynamically). Typically the preferred mode seems to be a non-VRR more (lowish dotclock/refresh rate + short vblank).
We also have examples where it looks like even the hblank length is a bit different between the preferred mode vs. VRR mode(s). So let's just accept anything that has matching hdisp+vdisp+flags.
--- drivers/gpu/drm/i915/display/intel_dp.c | 3 +- drivers/gpu/drm/i915/display/intel_lvds.c | 3 +- drivers/gpu/drm/i915/display/intel_panel.c | 48 ++++++++++++++++------ drivers/gpu/drm/i915/display/intel_panel.h | 3 +- drivers/gpu/drm/i915/display/intel_sdvo.c | 2 +- 5 files changed, 43 insertions(+), 16 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +2 -1
@@ -5217,7 +5217,8 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp, IS_ERR(edid) ? NULL : edid);intel_panel_add_edid_fixed_modes (intel_connector, - intel_connector->panel.vbt.drrs_type !=DRRS_TYPE_NONE ); + intel_connector->panel.vbt.drrs_type !=DRRS_TYPE_NONE , +intel_vrr_is_capable (intel_connector));/* MSO requires information from the EDID */ intel_edp_mso_init (intel_dp);
drivers/gpu/drm/i915/display/intel_lvds.c +2 -1
@@ -972,7 +972,8 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)/* Try EDID first */ intel_panel_add_edid_fixed_modes (intel_connector, - intel_connector->panel.vbt.drrs_type !=DRRS_TYPE_NONE ); + intel_connector->panel.vbt.drrs_type !=DRRS_TYPE_NONE , + false);/* Failed to get EDID, what about VBT? */ if (!intel_panel_preferred_fixed_mode (intel_connector))
drivers/gpu/drm/i915/display/intel_panel.c +36 -12
83 lines not on this page · raw message
drivers/gpu/drm/i915/display/intel_panel.h +2 -1
@@ -40,7 +40,8 @@ int intel_panel_fitting(struct intel_crtc_state *crtc_state, const struct drm_connector_state *conn_state);int intel_panel_compute_config (struct intel_connector *connector,struct drm_display_mode *adjusted_mode); -void intel_panel_add_edid_fixed_modes (struct intel_connector *connector,bool has_drrs); +void intel_panel_add_edid_fixed_modes (struct intel_connector *connector, +bool has_drrs,bool has_vrr);void intel_panel_add_vbt_lfp_fixed_mode (struct intel_connector *connector);void intel_panel_add_vbt_sdvo_fixed_mode (struct intel_connector *connector); void intel_panel_add_encoder_fixed_mode(struct intel_connector *connector,
drivers/gpu/drm/i915/display/intel_sdvo.c +1 -1
@@ -2911,7 +2911,7 @@ intel_sdvo_lvds_init(struct intel_sdvo *intel_sdvo, int device)if (!intel_panel_preferred_fixed_mode (intel_connector)) {intel_ddc_get_modes (connector, &intel_sdvo->ddc); -intel_panel_add_edid_fixed_modes (intel_connector, false); +intel_panel_add_edid_fixed_modes (intel_connector, false, false); }intel_panel_init (intel_connector);
Signature · 1 line
2.35.1
Re: [Intel-gfx] [PATCH 3/6] drm/i915: Accept more fixed modes with VRR panels
Quoted 98 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
It seem that when dealing with VRR capable eDP panels we need to accept fixed modes with variable vblank length (which is what VRR varies dynamically). Typically the preferred mode seems to be a non-VRR more (lowish dotclock/refresh rate + short vblank).
We also have examples where it looks like even the hblank length is a bit different between the preferred mode vs. VRR mode(s). So let's just accept anything that has matching hdisp+vdisp+flags.
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 3 +- drivers/gpu/drm/i915/display/intel_lvds.c | 3 +- drivers/gpu/drm/i915/display/intel_panel.c | 48 ++++++++++++++++------ drivers/gpu/drm/i915/display/intel_panel.h | 3 +- drivers/gpu/drm/i915/display/intel_sdvo.c | 2 +- 5 files changed, 43 insertions(+), 16 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +2
-1@@ -5217,7 +5217,8 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp, IS_ERR(edid) ? NULL : edid);intel_panel_add_edid_fixed_modes (intel_connector, - intel_connector->panel.vbt.drrs_type !=DRRS_TYPE_NONE ); + intel_connector->panel.vbt.drrs_type !=DRRS_TYPE_NONE , +intel_vrr_is_capable (intel_connector));/* MSO requires information from the EDID */ intel_edp_mso_init (intel_dp);drivers/gpu/drm/i915/display/intel_lvds.c +2
-1@@ -972,7 +972,8 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)/* Try EDID first */ intel_panel_add_edid_fixed_modes (intel_connector, - intel_connector->panel.vbt.drrs_type !=DRRS_TYPE_NONE ); + intel_connector->panel.vbt.drrs_type !=DRRS_TYPE_NONE , + false);/* Failed to get EDID, what about VBT? */ if (!intel_panel_preferred_fixed_mode (intel_connector))drivers/gpu/drm/i915/display/intel_panel.c +25
-2@@ -71,6 +71,27 @@ intel_panel_fixed_mode(struct intel_connector *connector,return best_mode; } +static bool is_alt_drrs_mode (const struct drm_display_mode *mode, +const struct drm_display_mode *preferred_mode) +{ +return drm_mode_match (mode, preferred_mode, +DRM_MODE_MATCH_TIMINGS | +DRM_MODE_MATCH_FLAGS | +DRM_MODE_MATCH_3D_FLAGS ) && + mode->clock != preferred_mode->clock; +} + +static bool is_alt_vrr_mode (const struct drm_display_mode *mode, +const struct drm_display_mode *preferred_mode) +{ +return drm_mode_match (mode, preferred_mode, +DRM_MODE_MATCH_FLAGS | +DRM_MODE_MATCH_3D_FLAGS ) && + mode->hdisplay == preferred_mode->hdisplay && + mode->vdisplay == preferred_mode->vdisplay && + mode->clock != preferred_mode->clock; +} +const struct drm_display_mode *intel_panel_downclock_mode (struct intel_connector *connector,const struct drm_display_mode *adjusted_mode)@@ -83,7 +104,8 @@ intel_panel_downclock_mode(struct intel_connector *connector,list_for_each_entry (fixed_mode, &connector->panel.fixed_modes, head) {int vrefresh =drm_mode_vrefresh (fixed_mode); -if (vrefresh >= min_vrefresh && vrefresh < max_vrefresh) { +if (is_alt_drrs_mode (fixed_mode, adjusted_mode) && + vrefresh >= min_vrefresh && vrefresh < max_vrefresh) { max_vrefresh = vrefresh; best_mode = fixed_mode; }@@ -151,16 +173,17 @@ int intel_panel_compute_config(struct intel_connector *connector, }static bool is_alt_fixed_mode (const struct drm_display_mode *mode, -const struct drm_display_mode *preferred_mode) +const struct drm_display_mode *preferred_mode, +bool has_vrr)
drivers/gpu/drm/i915/display/intel_panel.c int intel_panel_compute_config(struct intel_connector *connector, · line 182
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_panel.c +4
-5{ -return drm_mode_match (mode, preferred_mode, -DRM_MODE_MATCH_TIMINGS | -DRM_MODE_MATCH_FLAGS | -DRM_MODE_MATCH_3D_FLAGS ) && - mode->clock != preferred_mode->clock; +if (has_vrr) +return is_alt_vrr_mode (mode, preferred_mode); +else +return is_alt_drrs_mode (mode, preferred_mode);
This assumes is_alt_drrs_mode() accepts a subset of is_alt_vrr_mode(). Which is true and fine. But maybe deserves a comment, as otherwise I believe we should try both if the vrr one fails.
A really defensive solution would be to WARN_ON(!is_alt_vrr_mode()) in is_alt_drrs_mode() if everything else is true. Maybe overkill.
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_panel.c +2
-1} -static void intel_panel_add_edid_alt_fixed_modes (struct intel_connector *connector) +static void intel_panel_add_edid_alt_fixed_modes (struct intel_connector *connector, +bool has_vrr) {struct drm_i915_private *dev_priv =to_i915 (connector->base.dev); const struct drm_display_mode *preferred_mode =
drivers/gpu/drm/i915/display/intel_panel.c static void intel_panel_add_edid_alt_fixed_modes(struct intel_connector *connect · line 195
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_panel.c +1
-1@@ -168,7 +191,7 @@ static void intel_panel_add_edid_alt_fixed_modes(struct intel_connector *connectstruct drm_display_mode *mode, *next;list_for_each_entry_safe (mode, next, &connector->base.probed_modes, head) { -if (!is_alt_fixed_mode (mode, preferred_mode)) +if (!is_alt_fixed_mode (mode, preferred_mode, has_vrr))continue ;
Should we perhaps debug log if it was vrr or drrs?
Anyway, with the comment added,
The rest is up to you.
Quoted 45 lines
drivers/gpu/drm/i915/display/intel_panel.c +4
-3drm_dbg_kms(&dev_priv->drm,@@ -226,11 +249,12 @@ static void intel_panel_destroy_probed_modes(struct intel_connector *connector) } } -void intel_panel_add_edid_fixed_modes (struct intel_connector *connector,bool has_drrs) +void intel_panel_add_edid_fixed_modes (struct intel_connector *connector, +bool has_drrs,bool has_vrr) {intel_panel_add_edid_preferred_mode (connector); -if (intel_panel_preferred_fixed_mode (connector) && has_drrs) -intel_panel_add_edid_alt_fixed_modes (connector); +if (intel_panel_preferred_fixed_mode (connector) && (has_drrs || has_vrr)) +intel_panel_add_edid_alt_fixed_modes (connector, has_vrr);intel_panel_destroy_probed_modes (connector); }drivers/gpu/drm/i915/display/intel_panel.h +2
-1@@ -40,7 +40,8 @@ int intel_panel_fitting(struct intel_crtc_state *crtc_state, const struct drm_connector_state *conn_state);int intel_panel_compute_config (struct intel_connector *connector,struct drm_display_mode *adjusted_mode); -void intel_panel_add_edid_fixed_modes (struct intel_connector *connector,bool has_drrs); +void intel_panel_add_edid_fixed_modes (struct intel_connector *connector, +bool has_drrs,bool has_vrr);void intel_panel_add_vbt_lfp_fixed_mode (struct intel_connector *connector);void intel_panel_add_vbt_sdvo_fixed_mode (struct intel_connector *connector); void intel_panel_add_encoder_fixed_mode(struct intel_connector *connector,drivers/gpu/drm/i915/display/intel_sdvo.c +1
-1@@ -2911,7 +2911,7 @@ intel_sdvo_lvds_init(struct intel_sdvo *intel_sdvo, int device)if (!intel_panel_preferred_fixed_mode (intel_connector)) {intel_ddc_get_modes (connector, &intel_sdvo->ddc); -intel_panel_add_edid_fixed_modes (intel_connector, false); +intel_panel_add_edid_fixed_modes (intel_connector, false, false); }intel_panel_init (intel_connector);
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
PATCH 4/6 drm/i915/bios: Fix aggressiveness typos
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
Fix various typos around "aggressiveness". Note that the VBT spec also sometimes missspells it as "agressiveness" so I guess that's where some of the typos came from.
--- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/display/intel_vbt_defs.h +4 -4
@@ -856,9 +856,9 @@ struct als_data_entry {u16 lux; } __packed; -struct agressiveness_profile_entry { -u8 dpst_agressiveness :4 ; -u8 lace_agressiveness :4 ; +struct aggressiveness_profile_entry { +u8 dpst_aggressiveness :4 ; +u8 lace_aggressiveness :4 ; } __packed;struct bdb_lfp_power {
@@ -873,7 +873,7 @@ struct bdb_lfp_power {u16 dmrrs;u16 adb;u16 lace_enabled_status; -struct agressiveness_profile_entry aggressivenes[16 ]; +struct aggressiveness_profile_entry aggressiveness[16 ];u16 hobl;/* 232+ */ u16 vrr_feature_enabled;/* 233+ */ } __packed;
Signature · 1 line
2.35.1
Re: [Intel-gfx] [PATCH 4/6] drm/i915/bios: Fix aggressiveness typos
Quoted 6 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
Fix various typos around "aggressiveness". Note that the VBT spec also sometimes missspells it as "agressiveness" so I guess that's where some of the typos came from.
Could nitpick unrelated things like space before ":" in bitfields or the struct naming, but this patch does what it says on the box.
Quoted 32 lines
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/display/intel_vbt_defs.h +4
-4@@ -856,9 +856,9 @@ struct als_data_entry {u16 lux; } __packed; -struct agressiveness_profile_entry { -u8 dpst_agressiveness :4 ; -u8 lace_agressiveness :4 ; +struct aggressiveness_profile_entry { +u8 dpst_aggressiveness :4 ; +u8 lace_aggressiveness :4 ; } __packed;struct bdb_lfp_power {@@ -873,7 +873,7 @@ struct bdb_lfp_power {u16 dmrrs;u16 adb;u16 lace_enabled_status; -struct agressiveness_profile_entry aggressivenes[16 ]; +struct aggressiveness_profile_entry aggressiveness[16 ];u16 hobl;/* 232+ */ u16 vrr_feature_enabled;/* 233+ */ } __packed;
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
PATCH 5/6 drm/i915/bios: Define more BDB contents
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
Add a bunch of new struff we're missing in various BDB blocks.
TODO: Bunch of these might actually need to be taken into use...
--- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 50 ++++++++++++++++--- 1 file changed, 43 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/display/intel_vbt_defs.h +43 -7
@@ -564,7 +564,9 @@ struct bdb_driver_features { u16 tbt_enabled:1; u16 psr_enabled:1; u16 ips_enabled:1; - u16 reserved3:4; + u16 reserved3:1; + u16 dmrrs_enabled:1; + u16 reserved4:2; u16 pc_feature_valid:1; } __packed;
@@ -666,6 +668,16 @@ struct edp_full_link_params { u8 vswing:4; } __packed; +struct edp_apical_params { +u32 panel_oui; +u32 dpcd_base_address; +u32 dpcd_idridix_control_0; +u32 dpcd_option_select; +u32 dpcd_backlight; +u32 ambient_light; +u32 backlight_scale; +} __packed; +struct bdb_edp {struct edp_power_seq power_seqs[16 ];u32 color_depth;
@@ -681,6 +693,9 @@ struct bdb_edp {struct edp_pwm_delays pwm_delays[16 ];/* 186 */ u16 full_link_params_provided;/* 199 */ struct edp_full_link_params full_link_params[16 ];/* 199 */ +u16 apical_enable;/* 203 */ +struct edp_apical_params apical_params[16 ];/* 203 */ +u16 edp_fast_link_training_rate[16 ];/* 224 */ } __packed;/*
@@ -717,6 +732,7 @@ struct bdb_lvds_options {u16 lcdvcc_s0_enable;/* 200 */ u32 rotation;/* 228 */ +u32 position;/* 240 */ } __packed;/*
@@ -843,13 +859,22 @@ struct bdb_lfp_backlight_data {u8 level[16 ];/* Obsolete from 234+ */ struct lfp_backlight_control_method backlight_control[16 ];struct lfp_brightness_level brightness_level[16 ];/* 234+ */ -struct lfp_brightness_level brightness_min_level[16 ];/* 234+ */ -u8 brightness_precision_bits[16 ];/* 236+ */ +struct lfp_brightness_level brightness_min_level[16 ];/* 234+ */ +u8 brightness_precision_bits[16 ];/* 236+ */ +u16 hdr_dpcd_refresh_timeout[16 ];/* 239+ */ } __packed;/* * Block 44 - LFP Power Conservation Features Block */ +struct lfp_features { +u8 reserved1:1 ; +u8 power_conservation_pref:3 ; +u8 reserved2:1 ; +u8 lace_enabled_status:1 ; +u8 lace_support:1 ; +u8 als_enable:1 ; +} __packed;struct als_data_entry {u16 backlight_adjust;
@@ -861,10 +886,16 @@ struct aggressiveness_profile_entry { u8 lace_aggressiveness : 4; } __packed; +struct aggressiveness_profile2_entry { +u8 opst_aggressiveness :4 ; +u8 elp_aggressiveness :4 ; +} __packed; +struct bdb_lfp_power { -u8 lfp_feature_bits; +struct lfp_features features;struct als_data_entry als[5 ]; -u8 lace_aggressiveness_profile; +u8 lace_aggressiveness_profile:3 ; +u8 reserved1:5 ;u16 dpst;u16 psr;u16 drrs;
@@ -876,6 +907,9 @@ struct bdb_lfp_power {struct aggressiveness_profile_entry aggressiveness[16 ];u16 hobl;/* 232+ */ u16 vrr_feature_enabled;/* 233+ */ +u16 elp;/* 247+ */ +u16 opst;/* 247+ */ +struct aggressiveness_profile2_entry aggressiveness2[16 ];/* 247+ */ } __packed;/*
@@ -885,8 +919,10 @@ struct bdb_lfp_power {#define MAX_MIPI_CONFIGURATIONS 6struct bdb_mipi_config { -struct mipi_config config[MAX_MIPI_CONFIGURATIONS ]; -struct mipi_pps_data pps[MAX_MIPI_CONFIGURATIONS ]; +struct mipi_config config[MAX_MIPI_CONFIGURATIONS ];/* 175 */ +struct mipi_pps_data pps[MAX_MIPI_CONFIGURATIONS ];/* 177 */ +struct edp_pwm_delays pwm_delays[MAX_MIPI_CONFIGURATIONS ];/* 186 */ +u8 pmic_i2c_bus_number[MAX_MIPI_CONFIGURATIONS ];/* 190 */ } __packed;/*
Signature · 1 line
2.35.1
Re: [Intel-gfx] [PATCH 5/6] drm/i915/bios: Define more BDB contents
Quoted 6 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
Add a bunch of new struff we're missing in various BDB blocks.
TODO: Bunch of these might actually need to be taken into use...
Quoted 11 lines
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 50 ++++++++++++++++--- 1 file changed, 43 insertions(+), 7 deletions(-)drivers/gpu/drm/i915/display/intel_vbt_defs.h +0
-0
drivers/gpu/drm/i915/display/intel_vbt_defs.h struct bdb_driver_features { · line 568
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_vbt_defs.h +2
-1@@ -564,7 +564,9 @@ struct bdb_driver_features { u16 tbt_enabled:1; u16 psr_enabled:1; u16 ips_enabled:1; - u16 reserved3:4; + u16 reserved3:1; + u16 dmrrs_enabled:1;
Should we start logging the version ranges here too, since it's obsolete from 228. Kinda duplicating the info though. *shrug*.
Quoted 22 lines
drivers/gpu/drm/i915/display/intel_vbt_defs.h +11
-0+ u16 reserved4:2; u16 pc_feature_valid:1; } __packed;@@ -666,6 +668,16 @@ struct edp_full_link_params { u8 vswing:4; } __packed; +struct edp_apical_params { +u32 panel_oui; +u32 dpcd_base_address; +u32 dpcd_idridix_control_0; +u32 dpcd_option_select; +u32 dpcd_backlight; +u32 ambient_light; +u32 backlight_scale; +} __packed; +struct bdb_edp {struct edp_power_seq power_seqs[16 ];u32 color_depth;
drivers/gpu/drm/i915/display/intel_vbt_defs.h struct bdb_edp { · line 698
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_vbt_defs.h +3
-0@@ -681,6 +693,9 @@ struct bdb_edp {struct edp_pwm_delays pwm_delays[16 ];/* 186 */ u16 full_link_params_provided;/* 199 */ struct edp_full_link_params full_link_params[16 ];/* 199 */ +u16 apical_enable;/* 203 */ +struct edp_apical_params apical_params[16 ];/* 203 */ +u16 edp_fast_link_training_rate[16 ];/* 224 */
Another eDP port link rate param would go here? Could be added in another patch.
Quoted 12 lines
drivers/gpu/drm/i915/display/intel_vbt_defs.h +1
-0} __packed;/* @@ -717,6 +732,7 @@ struct bdb_lvds_options {u16 lcdvcc_s0_enable;/* 200 */ u32 rotation;/* 228 */ +u32 position;/* 240 */ } __packed;/*
drivers/gpu/drm/i915/display/intel_vbt_defs.h struct bdb_lfp_backlight_data { · line 864
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_vbt_defs.h +3
-2@@ -843,13 +859,22 @@ struct bdb_lfp_backlight_data {u8 level[16 ];/* Obsolete from 234+ */ struct lfp_backlight_control_method backlight_control[16 ];struct lfp_brightness_level brightness_level[16 ];/* 234+ */ -struct lfp_brightness_level brightness_min_level[16 ];/* 234+ */ -u8 brightness_precision_bits[16 ];/* 236+ */ +struct lfp_brightness_level brightness_min_level[16 ];/* 234+ */ +u8 brightness_precision_bits[16 ];/* 236+ */ +u16 hdr_dpcd_refresh_timeout[16 ];/* 239+ */
Jouni, Lyude, this is probably interesting to you:
"""
This table of values (for 16 panels, 1 value per panel) is used to specify the time required by the TCON (with Intel HDR Aux Interface Support) to refresh the DPCD set with Intel HDR CAPS (DPCD offset:
340h-344h).
The value is in units of 10 us(microseconds).
"""
drivers/gpu/drm/i915/display/intel_vbt_defs.h struct bdb_lfp_backlight_data { · line 870
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_vbt_defs.h +1
-0} __packed;/* * Block 44 - LFP Power Conservation Features Block */ +struct lfp_features {
Nit, maybe lfp_power_features.
Anyway,
Quoted 52 lines
drivers/gpu/drm/i915/display/intel_vbt_defs.h +22
-4+ u8 reserved1:1; + u8 power_conservation_pref:3; + u8 reserved2:1; + u8 lace_enabled_status:1; + u8 lace_support:1; + u8 als_enable:1; +} __packed;struct als_data_entry {u16 backlight_adjust;@@ -861,10 +886,16 @@ struct aggressiveness_profile_entry { u8 lace_aggressiveness : 4; } __packed; +struct aggressiveness_profile2_entry { +u8 opst_aggressiveness :4 ; +u8 elp_aggressiveness :4 ; +} __packed; +struct bdb_lfp_power { -u8 lfp_feature_bits; +struct lfp_features features;struct als_data_entry als[5 ]; -u8 lace_aggressiveness_profile; +u8 lace_aggressiveness_profile:3 ; +u8 reserved1:5 ;u16 dpst;u16 psr;u16 drrs;@@ -876,6 +907,9 @@ struct bdb_lfp_power {struct aggressiveness_profile_entry aggressiveness[16 ];u16 hobl;/* 232+ */ u16 vrr_feature_enabled;/* 233+ */ +u16 elp;/* 247+ */ +u16 opst;/* 247+ */ +struct aggressiveness_profile2_entry aggressiveness2[16 ];/* 247+ */ } __packed;/* @@ -885,8 +919,10 @@ struct bdb_lfp_power {#define MAX_MIPI_CONFIGURATIONS 6struct bdb_mipi_config { -struct mipi_config config[MAX_MIPI_CONFIGURATIONS ]; -struct mipi_pps_data pps[MAX_MIPI_CONFIGURATIONS ]; +struct mipi_config config[MAX_MIPI_CONFIGURATIONS ];/* 175 */ +struct mipi_pps_data pps[MAX_MIPI_CONFIGURATIONS ];/* 177 */ +struct edp_pwm_delays pwm_delays[MAX_MIPI_CONFIGURATIONS ];/* 186 */ +u8 pmic_i2c_bus_number[MAX_MIPI_CONFIGURATIONS ];/* 190 */ } __packed;/*
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Re: [Intel-gfx] [PATCH 5/6] drm/i915/bios: Define more BDB contents
Quoted 41 lines · Jani Nikula
Quoted 6 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
Add a bunch of new struff we're missing in various BDB blocks.
TODO: Bunch of these might actually need to be taken into use...
Cc Jouni, Lyude for some HDR backlight stuff below.Quoted 12 lines
Signed-off-by Ville Syrjälä <[email protected]>---
drivers/gpu/drm/i915/display/intel_vbt_defs.h | 50 ++++++++++++++++---1 file changed, 43 insertions(+), 7 deletions(-)drivers/gpu/drm/i915/display/intel_vbt_defs.h +0
-0drivers/gpu/drm/i915/display/intel_vbt_defs.h struct bdb_driver_features { · line 568
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_vbt_defs.h +2
-1@@ -564,7 +564,9 @@ struct bdb_driver_features { u16 tbt_enabled:1; u16 psr_enabled:1; u16 ips_enabled:1; - u16 reserved3:4; + u16 reserved3:1; + u16 dmrrs_enabled:1;Should we start logging the version ranges here too, since it's obsolete from 228. Kinda duplicating the info though. *shrug*.
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_vbt_defs.h +1
-0+ u16 reserved4:2; u16 pc_feature_valid:1; } __packed;drivers/gpu/drm/i915/display/intel_vbt_defs.h +0
-0@@ -666,6 +668,16 @@ struct edp_full_link_params { u8 vswing:4; } __packed;
+structedp_apical_params{
Quoted 8 lines
Quoted 8 lines
+ u32
panel_oui;
+ u32dpcd_base_address;
+ u32dpcd_idridix_control_0;
+ u32dpcd_option_select;
+ u32dpcd_backlight;
+ u32ambient_light;
+ u32backlight_scale;
+}__packed;
If we could get some more info on what all of this stuff is that'd be appreciated! I had thought that knowing which
Quoted 44 lines
Quoted 11 lines
+
structbdb_edp{
structedp_power_seqpower_seqs[16];
u32color_depth;drivers/gpu/drm/i915/display/intel_vbt_defs.h +0
-0@@ -681,6 +693,9 @@ struct bdb_edp {struct
edp_pwm_delayspwm_delays[16]; /* 186 */ u16 full_link_params_provided; /* 199 */ structedp_full_link_paramsfull_link_params[16]; /* 199 */ + u16 apical_enable; /* 203 */ + structedp_apical_paramsapical_params[16]; /* 203 */ + u16 edp_fast_link_training_rate[16]; /* 224 */Another eDP port link rate param would go here? Could be added in another patch.
Quoted 18 lines
}
__packed;
/*drivers/gpu/drm/i915/display/intel_vbt_defs.h +0
-0@@ -717,6 +732,7 @@ struct bdb_lvds_options {
u16 lcdvcc_s0_enable; /* 200 */ u32 rotation; /* 228 */ + u32 position; /* 240 */ }__packed;
/*drivers/gpu/drm/i915/display/intel_vbt_defs.h +0
-0@@ -843,13 +859,22 @@ struct bdb_lfp_backlight_data {u8 level[16]; /* Obsolete from 234+ */
structlfp_backlight_control_methodbacklight_control[16]; structlfp_brightness_levelbrightness_level[16]; /* 234+ */
- structlfp_brightness_levelbrightness_min_level[16]; /* 234+ */ - u8Quoted 8 lines
brightness_precision_bits[16];
/* 236+ */
+ structlfp_brightness_levelbrightness_min_level[16]; /* 234+ */
+ u8 brightness_precision_bits[16]; /* 236+ */
+ u16 hdr_dpcd_refresh_timeout[16]; /* 239+ */Jouni, Lyude, this is probably interesting to you:
Quoted 8 lines
"""
This table of values (for 16 panels, 1 value per panel) is used to specify the time required by the TCON (with Intel HDR Aux Interface Support) to refresh the DPCD set with Intel HDR CAPS (DPCD offset:
340h-344h).The value is in units of 10 us(microseconds).
"""
Ville had actually mentioned this one before! I hadn't added support for it quite yet though since I don't think any of the machines I've run into thus far actually had this present in their VBTs. Since we're adding this here though, I may as well dig up the patch I wrote for that and post it in a bit
Quoted 70 lines
Quoted 7 lines
}
__packed;
/*
* Block 44 - LFP Power Conservation Features Block */
+structlfp_features{Nit, maybe
lfp_power_features.Anyway,
Reviewed-by Jani Nikula <[email protected]>Quoted 54 lines
+ u8 reserved1:1;
+ u8 power_conservation_pref:3;
+ u8 reserved2:1;
+ u8 lace_enabled_status:1;
+ u8 lace_support:1;
+ u8 als_enable:1;
+}__packed;
structals_data_entry{
u16backlight_adjust;drivers/gpu/drm/i915/display/intel_vbt_defs.h +0
-0@@ -861,10 +886,16 @@ struct aggressiveness_profile_entry { u8 lace_aggressiveness : 4; } __packed;drivers/gpu/drm/i915/display/intel_vbt_defs.h +5
-0+struct aggressiveness_profile2_entry { + u8 opst_aggressiveness : 4; + u8 elp_aggressiveness : 4; +} __packed; +struct
bdb_lfp_power{
- u8lfp_feature_bits;
+ structlfp_featuresfeatures;
structals_data_entryals[5];
- u8lace_aggressiveness_profile;
+ u8 lace_aggressiveness_profile:3;
+ u8 reserved1:5;
u16 dpst;
u16 psr;
u16 drrs;drivers/gpu/drm/i915/display/intel_vbt_defs.h +0
-0@@ -876,6 +907,9 @@ struct bdb_lfp_power { struct aggressiveness_profile_entry aggressiveness[16];u16 hobl; /* 232+ */
u16vrr_feature_enabled; /* 233+ */
+ u16 elp; /* 247+ */
+ u16 opst; /* 247+ */
+ structaggressiveness_profile2_entryaggressiveness2[16]; /* 247+ */
}__packed;
/*drivers/gpu/drm/i915/display/intel_vbt_defs.h +0
-0@@ -885,8 +919,10 @@ struct bdb_lfp_power { #define MAX_MIPI_CONFIGURATIONS 6
structbdb_mipi_config{
- structmipi_configconfig[MAX_MIPI_CONFIGURATIONS];
- structmipi_pps_datapps[MAX_MIPI_CONFIGURATIONS];
+ structmipi_configconfig[MAX_MIPI_CONFIGURATIONS]; /* 175 */ + structmipi_pps_datapps[MAX_MIPI_CONFIGURATIONS]; /* 177 */ + structedp_pwm_delayspwm_delays[MAX_MIPI_CONFIGURATIONS]; /* 186 */
+ u8 pmic_i2c_bus_number[MAX_MIPI_CONFIGURATIONS]; /* 190 */ }__packed;
/*
Signature · 3 lines
Cheers, Lyude Paul (she/her) Software Engineer at Red Hat
Re: [Intel-gfx] [PATCH 5/6] drm/i915/bios: Define more BDB contents
In reply to Jani NikulaQuoted 54 lines · Jani Nikula
Quoted 6 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
Add a bunch of new struff we're missing in various BDB blocks.
TODO: Bunch of these might actually need to be taken into use...
Cc Jouni, Lyude for some HDR backlight stuff below.Quoted 11 lines
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 50 ++++++++++++++++--- 1 file changed, 43 insertions(+), 7 deletions(-)drivers/gpu/drm/i915/display/intel_vbt_defs.h +0
-0drivers/gpu/drm/i915/display/intel_vbt_defs.h struct bdb_driver_features { · line 568
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_vbt_defs.h +2
-1@@ -564,7 +564,9 @@ struct bdb_driver_features { u16 tbt_enabled:1; u16 psr_enabled:1; u16 ips_enabled:1; - u16 reserved3:4; + u16 reserved3:1; + u16 dmrrs_enabled:1;Should we start logging the version ranges here too, since it's obsolete from 228. Kinda duplicating the info though. *shrug*.
Quoted 23 lines
drivers/gpu/drm/i915/display/intel_vbt_defs.h +11
-0+ u16 reserved4:2; u16 pc_feature_valid:1; } __packed;@@ -666,6 +668,16 @@ struct edp_full_link_params { u8 vswing:4; } __packed; +struct edp_apical_params { +u32 panel_oui; +u32 dpcd_base_address; +u32 dpcd_idridix_control_0; +u32 dpcd_option_select; +u32 dpcd_backlight; +u32 ambient_light; +u32 backlight_scale; +} __packed; +struct bdb_edp {struct edp_power_seq power_seqs[16 ];u32 color_depth;@@ -681,6 +693,9 @@ struct bdb_edp {struct edp_pwm_delays pwm_delays[16 ];/* 186 */
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_vbt_defs.h struct bdb_edp { · line 698
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_vbt_defs.h +3
-0u16 full_link_params_provided;/* 199 */ struct edp_full_link_params full_link_params[16 ];/* 199 */ +u16 apical_enable;/* 203 */ +struct edp_apical_params apical_params[16 ];/* 203 */ +u16 edp_fast_link_training_rate[16 ];/* 224 */ Another eDP port link rate param would go here? Could be added in another patch.
LOL+sigh. There is already a max link rate in the child dev but naturally it's only specified using three bits so it's not in any way future proof, or even capable of handling intermediate link rates. I suppose that is the reason they added this second thing.
Oh and there's also two ways to specify the fast link training rate as well. Man, I love VBT.
I was going to type up a quick patch but looks like there's another chicken vs. egg situation due to panel_type again. That is, we currently do the set_*_rates() stuff before the per-panel VBT parsing. So I'll need to figure out if there's anything preventing us from initializing the source rates after the per-panel VBT parsing has been done...
Signature · 2 lines
Ville Syrjälä Intel
PATCH 6/6 drm/i915: Treat DMRRS as static DRRS
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
Some machines declare DRRS type = seamless, DRRS = no, DMRRS = yes. I *think* DMRRS stands for "dynamcic media refresh rate", and I suspect the way it's meant to work is that it lets the driver switch refresh rates to match the frame rate for media playback. Obviously for us all that kind of policy stuff is entirely up to userspace, so the only thing we may do is make the extra refresh rate(s) available.
So let's treat this case as just static DRRS for now. In the future We might want to differentiate the "seamless w/ downclocking" vs. "seamless w/o downclocking" cases so that we could do seamless refresh rate changes for systems that only claim to support DMRRS.
--- drivers/gpu/drm/i915/display/intel_bios.c | 24 +++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/display/intel_bios.c +20 -4
@@ -1279,8 +1279,16 @@ parse_panel_driver_features(struct drm_i915_private *i915,* static DRRS is 0 and DRRS not supported is represented by * driver->drrs_enabled=false */ -if (!driver->drrs_enabled) - panel->vbt.drrs_type =DRRS_TYPE_NONE ; +if (!driver->drrs_enabled && panel->vbt.drrs_type !=DRRS_TYPE_NONE ) { +/* +* FIXME Should DMRRS perhaps be treated as seamless +* but without the automatic downclocking? +*/ +if (driver->dmrrs_enabled) + panel->vbt.drrs_type =DRRS_TYPE_STATIC ; +else + panel->vbt.drrs_type =DRRS_TYPE_NONE ; + } panel->vbt.psr.enable = driver->psr_enabled; }
@@ -1310,8 +1318,16 @@ parse_power_conservation_features(struct drm_i915_private *i915,* static DRRS is 0 and DRRS not supported is represented by * power->drrs & BIT(panel_type)=false */ -if (!(power->drrs &BIT (panel_type))) - panel->vbt.drrs_type =DRRS_TYPE_NONE ; +if (!(power->drrs &BIT (panel_type)) && panel->vbt.drrs_type !=DRRS_TYPE_NONE ) { +/* +* FIXME Should DMRRS perhaps be treated as seamless +* but without the automatic downclocking? +*/ +if (power->dmrrs &BIT (panel_type)) + panel->vbt.drrs_type =DRRS_TYPE_STATIC ; +else + panel->vbt.drrs_type =DRRS_TYPE_NONE ; + }if (i915->vbt.version >=232 ) panel->vbt.edp.hobl = power->hobl &BIT (panel_type);
Signature · 1 line
2.35.1
Re: [Intel-gfx] [PATCH 6/6] drm/i915: Treat DMRRS as static DRRS
Quoted 10 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
Some machines declare DRRS type = seamless, DRRS = no, DMRRS = yes. I *think* DMRRS stands for "dynamcic media refresh rate", and I suspect the way it's meant to work is that it lets the driver switch refresh rates to match the frame rate for media playback. Obviously for us all that kind of policy stuff is entirely up to userspace, so the only thing we may do is make the extra refresh rate(s) available.
Quoted 7 lines
So let's treat this case as just static DRRS for now. In the future We might want to differentiate the "seamless w/ downclocking" vs. "seamless w/o downclocking" cases so that we could do seamless refresh rate changes for systems that only claim to support DMRRS.
Quoted 46 lines
--- drivers/gpu/drm/i915/display/intel_bios.c | 24 +++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/display/intel_bios.c +20
-4@@ -1279,8 +1279,16 @@ parse_panel_driver_features(struct drm_i915_private *i915,* static DRRS is 0 and DRRS not supported is represented by * driver->drrs_enabled=false */ -if (!driver->drrs_enabled) - panel->vbt.drrs_type =DRRS_TYPE_NONE ; +if (!driver->drrs_enabled && panel->vbt.drrs_type !=DRRS_TYPE_NONE ) { +/* +* FIXME Should DMRRS perhaps be treated as seamless +* but without the automatic downclocking? +*/ +if (driver->dmrrs_enabled) + panel->vbt.drrs_type =DRRS_TYPE_STATIC ; +else + panel->vbt.drrs_type =DRRS_TYPE_NONE ; + } panel->vbt.psr.enable = driver->psr_enabled; }@@ -1310,8 +1318,16 @@ parse_power_conservation_features(struct drm_i915_private *i915,* static DRRS is 0 and DRRS not supported is represented by * power->drrs & BIT(panel_type)=false */ -if (!(power->drrs &BIT (panel_type))) - panel->vbt.drrs_type =DRRS_TYPE_NONE ; +if (!(power->drrs &BIT (panel_type)) && panel->vbt.drrs_type !=DRRS_TYPE_NONE ) { +/* +* FIXME Should DMRRS perhaps be treated as seamless +* but without the automatic downclocking? +*/ +if (power->dmrrs &BIT (panel_type)) + panel->vbt.drrs_type =DRRS_TYPE_STATIC ; +else + panel->vbt.drrs_type =DRRS_TYPE_NONE ; + }if (i915->vbt.version >=232 ) panel->vbt.edp.hobl = power->hobl &BIT (panel_type);
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Jani Nikula
maintainerRe: [Intel-gfx] [PATCH 6/6] drm/i915: Treat DMRRS as static DRRS
Quoted 16 lines · Jani Nikula
Quoted 15 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
Some machines declare DRRS type = seamless, DRRS = no, DMRRS = yes. I *think* DMRRS stands for "dynamcic media refresh rate", and I suspect the way it's meant to work is that it lets the driver switch refresh rates to match the frame rate for media playback. Obviously for us all that kind of policy stuff is entirely up to userspace, so the only thing we may do is make the extra refresh rate(s) available.
So let's treat this case as just static DRRS for now. In the future We might want to differentiate the "seamless w/ downclocking" vs. "seamless w/o downclocking" cases so that we could do seamless refresh rate changes for systems that only claim to support DMRRS.
Quoted 4 lines
Quoted 2 lines
Acked-by Jani Nikula <[email protected]>
Oh, the reasoning for some Acked-bys instead of Reviewed-bys today in this and another series:
They could all be r-b in the sense that they do what they say on the box. But I don't really have the information to confirm they are the right thing to do. I'm acking "let's go with this, and see where it gets us".
Make sense?
BR,
Jani.
Quoted 47 lines
Quoted 47 lines
--- drivers/gpu/drm/i915/display/intel_bios.c | 24 +++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/display/intel_bios.c +20
-4@@ -1279,8 +1279,16 @@ parse_panel_driver_features(struct drm_i915_private *i915,* static DRRS is 0 and DRRS not supported is represented by * driver->drrs_enabled=false */ -if (!driver->drrs_enabled) - panel->vbt.drrs_type =DRRS_TYPE_NONE ; +if (!driver->drrs_enabled && panel->vbt.drrs_type !=DRRS_TYPE_NONE ) { +/* +* FIXME Should DMRRS perhaps be treated as seamless +* but without the automatic downclocking? +*/ +if (driver->dmrrs_enabled) + panel->vbt.drrs_type =DRRS_TYPE_STATIC ; +else + panel->vbt.drrs_type =DRRS_TYPE_NONE ; + } panel->vbt.psr.enable = driver->psr_enabled; }@@ -1310,8 +1318,16 @@ parse_power_conservation_features(struct drm_i915_private *i915,* static DRRS is 0 and DRRS not supported is represented by * power->drrs & BIT(panel_type)=false */ -if (!(power->drrs &BIT (panel_type))) - panel->vbt.drrs_type =DRRS_TYPE_NONE ; +if (!(power->drrs &BIT (panel_type)) && panel->vbt.drrs_type !=DRRS_TYPE_NONE ) { +/* +* FIXME Should DMRRS perhaps be treated as seamless +* but without the automatic downclocking? +*/ +if (power->dmrrs &BIT (panel_type)) + panel->vbt.drrs_type =DRRS_TYPE_STATIC ; +else + panel->vbt.drrs_type =DRRS_TYPE_NONE ; + }if (i915->vbt.version >=232 ) panel->vbt.edp.hobl = power->hobl &BIT (panel_type);
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915: Accept more fixed modes with VRR/DMRRS panels
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: drm/i915: Accept more fixed modes with VRR/DMRRS panels
URL : https://patchwork.freedesktop.org/series/104467/
State : failure
== Summary ==
Error: patch https://patchwork.freedesktop.org/api/1.0/series/104467/revisions/1/mbox/ not applied
Applying: drm/i915: Parse VRR capability from VBT
Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/display/intel_bios.c
M drivers/gpu/drm/i915/display/intel_display_types.h
M drivers/gpu/drm/i915/display/intel_vrr.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/i915/display/intel_vrr.c
CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/display/intel_vrr.c Auto-merging drivers/gpu/drm/i915/display/intel_display_types.h
CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/display/intel_display_types.h Auto-merging drivers/gpu/drm/i915/display/intel_bios.c
CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/display/intel_bios.c
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 drm/i915: Parse VRR capability from VBT
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".