Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp984697rwb; Tue, 4 Oct 2022 13:37:21 -0700 (PDT) X-Google-Smtp-Source: AMsMyM63Tr+ECBLy2q2W1QUTJiGiuAVzXkMbvLoFdl/6RUGR54dCDGYtlnbiqYuolUQjKXEeMaoF X-Received: by 2002:a17:902:bb88:b0:178:24f6:4dfc with SMTP id m8-20020a170902bb8800b0017824f64dfcmr28211581pls.169.1664915841463; Tue, 04 Oct 2022 13:37:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664915841; cv=none; d=google.com; s=arc-20160816; b=j5Gq5A767+fBnrOkJiJ2e8u5MPqCCWDQLSB51PYPOxs+LhRAEePPKqCpTiiWlRQITL Ek+k8HfTdieUgoeaL2/ThdjLidVfBOaWPNTpHX5o/9aXjr0eCgAstye145C3eFiWCLGo K7CfDcRkgBXqLPpTtQ+iJBDsO/ZjVg1G9EhBSajqHqKxvqk3vjEj8+Cl64yLGuC8ciKe ikI/9eLbpKpmBmM404omHUgJG6BIxchM7/zxcV+GupG8NfElY/yWMmfp9JiloNnuhFUd VeUKKqQYGxCZ4mY3RkG4Louulwy5PrFmbpo6lpkw/Rdo25sMRlsoOx7WZEj3pHuzi+2k 2LXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=68Cjk2krWuLCLqwuVkKp32QKy4UuNZQ+DBLOl7qONe0=; b=yM+7fxaxGhXDInb869VaLKD+Z+vNcTWF/tC/1wYUsR0g1daAndaAP4sJ+/p9ahgE35 DRZMpqqPk5jM+yAgLIDWta5vstDk5pks6MELlqzZT+LrdeBvckXsfpup8K+Vehkv/Kma s6S1EdJYLQi1qg0Q9+maLg3krQNYCOWlSdAdjA2AEix53Re5vWki+PbOrngG6HIBiuBN v/5pp6vkMHl+1tQdHRwhc7Hn3uS2deHo8AkWt28p8gFWrhuitQVSjg1FQSipEWBsatpi A6fCqklQrJe24OlkXRRYRfGrXefQ3S4WxhUTuBXi3BjXa5vbTsxfB9EPhDbJOIIat41x h9Qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="SL4/zXp2"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m2-20020a170902f64200b001782a082e9asi12482718plg.165.2022.10.04.13.37.08; Tue, 04 Oct 2022 13:37:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="SL4/zXp2"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229637AbiJDUYr (ORCPT + 99 others); Tue, 4 Oct 2022 16:24:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229619AbiJDUYo (ORCPT ); Tue, 4 Oct 2022 16:24:44 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A3276258 for ; Tue, 4 Oct 2022 13:24:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664915080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=68Cjk2krWuLCLqwuVkKp32QKy4UuNZQ+DBLOl7qONe0=; b=SL4/zXp2FeQHoJhWFcfhQTN5jjxxEXuKgqEz5B+cI7xKc0GyGGtFHufoDu6wO6X+X5uojr Azl6//2tiv7Zs25e+OaAdjv6XrB8QOcfysEFDDD5f4RNtmur44BLch1ElEmh5mVUNiv1uR lbPJsJKEvzif9Uy74TRFXd7lH632Yeg= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-599-6nYTxoTBMSiDvqWHTmPTnA-1; Tue, 04 Oct 2022 16:24:37 -0400 X-MC-Unique: 6nYTxoTBMSiDvqWHTmPTnA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 385D01C0758C; Tue, 4 Oct 2022 20:24:36 +0000 (UTC) Received: from emerald.stthomas.edu (unknown [10.22.18.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id 855191121314; Tue, 4 Oct 2022 20:24:34 +0000 (UTC) From: Lyude Paul To: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org Cc: Harry Wentland , Leo Li , Rodrigo Siqueira , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Fangzhi Zuo , Wayne Lin , Ian Chen , Mikita Lipski , Hamza Mahfooz , Claudio Suarez , Colin Ian King , Jani Nikula , linux-kernel@vger.kernel.org (open list) Subject: [PATCH] drm/amdgpu/dm/mst: Fix incorrect usage of drm_dp_add_payload_part2() Date: Tue, 4 Oct 2022 15:24:28 -0500 Message-Id: <20221004202429.124422-1-lyude@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Yikes, it appears somehow I totally made a mistake here. We're currently checking to see if drm_dp_add_payload_part2() returns a non-zero value to indicate success. That's totally wrong though, as this function only returns a zero value on success - not the other way around. So, fix that. Signed-off-by: Lyude Paul Issue: https://gitlab.freedesktop.org/drm/amd/-/issues/2171 Fixes: 4d07b0bc4034 ("drm/display/dp_mst: Move all payload info into the atomic state") --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c index b8077fcd4651..00598def5b39 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c @@ -297,7 +297,7 @@ bool dm_helpers_dp_mst_send_payload_allocation( clr_flag = MST_ALLOCATE_NEW_PAYLOAD; } - if (enable && drm_dp_add_payload_part2(mst_mgr, mst_state->base.state, payload)) { + if (enable && drm_dp_add_payload_part2(mst_mgr, mst_state->base.state, payload) == 0) { amdgpu_dm_set_mst_status(&aconnector->mst_status, set_flag, false); } else { -- 2.37.3