From patchwork Fri Nov 4 23:59:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lyude Paul X-Patchwork-Id: 15865 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp711103wru; Fri, 4 Nov 2022 17:03:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7ebynx/ZmEuFfNAkXCcF5e7iD8FB3JtFL2dkw4FrkBOG7bitjsGA00ZYpbKNR/Gh2igYHg X-Received: by 2002:a05:6a00:acb:b0:555:ac02:433e with SMTP id c11-20020a056a000acb00b00555ac02433emr38268800pfl.3.1667606604874; Fri, 04 Nov 2022 17:03:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667606604; cv=none; d=google.com; s=arc-20160816; b=XeVKqKfhUGoEYtpustu/lpuI1HRdzg2LWx/eaI4ImRXL6nGYfxQmqY4E2VyLC+eqCR /Yu/4PUfOFr7VxTVKX2udso8t58DBUdjYx6ylOeShV4Zi+/8J/Bpb8FIvt5iZLwlMF6v zoR7QodAy7Q6g1FmN+5RPJH1X6b+jcPNT/zTDmbClDScTgJlIzrvkmw8YKeT1cOrUdbO b4+alW7RJlyNwU6dJlP5AeNIXnpMZE5/tVKgeOA6kZos1L+YwXxAZGLbXyCcCZwd0Pvc y/TtNEhxHgUXZhzgkRo37wL0T32wzD/7WJIW2eesrh7MAupPQ1m8RGZFaeb3m9gt0n/2 bsSA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ffbO6hwMXfi6ia/mJYNAheXY/Bx4C/bAtN/BCx8MV7k=; b=FYdNFR3wb0slkf44/JoK0bWB5hSxpERkRY9rzR8+DoyvfSBonXDCwAHXpTLhU3F+W1 uEo+GrjpgIzJa5CP0mUcM1F4DRkQuGcgPusKURN8p9ehNmhAiuRfOmTBedQJOtJObu7j jqrUVPwrm2cc5M9t+PoFyHSiO0VKm40PTLRn12OXXj8wPu1u5gUmKOURcOg9BavPd5VM XJ4tsTFi7EhU2AkzHzizyvLCT+Wm1QoICpgLfkN3xYGLXUdOGgm1wIo8nA8sdJp6GvhF qJcSduaKvqqfDk+Oncgf3l0R1eutdg9MbW/gd32G4MBf888yciSowfpqCfrC3z2eL4yB y4Lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fopL5Khi; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y5-20020a62b505000000b0056aafb43783si671825pfe.155.2022.11.04.17.03.07; Fri, 04 Nov 2022 17:03:24 -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=fopL5Khi; 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 S229646AbiKEAAk (ORCPT + 99 others); Fri, 4 Nov 2022 20:00:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229591AbiKEAAh (ORCPT ); Fri, 4 Nov 2022 20:00:37 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE1FB4298B for ; Fri, 4 Nov 2022 16:59:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667606380; 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: in-reply-to:in-reply-to:references:references; bh=ffbO6hwMXfi6ia/mJYNAheXY/Bx4C/bAtN/BCx8MV7k=; b=fopL5Khi4ykYYA9s79CnaLpbmB3cR9RB1KuJ3+BFlcXt+nFMOAqN1X1DnMK7LJgOh31fPu eDHSow8TutQJeKO/YrGYoC9CeInNnZoywAFbQwKNUWzn134bIr+g68ih7Euq63dTYA/t9m EG+6Ja+fz5mxp8NIy4FiyHb6LFn1rd4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-640-Ef2jqjQmOPuPMfiIymyr5Q-1; Fri, 04 Nov 2022 19:59:37 -0400 X-MC-Unique: Ef2jqjQmOPuPMfiIymyr5Q-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 39928833AEC; Fri, 4 Nov 2022 23:59:36 +0000 (UTC) Received: from emerald.lyude.net (unknown [10.22.11.87]) by smtp.corp.redhat.com (Postfix) with ESMTP id 88C2F112132C; Fri, 4 Nov 2022 23:59:35 +0000 (UTC) From: Lyude Paul To: amd-gfx@lists.freedesktop.org Cc: stable@vger.kernel.org, David Airlie , Daniel Vetter , Jani Nikula , Thomas Zimmermann , Wayne Lin , Imre Deak , Mikita Lipski , Alex Deucher , dri-devel@lists.freedesktop.org (open list:DRM DRIVERS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 2/2] drm/display/dp_mst: Fix drm_dp_mst_add_affected_dsc_crtcs() return code Date: Fri, 4 Nov 2022 19:59:26 -0400 Message-Id: <20221104235926.302883-3-lyude@redhat.com> In-Reply-To: <20221104235926.302883-1-lyude@redhat.com> References: <20221104235926.302883-1-lyude@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748612263749480763?= X-GMAIL-MSGID: =?utf-8?q?1748612263749480763?= Looks like that we're accidentally dropping a pretty important return code here. For some reason, we just return -EINVAL if we fail to get the MST topology state. This is wrong: error codes are important and should never be squashed without being handled, which here seems to have the potential to cause a deadlock. Signed-off-by: Lyude Paul Fixes: 8ec046716ca8 ("drm/dp_mst: Add helper to trigger modeset on affected DSC MST CRTCs") Cc: # v5.6+ Reviewed-by: Wayne Lin --- drivers/gpu/drm/display/drm_dp_mst_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c index ecd22c038c8c0..51a46689cda70 100644 --- a/drivers/gpu/drm/display/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c @@ -5186,7 +5186,7 @@ int drm_dp_mst_add_affected_dsc_crtcs(struct drm_atomic_state *state, struct drm mst_state = drm_atomic_get_mst_topology_state(state, mgr); if (IS_ERR(mst_state)) - return -EINVAL; + return PTR_ERR(mst_state); list_for_each_entry(pos, &mst_state->payloads, next) {