Skip to content

Commit 4a49c2b

Browse files
aditya23788vsyrjala
authored andcommitted
drm/i915: Use port clock to set correct N value
Use port_clock to check the clock values in n/cts lookup table instead of crtc_clock. As port_clock is already adjusted based on color mode set (8 bit or deep color), this will help in checking clock values for deep color modes from n/cts lookup table. Signed-off-by: Aditya Swarup <[email protected]> Cc: Clint Taylor <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Ville Syrjälä <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 56e9371 commit 4a49c2b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/gpu/drm/i915/display/intel_audio.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,11 @@ static u32 audio_config_hdmi_pixel_clock(const struct intel_crtc_state *crtc_sta
212212
static int audio_config_hdmi_get_n(const struct intel_crtc_state *crtc_state,
213213
int rate)
214214
{
215-
const struct drm_display_mode *adjusted_mode =
216-
&crtc_state->base.adjusted_mode;
217215
int i;
218216

219217
for (i = 0; i < ARRAY_SIZE(hdmi_aud_ncts); i++) {
220218
if (rate == hdmi_aud_ncts[i].sample_rate &&
221-
adjusted_mode->crtc_clock == hdmi_aud_ncts[i].clock) {
219+
crtc_state->port_clock == hdmi_aud_ncts[i].clock) {
222220
return hdmi_aud_ncts[i].n;
223221
}
224222
}

0 commit comments

Comments
 (0)