From patchwork Mon Aug 29 15:14:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Ser X-Patchwork-Id: 12958021 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7E4BDECAAD2 for ; Mon, 29 Aug 2022 15:15:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B0F1210F39E; Mon, 29 Aug 2022 15:15:13 +0000 (UTC) Received: from mail-4022.proton.ch (mail-4022.proton.ch [185.70.40.22]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0567510F391 for ; Mon, 29 Aug 2022 15:15:10 +0000 (UTC) Date: Mon, 29 Aug 2022 15:14:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail3; t=1661786107; x=1662045307; bh=e4jUqxUScMtErGJkmkHwID2vhEFdoPxDRA7/lrlBH0U=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:Feedback-ID:From:To: Cc:Date:Subject:Reply-To:Feedback-ID:Message-ID; b=b5qbTANwPOrd2LL82qV0uM7cRymk942lKa8iXdavt8M/Jf0lDhZ9+3664CmJwbYzV Zc9Mewb0KwFxAweV0nrGZByEF+tOwe55R+QBFO/QqQjy+m7f0vAOE8i2IWhCCJbtm5 73SL4YMXiApAzKHh5ogSPTEZSm7bK3K79YwfZTOMRvKti+JxhvX9vVKSMdjGgNN7om fdXqNAWi+7Wa+Nljw4uE6n0FPEYP1/M7j+bjIjn/g2zMZH0IyvIhRtLUs6dFpSq30L j6ZTSZcB1mLCbKq6yzkF1Wy5xD/XXPzEM+RekUqQyftBLhbQ6kSg2KQPGePdXY6RTu Y9bOJq76OYKsA== To: dri-devel@lists.freedesktop.org From: Simon Ser Subject: [PATCH v2 1/3] drm/atomic-helper: print message on driver connector check failure Message-ID: <20220829151451.152114-1-contact@emersion.fr> Feedback-ID: 1358184:user:proton MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Simon Ser Cc: Daniel Vetter Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Sometimes drivers are missing logs when they return EINVAL. Printing the failure here in common code can help understand where EINVAL is coming from. All other atomic_check() calls in this file already have similar logging. v2: add missing newlines Signed-off-by: Simon Ser Cc: Daniel Vetter Cc: Lyude Paul Reviewed-by: Lyude Paul --- drivers/gpu/drm/drm_atomic_helper.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index c6abfd3d4b62..4aa05b626b57 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -702,8 +702,12 @@ drm_atomic_helper_check_modeset(struct drm_device *dev, if (funcs->atomic_check) ret = funcs->atomic_check(connector, state); - if (ret) + if (ret) { + drm_dbg_atomic(dev, + "[CONNECTOR:%d:%s] driver check failed\n", + connector->base.id, connector->name); return ret; + } connectors_mask |= BIT(i); } @@ -745,8 +749,12 @@ drm_atomic_helper_check_modeset(struct drm_device *dev, if (funcs->atomic_check) ret = funcs->atomic_check(connector, state); - if (ret) + if (ret) { + drm_dbg_atomic(dev, + "[CONNECTOR:%d:%s] driver check failed\n", + connector->base.id, connector->name); return ret; + } } /*