From a0f4f1224552eb91572fde16f21c8e9f73ed1940 Mon Sep 17 00:00:00 2001 From: jsg Date: Thu, 4 Apr 2024 08:11:23 +0000 Subject: [PATCH] drm/amd/display: Disconnect phantom pipe OPP from OPTC being disabled From George Shen 6a1cb68b9810f71644eb5d2d663e59083540bada in linux-6.6.y/6.6.24 7bdbfb4e36e34eb788e44f27666bf0a2b3b90803 in mainline linux --- .../pci/drm/amd/display/dc/dcn32/dcn32_optc.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/sys/dev/pci/drm/amd/display/dc/dcn32/dcn32_optc.c b/sys/dev/pci/drm/amd/display/dc/dcn32/dcn32_optc.c index b1fcc91b65a..93592e8051f 100644 --- a/sys/dev/pci/drm/amd/display/dc/dcn32/dcn32_optc.c +++ b/sys/dev/pci/drm/amd/display/dc/dcn32/dcn32_optc.c @@ -142,12 +142,6 @@ static bool optc32_disable_crtc(struct timing_generator *optc) { struct optc *optc1 = DCN10TG_FROM_TG(optc); - /* disable otg request until end of the first line - * in the vertical blank region - */ - REG_UPDATE(OTG_CONTROL, - OTG_MASTER_EN, 0); - REG_UPDATE_5(OPTC_DATA_SOURCE_SELECT, OPTC_SEG0_SRC_SEL, 0xf, OPTC_SEG1_SRC_SEL, 0xf, @@ -155,6 +149,12 @@ static bool optc32_disable_crtc(struct timing_generator *optc) OPTC_SEG3_SRC_SEL, 0xf, OPTC_NUM_OF_INPUT_SEGMENT, 0); + /* disable otg request until end of the first line + * in the vertical blank region + */ + REG_UPDATE(OTG_CONTROL, + OTG_MASTER_EN, 0); + REG_UPDATE(CONTROL, VTG0_ENABLE, 0); @@ -181,6 +181,13 @@ static void optc32_disable_phantom_otg(struct timing_generator *optc) { struct optc *optc1 = DCN10TG_FROM_TG(optc); + REG_UPDATE_5(OPTC_DATA_SOURCE_SELECT, + OPTC_SEG0_SRC_SEL, 0xf, + OPTC_SEG1_SRC_SEL, 0xf, + OPTC_SEG2_SRC_SEL, 0xf, + OPTC_SEG3_SRC_SEL, 0xf, + OPTC_NUM_OF_INPUT_SEGMENT, 0); + REG_UPDATE(OTG_CONTROL, OTG_MASTER_EN, 0); } -- 2.20.1