drm/amd/display: update odm mode validation to be in line with policy
authorDmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Fri, 30 Aug 2019 20:32:13 +0000 (16:32 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 3 Oct 2019 14:10:57 +0000 (09:10 -0500)
commitc84ad0d6b93e4a7d9f4e65620bf2ad92a79116ea
treea58a02010c0d8ec4a494e0f4ad88e75b3b5e9548
parent3a4d180d4a9df63144c6c069860b2be312c3256a
drm/amd/display: update odm mode validation to be in line with policy

Previously 8k30 worked with dsc and odm combine due to a workaround that ran
the formula a second time with dsc support enable should dsc validation fail.
This worked when clocks were low enough for formula to enable odm to lower
voltage, however now broke due to increased clocks.

This change updates the ODM combine policy within the formula to properly
reflect our current policy within DC, only enabling ODM when we have to, as
well as adding a check for viewport width when dsc is enabled.

As a side effect the redundant call to dml when odm is required is now
unnecessary.

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Nikola Cornij <Nikola.Cornij@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c