From: Ben Skeggs Date: Wed, 17 Jun 2020 01:08:41 +0000 (+1000) Subject: drm/nouveau/kms/nv50-: bail from nv50_audio_disable() early if audio not enabled X-Git-Tag: v5.8-rc5~26^2~2^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=72923e24f98aa5d99adeb83b7b4f0ec1496e5b5e;p=thirdparty%2Fkernel%2Flinux.git drm/nouveau/kms/nv50-: bail from nv50_audio_disable() early if audio not enabled Prevents "snd_hda_codec_hdmi hdaudioC1D0: HDMI: pin nid 5 not registered" that occur on some configurations. Signed-off-by: Ben Skeggs --- diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c index d472942102f50..519f99868e357 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c @@ -601,6 +601,9 @@ nv50_audio_disable(struct drm_encoder *encoder, struct nouveau_crtc *nv_crtc) (0x0100 << nv_crtc->index), }; + if (!nv_encoder->audio) + return; + nv_encoder->audio = false; nvif_mthd(&disp->disp->object, 0, &args, sizeof(args));