File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
drivers/gpu/drm/i915/display Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -1129,10 +1129,10 @@ static int i915_audio_component_get_cdclk_freq(struct device *kdev)
1129
1129
static struct intel_encoder * get_saved_enc (struct drm_i915_private * i915 ,
1130
1130
int port , int pipe )
1131
1131
{
1132
- struct intel_encoder * encoder ;
1133
-
1134
1132
/* MST */
1135
1133
if (pipe >= 0 ) {
1134
+ struct intel_encoder * encoder ;
1135
+
1136
1136
if (drm_WARN_ON (& i915 -> drm ,
1137
1137
pipe >= ARRAY_SIZE (i915 -> display .audio .encoder_map )))
1138
1138
return NULL ;
@@ -1143,7 +1143,7 @@ static struct intel_encoder *get_saved_enc(struct drm_i915_private *i915,
1143
1143
* MST or not. So it will poll all the port & pipe
1144
1144
* combinations
1145
1145
*/
1146
- if (encoder != NULL && encoder -> port == port &&
1146
+ if (encoder && encoder -> port == port &&
1147
1147
encoder -> type == INTEL_OUTPUT_DP_MST )
1148
1148
return encoder ;
1149
1149
}
@@ -1153,14 +1153,12 @@ static struct intel_encoder *get_saved_enc(struct drm_i915_private *i915,
1153
1153
return NULL ;
1154
1154
1155
1155
for_each_pipe (i915 , pipe ) {
1156
- encoder = i915 -> display .audio .encoder_map [pipe ];
1157
- if (encoder == NULL )
1158
- continue ;
1156
+ struct intel_encoder * encoder ;
1159
1157
1160
- if (encoder -> type == INTEL_OUTPUT_DP_MST )
1161
- continue ;
1158
+ encoder = i915 -> display .audio .encoder_map [pipe ];
1162
1159
1163
- if (port == encoder -> port )
1160
+ if (encoder && encoder -> port == port &&
1161
+ encoder -> type != INTEL_OUTPUT_DP_MST )
1164
1162
return encoder ;
1165
1163
}
1166
1164
You can’t perform that action at this time.
0 commit comments