]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amd/display: Clear OPTC mem select on disable
authorIlya Bakoulin <ilya.bakoulin@amd.com>
Wed, 3 Jan 2024 14:42:04 +0000 (09:42 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 18 Jan 2024 21:31:29 +0000 (16:31 -0500)
[Why]
Not clearing the memory select bits prior to OPTC disable can cause DSC
corruption issues when attempting to reuse a memory instance for another
OPTC that enables ODM.

[How]
Clear the memory select bits prior to disabling an OPTC.

Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Ilya Bakoulin <ilya.bakoulin@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/optc/dcn32/dcn32_optc.c
drivers/gpu/drm/amd/display/dc/optc/dcn35/dcn35_optc.c

index 1788eb29474b45f1221ba93cfabe5dfc0e156d0d..82349354332548e160494c23bee15acaa18b7630 100644 (file)
@@ -173,6 +173,9 @@ static bool optc32_disable_crtc(struct timing_generator *optc)
                        OPTC_SEG3_SRC_SEL, 0xf,
                        OPTC_NUM_OF_INPUT_SEGMENT, 0);
 
+       REG_UPDATE(OPTC_MEMORY_CONFIG,
+                       OPTC_MEM_SEL, 0);
+
        /* disable otg request until end of the first line
         * in the vertical blank region
         */
index 3d6c1b2c2b4d6e6a4ea2e28f0342c140cb045fa4..5b154750885030e171a483d30e014aa8f4bff8a1 100644 (file)
@@ -145,6 +145,9 @@ static bool optc35_disable_crtc(struct timing_generator *optc)
                        OPTC_SEG3_SRC_SEL, 0xf,
                        OPTC_NUM_OF_INPUT_SEGMENT, 0);
 
+       REG_UPDATE(OPTC_MEMORY_CONFIG,
+                       OPTC_MEM_SEL, 0);
+
        /* disable otg request until end of the first line
         * in the vertical blank region
         */