]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - drivers/gpu/drm/amd/display/dc/core/dc_resource.c
drm/amd/display: calculate stream->phy_pix_clk before clock mapping
authorYogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Fri, 19 Oct 2018 19:51:40 +0000 (01:21 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 19 Nov 2018 20:27:38 +0000 (15:27 -0500)
commit08e1c28dd521c7b08d1b0af0bae9fb22ccc012a4
treed55ce4f5c24793aaa3b9ee5581d1d39e5b8b386d
parent010c8fe9a5040f1573db647ce1930414764dbe8b
drm/amd/display: calculate stream->phy_pix_clk before clock mapping

[why]
phy_pix_clk is one of the variable used to check if one PLL can be shared
with displays having common mode set configuration. As of now
phy_pix_clock varialbe is calculated in function dc_validate_stream().
dc_validate_stream() function is called after clocks are assigned for the
new display. Due to this during hotplug, when PLL sharing conditions are
checked for new display phy_pix_clk variable will be 0 and for displays
that are already enabled phy_pix_clk will have some value. Hence PLL will
not be shared and if the display hardware doesn't have any more PLL to
assign, mode set will fail due to resource unavailability.

[how]
Instead of only calculating the phy_pix_clk variable after the PLL is
assigned for new display, this patch calculates phy_pix_clk also during
the before assigning the PLL for new display.

Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_resource.c