@@ -38,6 +38,8 @@ static int intel_dp_mst_compute_config(struct intel_encoder *encoder,
38
38
struct intel_digital_port * intel_dig_port = intel_mst -> primary ;
39
39
struct intel_dp * intel_dp = & intel_dig_port -> dp ;
40
40
struct drm_connector * connector = conn_state -> connector ;
41
+ struct intel_digital_connector_state * intel_conn_state =
42
+ to_intel_digital_connector_state (conn_state );
41
43
void * port = to_intel_connector (connector )-> port ;
42
44
struct drm_atomic_state * state = pipe_config -> base .state ;
43
45
struct drm_crtc * crtc = pipe_config -> base .crtc ;
@@ -62,6 +64,14 @@ static int intel_dp_mst_compute_config(struct intel_encoder *encoder,
62
64
DRM_DEBUG_KMS ("Setting pipe bpp to %d\n" ,
63
65
bpp );
64
66
}
67
+
68
+ if (intel_conn_state -> force_audio == HDMI_AUDIO_AUTO )
69
+ pipe_config -> has_audio =
70
+ drm_dp_mst_port_has_audio (& intel_dp -> mst_mgr , port );
71
+ else
72
+ pipe_config -> has_audio =
73
+ intel_conn_state -> force_audio == HDMI_AUDIO_ON ;
74
+
65
75
/*
66
76
* for MST we always configure max link bw - the spec doesn't
67
77
* seem to suggest we should do otherwise.
@@ -74,9 +84,6 @@ static int intel_dp_mst_compute_config(struct intel_encoder *encoder,
74
84
75
85
pipe_config -> port_clock = intel_dp_max_link_rate (intel_dp );
76
86
77
- if (drm_dp_mst_port_has_audio (& intel_dp -> mst_mgr , port ))
78
- pipe_config -> has_audio = true;
79
-
80
87
pipe_config -> limited_color_range =
81
88
intel_dp_limited_color_range (pipe_config , conn_state );
82
89
@@ -496,6 +503,7 @@ static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topolo
496
503
if (ret )
497
504
goto err ;
498
505
506
+ intel_attach_force_audio_property (connector );
499
507
intel_attach_broadcast_rgb_property (connector );
500
508
501
509
return connector ;
0 commit comments