Fix broken initialization when SCDC is supported but not implemented
Subsystems (3)
PATCH 1/1 Fix broken initialization when SCDC is supported but not implemented
This patch fix the missing scdc implementation on scdc enabled card behaviour init call and add debug message on error:
- FIX: when the scdc implementation is missing the call of nvkm_uoutp_mthd_hdmi don't return anymore an error code but emit a OUTP_DBG log message and continue the initialization process
- ADD: an NV_ERROR message where error code is return by the nvif_outp_hdmi call in nv50_hdmi_enable method
Solve problem with (scdc enabled) card that don´t had scdc implementation in nouveau driver.
Signed-off-by Giuseppe Ranieri <[email protected]>
---
drivers/gpu/drm/nouveau/dispnv50/disp.c +4 -2
@@ -819,9 +819,11 @@ ret =nvif_outp_hdmi (&nv_encoder->outp, nv_crtc->index, true, max_ac_packet, rekey, mode->clock, hdmi->scdc.supported, hdmi->scdc.scrambling.supported, hdmi->scdc.scrambling.low_rates); -if (ret) +if (ret <0 ) { +NV_ERROR (drm,"Failure to set HDMI: %d\n" , ret);return ; - + } +/* AVI InfoFrame. */ args->version =0 ; args->head = nv_crtc->index;
drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c +6 -2
@@ -253,8 +253,7 @@if (!ior->func->hdmi || args->v0.max_ac_packet >0x1f || - args->v0.rekey >0x7f || - (args->v0.scdc && !ior->func->hdmi->scdc)) + args->v0.rekey >0x7f )return -EINVAL ;if (!args->v0.enable) {
@@ -266,6 +265,11 @@ ior->func->hdmi->ctrl (ior, args->v0.head, args->v0.enable, args->v0.max_ac_packet, args->v0.rekey); + +if (args->v0.scdc && !ior->func->hdmi->scdc) +OUTP_DBG (outp,"SCDC enabled: %d, ior->func->hdmi->scdc not implemented (ior): %p" , + args->v0.scdc, ior); +if (ior->func->hdmi->scdc) ior->func->hdmi->scdc (ior, args->v0.khz, args->v0.scdc, args->v0.scdc_scrambling, args->v0.scdc_low_rates);