YCbCr420 color mode does not get selected when required
I have a Notebook + Display combo where here: https://elixir.bootlin.com/linux/v5.11.6/source/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c#L4825 YCbCr444 encoding is chosen, because the GPU chip and the display support that mode.
However here: https://elixir.bootlin.com/linux/v5.11.6/source/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c#L5693 dc_validate_stream fails for 4k6Hz because the link encoder does not support required the pixel clock frequency for YCbCr444. The driver then discards the 4k60Hz mode completly instead of retrying with YCbCr420, which would work perfectly fine.
I coded a quick fix for this and already postet it to the amd-gfx mailing list, because I was not aware of this bugtracker. I got no reply so far.
0001-Retry-forcing-YCbCr420-color-on-failed-encoder-valid.patch
Related: #476 however that issue fixes manual selection of color format. This patch is for fixing automatic selection of color format.