From patchwork Mon Feb 12 13:12:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 199780 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp2425909dyd; Mon, 12 Feb 2024 05:28:25 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU/Q+pVQ+YZt8xsIAlzP0IvY/kPrTyjWwc+iVD/Zcp2eO5sL4xEYQZTzIZXHtG54hKebXdoyoG7KHAlLxQjUwaJkLl2lg== X-Google-Smtp-Source: AGHT+IF7BYp94GLcMDFWE2JhQ6PnKTFl8bLKZXTnYIjtfafcS39KXHwxNXkFMYGmJmA4u0JOgxZq X-Received: by 2002:a17:903:2448:b0:1d7:5943:21b8 with SMTP id l8-20020a170903244800b001d7594321b8mr7968554pls.16.1707744505468; Mon, 12 Feb 2024 05:28:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707744505; cv=pass; d=google.com; s=arc-20160816; b=vPaU4jh7c1ORHN9sFrLbdS8MtCH8IBrgsePyZHF/Wfu40AAycE2qD+lU2GcgV4daGj ERW3rbG+PAIqPj4ivHATdS1ciq+7nXbwLvWE0lh2OuNfJibtSbz40gk48hHW/IEJSfrs 4Sn45U6f43LI+7aZ2QjLp3iAwerdiRVSnOyLcziTSvTDQJ/2S5Da8V2T2nTmXjOtHjKK SP6qrwtqoM9so0afC4yMBrtUt/4fiNEcCNHZ6jSqsTudKKFbdhXsnXlletd+UEqVwkjw hooAMdeKwC2A/PDInoZwyrXMNL0+G6WdbhiUy2uZh6VQ7on7V/Pee6UMpCSI6R3J22RC +PzA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=KaZDzbh/RnR+FHcH2Ga6aFpETudP2lhcIzurRUqpQR0=; fh=zxymFzcjEWPzZ6g9cCRnMWS8AFdvcRl+V4Z95cYXXd8=; b=If0AOrg5tYWenAE6xPtl7dZ6qctF0ZQ9NDC/kWXZuumWSdStQHxD3y2UZE0enKLcpX A5WfgnbcsWN8agTCr+Yq9h+y0lux566SzHNlldkXA8wcGBUUK0zh5KPTzHng2KhvO3ps 48W0g7//YS0Ml8Iqihpg+T5sx9lZtNyXLiYpg83tTkKseOE9/CCoUpUdthx5WbT9y581 dWgq0zcuK3jz3qj+U1vU5pCmUQn80p6qbYc20KSRr9F/3TfmrMo/vO13Rn2GJRwvb4s4 9KW92SuqorIWQYqmY6J1h3Ukxa19Oo8fHFbusP3wHXI5+fVQg6YQD7SC2guppLxgx3rA mdPg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="HnWjb3/T"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-61616-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61616-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCWWnL932Fgg5Tb++wu+rIWFeauOXJln2umiVhhVQKx8cyDKtXXsIaKeZq629Y5s3WhTbKVOUXIn2J0U93pDn9aSRuKwBw== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id c11-20020a170902c1cb00b001d9b3ef8311si250098plc.354.2024.02.12.05.28.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 05:28:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61616-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="HnWjb3/T"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-61616-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61616-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 65697B224DF for ; Mon, 12 Feb 2024 13:14:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4B1243BB20; Mon, 12 Feb 2024 13:13:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HnWjb3/T" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7F6243B194; Mon, 12 Feb 2024 13:13:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707743614; cv=none; b=mNgM8qsGjRqJO3U8NrNHPLpTpiVKGxHh2jfvEpQyAmNc3PfpM6qeeBwk3DVclRxVMYpetHvAWhXZR3BY5h966qXGjcB9uk6URxcm2oIoXpPzr0nGYh/tl9mC+g6D9zDAVTbdY63tAslhpnMw8ni71QbJx9RvoxU33LHJTkpGrwU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707743614; c=relaxed/simple; bh=FmMsFeXhutf6tMibK52IysTNfOw//ufgAXxQlMPss38=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bvYFQIHmtcdRSNMGpi0PZ1WO6OXi0d07QP3BNPRZsGZ19doolOx5gLFOkPqDH+Ird291l+WdkFyB7X7fEF2msYAEyRHNqOAwmtu9px4nnbkUfM7aAXXX4M+jp1KXeiX+DHPdctGiMfFF+ePx5wq042Vo3MDI7gvu2BeWsQKpBPw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HnWjb3/T; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03E52C433F1; Mon, 12 Feb 2024 13:13:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707743614; bh=FmMsFeXhutf6tMibK52IysTNfOw//ufgAXxQlMPss38=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=HnWjb3/TpoD5LsTLuSpJEczOHDyGGzoRzrosplO5/gP+842/Wupq9xSmxNvb1X+Bk KxfKZaxXyPEuXUr/OW87NXXBXtNH9M8R+Fd407emglF3hDAi2qeFrA+CbabjGt88AB NLBSrsrrnhSnJcW2heCyYQrI9apD3TV/sHAgp19Dh59lSGCuHtR+YLSDZ6TD2u/Vkh BF1ImkqsXBCwXMIIu2fOixiupsXFeY137HMl93YRpQgIPYX0lY7fipNBsI2cpqDAl7 jDvqCjQLpj36mgSmAVNHrZ5uJiQOlXmm9UwZKxoI/ljZes9lDGH+/u11gOhc5vuGtJ +vWRroeZ4argg== From: Maxime Ripard Date: Mon, 12 Feb 2024 14:12:45 +0100 Subject: [PATCH v6 02/36] drm/tests: helpers: Add atomic helpers Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240212-kms-hdmi-connector-state-v6-2-f4bcdc979e6f@kernel.org> References: <20240212-kms-hdmi-connector-state-v6-0-f4bcdc979e6f@kernel.org> In-Reply-To: <20240212-kms-hdmi-connector-state-v6-0-f4bcdc979e6f@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=1086; i=mripard@kernel.org; h=from:subject:message-id; bh=FmMsFeXhutf6tMibK52IysTNfOw//ufgAXxQlMPss38=; b=owGbwMvMwCX2+D1vfrpE4FHG02pJDKmnJOM9l5jtVJtx9t9V/6R5VxWmRbNefFPn/TB67pOGF 1nzV7X4dZSyMIhxMciKKbLECJsviTs163UnG988mDmsTCBDGLg4BWAivdWMDH85cgOzrlTdUZI+ rqLhNmWh7bdbm+79VTFm2FrGyrehUpvhv2syS8bcveE/KjhfGlYoGrrMkPgl/rN1b4HxnnkSb9Z xcAEA X-Developer-Key: i=mripard@kernel.org; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790699902627546979 X-GMAIL-MSGID: 1790699902627546979 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 ca4f8e4c5d5d..4fb11b938bc1 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 @@ -14,6 +15,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, }; /**