From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 462F6EB64DD for ; Sun, 13 Aug 2023 21:34:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232075AbjHMVen (ORCPT ); Sun, 13 Aug 2023 17:34:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232076AbjHMVem (ORCPT ); Sun, 13 Aug 2023 17:34:42 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D452A10FE for ; Sun, 13 Aug 2023 14:34:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 702E562CB5 for ; Sun, 13 Aug 2023 21:34:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8050BC433C7; Sun, 13 Aug 2023 21:34:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1691962480; bh=KEYt2EZeQuv+8xak4srLqg77f8XzZPeeclI6iBcWDlE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aoSCukdoHcKZjB3toojMeOpgzuCUnPiXLORM33M94H/wzrNm2YjHPhEZTHZPxgnJp JYkmA/iwFLP/JRYdIo1SZtSh6W+6VkmsnmpZyj8+IGh/cv/W8SVtb/whWmr0WDCD/U MN10RhkzVV7nFbGDLMVj3gQJ+zlq0UVaO326I5kE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Harry Wentland , Rodrigo Siqueira , Aurabindo Pillai , Alex Deucher , Mario Limonciello Subject: [PATCH 6.1 044/149] drm/amd/display: Update OTG instance in the commit stream Date: Sun, 13 Aug 2023 23:18:09 +0200 Message-ID: <20230813211720.131313503@linuxfoundation.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230813211718.757428827@linuxfoundation.org> References: <20230813211718.757428827@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Rodrigo Siqueira commit eef019eabc3cd0fddcffefbf67806a4d8cca29bb upstream OTG instance is not updated in dc_commit_state_no_check for newly committed streams because mode_change is not set. Notice that OTG update is part of the software state, and after hardware programming, it must be updated; for this reason, this commit updates the OTG offset right after hardware programming. Reviewed-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Co-developed-by: Aurabindo Pillai Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher Signed-off-by: Mario Limonciello Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/display/dc/core/dc.c | 6 ++++++ 1 file changed, 6 insertions(+) --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -1995,6 +1995,12 @@ enum dc_status dc_commit_streams(struct res = dc_commit_state_no_check(dc, context); + for (i = 0; i < stream_count; i++) { + for (j = 0; j < context->stream_count; j++) + if (streams[i]->stream_id == context->streams[j]->stream_id) + streams[i]->out.otg_offset = context->stream_status[j].primary_otg_inst; + } + fail: dc_release_state(context);