From patchwork Tue Nov 28 10:24:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 170680 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp3812991vqx; Tue, 28 Nov 2023 02:24:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IF5U+gyvZKA1f8fXgV2nsenGBWb1WHgUQW2g6OSzqm0cDqsBp1uCXlftFznNM7fiLYFZqwV X-Received: by 2002:a05:6808:1188:b0:3b6:cbd1:beda with SMTP id j8-20020a056808118800b003b6cbd1bedamr17815168oil.39.1701167082188; Tue, 28 Nov 2023 02:24:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701167082; cv=none; d=google.com; s=arc-20160816; b=bzyOdSERvPrw8+11PbvwZRxnAwBFX6yIS1mcOpb31+gb7PJxIApNl/v5yx603dPvc2 W6Td4f6foKgPhCxFZ7LsP3FHaYDtSC2nS3xwAQSosbruFbjKStU6U6lnIEICD5ld7OXT nMhwggnvdyVwzKvyAO66fyPqjmDY9JD1WlHtoCOv7Ut1ABPOqjwAwffWwA1EnZdQ7sgt pHa5GdMcpjpBSzemButJgW0rLhR0blazSqklikue3ZfB/1YgIy8PVWwgnQ3bLkxLQiGq 0Hp9fag3R3izk/RbL2IHzQNPlziBJ80ujEeDC0MlKgrar1Wy/CHbnJ7pxK0v6L7eDwLT 1wyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=lmL0otSLoycOC5GsOZNDEmjFMJ0gRgn/A899kSxFmlI=; fh=e6/uyeFf2k7v8JUtB6fPyaAS5iN3eSA1hjtg35V2Rzw=; b=RpZV+IpHvKpu3JF0Ip/UXZEUEnzKecHCSV5nzzt88byLH2sfI3dXGAI7h5UyxhnDEN jdIyJ4OoLrybf95Jet5QoU7hp3O9dPkckQwwmuzKMYHs7JtO025RzJhR4ufgKh/zZJ7A h0eAzkVkUABdbRF0HeeSbe/bcNnWQlsSY3n+ZLBJjslC3kc5MDpFvwdTN0i0FMY0H5ip Jxd5Va/kD2Yubl/Lv0WcCA4nn7Jew3d2oeSi5U9sM7ty/Z5vy8hlM2B9P+WKsFe6sYX6 QbFQNg/irn6wOXyNmRhGh3fAx25ZTqNdI026Mxs+gyhl+hkawJ9n3S8jySVakn9rUZwS 7QwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VnWvtLMY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id bz3-20020a056a02060300b005be09a118d3si13223477pgb.143.2023.11.28.02.24.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 02:24:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VnWvtLMY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id D9F9D8079AD1; Tue, 28 Nov 2023 02:24:39 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344216AbjK1KYY (ORCPT + 99 others); Tue, 28 Nov 2023 05:24:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344167AbjK1KYV (ORCPT ); Tue, 28 Nov 2023 05:24:21 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E968182 for ; Tue, 28 Nov 2023 02:24:28 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A3E8C433C9; Tue, 28 Nov 2023 10:24:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701167067; bh=Fnr3n9V/rmEGhyYzyhKw6YhgF2ss0cefC+cpk2ChxTM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=VnWvtLMY80iPcQuP+xsQy4v7vRFYFqKSo7ScwL0WjMFK/GIfD4ojmmavN0ydmyoAv Un8aG1ogypWQEECspemYcXzYrgRoP7+fdpOxeS/QKwBwnE5tHAkvwYI1c6W+DjeTJS d2gOAazTRY3nr0aDqhEanKZUakjMGhcjP+Cqxg0McxbP054gUucNby/kORDYP5mJFE OojQ3xAHlAjmAqimKsrKFcdk0ayK8U5JJcm6H7U3ZiqLtTxTRxOPc6Xk/FKBlEU516 p2QETlP6sYMAZ8U4IJidKEwJyKZzr7IV1w66QP3CzqopvcUEfcpTqKZR34NKM3ktHv hJ2bty+eey0aQ== From: Maxime Ripard Date: Tue, 28 Nov 2023 11:24:13 +0100 Subject: [PATCH v4 02/45] drm/tests: helpers: Add atomic helpers MIME-Version: 1.0 Message-Id: <20231128-kms-hdmi-connector-state-v4-2-c7602158306e@kernel.org> References: <20231128-kms-hdmi-connector-state-v4-0-c7602158306e@kernel.org> In-Reply-To: <20231128-kms-hdmi-connector-state-v4-0-c7602158306e@kernel.org> To: Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Emma Anholt , Jonathan Corbet , Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: Hans Verkuil , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-sunxi@lists.linux.dev, Maxime Ripard X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1134; i=mripard@kernel.org; h=from:subject:message-id; bh=Fnr3n9V/rmEGhyYzyhKw6YhgF2ss0cefC+cpk2ChxTM=; b=owGbwMvMwCX2+D1vfrpE4FHG02pJDKmp+y8u+LXy4p8IgX0Wy6YVdRYufr9zwf2erwHTjQyqS r6n6U5+0VHKwiDGxSArpsgSI2y+JO7UrNedbHzzYOawMoEMYeDiFICJrF7G8D+9vWBq4OmlYt9m SzF+VBHacF7p+ZzTHqzc884WJxwxyZrK8E9rfoZPA59vwuuI02uSWdhDDiwRFUnyCD4uNYOf/Xd pJwcA X-Developer-Key: i=mripard@kernel.org; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 28 Nov 2023 02:24:40 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783802974521704411 X-GMAIL-MSGID: 1783802974521704411 The mock device we were creating was missing any of the driver-wide helpers. That was fine before since we weren't testing the atomic state path, but we're going to start, so let's use the default implementations. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/tests/drm_kunit_helpers.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/tests/drm_kunit_helpers.c b/drivers/gpu/drm/tests/drm_kunit_helpers.c index bccb33b900f3..272a3ba46d60 100644 --- a/drivers/gpu/drm/tests/drm_kunit_helpers.c +++ b/drivers/gpu/drm/tests/drm_kunit_helpers.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include +#include #include #include #include @@ -13,6 +14,8 @@ #define KUNIT_DEVICE_NAME "drm-kunit-mock-device" static const struct drm_mode_config_funcs drm_mode_config_funcs = { + .atomic_check = drm_atomic_helper_check, + .atomic_commit = drm_atomic_helper_commit, }; static int fake_probe(struct platform_device *pdev)