@@ -4820,6 +4820,17 @@ intel_compare_dp_vsc_sdp(const struct drm_dp_vsc_sdp *a,
4820
4820
a -> content_type == b -> content_type ;
4821
4821
}
4822
4822
4823
+ static bool
4824
+ intel_compare_dp_as_sdp (const struct drm_dp_as_sdp * a ,
4825
+ const struct drm_dp_as_sdp * b )
4826
+ {
4827
+ return a -> vtotal == b -> vtotal &&
4828
+ a -> target_rr == b -> target_rr &&
4829
+ a -> duration_incr_ms == b -> duration_incr_ms &&
4830
+ a -> duration_decr_ms == b -> duration_decr_ms &&
4831
+ a -> mode == b -> mode ;
4832
+ }
4833
+
4823
4834
static bool
4824
4835
intel_compare_buffer (const u8 * a , const u8 * b , size_t len )
4825
4836
{
@@ -4890,6 +4901,30 @@ pipe_config_dp_vsc_sdp_mismatch(struct drm_printer *p, bool fastset,
4890
4901
drm_dp_vsc_sdp_log (p , b );
4891
4902
}
4892
4903
4904
+ static void
4905
+ pipe_config_dp_as_sdp_mismatch (struct drm_i915_private * i915 ,
4906
+ bool fastset , const char * name ,
4907
+ const struct drm_dp_as_sdp * a ,
4908
+ const struct drm_dp_as_sdp * b )
4909
+ {
4910
+ struct drm_printer p ;
4911
+
4912
+ if (fastset ) {
4913
+ p = drm_dbg_printer (& i915 -> drm , DRM_UT_KMS , NULL );
4914
+
4915
+ drm_printf (& p , "fastset requirement not met in %s dp sdp\n" , name );
4916
+ } else {
4917
+ p = drm_err_printer (& i915 -> drm , NULL );
4918
+
4919
+ drm_printf (& p , "mismatch in %s dp sdp\n" , name );
4920
+ }
4921
+
4922
+ drm_printf (& p , "expected:\n" );
4923
+ drm_dp_as_sdp_log (& p , a );
4924
+ drm_printf (& p , "found:\n" );
4925
+ drm_dp_as_sdp_log (& p , b );
4926
+ }
4927
+
4893
4928
/* Returns the length up to and including the last differing byte */
4894
4929
static size_t
4895
4930
memcmp_diff_len (const u8 * a , const u8 * b , size_t len )
@@ -5107,6 +5142,16 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
5107
5142
} \
5108
5143
} while (0)
5109
5144
5145
+ #define PIPE_CONF_CHECK_DP_AS_SDP (name ) do { \
5146
+ if (!intel_compare_dp_as_sdp(¤t_config->infoframes.name, \
5147
+ &pipe_config->infoframes.name)) { \
5148
+ pipe_config_dp_as_sdp_mismatch(dev_priv, fastset, __stringify(name), \
5149
+ ¤t_config->infoframes.name, \
5150
+ &pipe_config->infoframes.name); \
5151
+ ret = false; \
5152
+ } \
5153
+ } while (0)
5154
+
5110
5155
#define PIPE_CONF_CHECK_BUFFER (name , len ) do { \
5111
5156
BUILD_BUG_ON(sizeof(current_config->name) != (len)); \
5112
5157
BUILD_BUG_ON(sizeof(pipe_config->name) != (len)); \
@@ -5288,6 +5333,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
5288
5333
PIPE_CONF_CHECK_INFOFRAME (hdmi );
5289
5334
PIPE_CONF_CHECK_INFOFRAME (drm );
5290
5335
PIPE_CONF_CHECK_DP_VSC_SDP (vsc );
5336
+ PIPE_CONF_CHECK_DP_AS_SDP (as_sdp );
5291
5337
5292
5338
PIPE_CONF_CHECK_X (sync_mode_slaves_mask );
5293
5339
PIPE_CONF_CHECK_I (master_transcoder );
0 commit comments