Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp510292rdb; Thu, 22 Feb 2024 10:16:28 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV61HvNfBzXOY864U9udeTUChmEYxRkqZhWqOJryf5/Kw56EGqUQ1NnooS5WQW/OBbY7D2oyIj4t9bc+spcyoERhM5yAaZJoiVP/mYW0A== X-Google-Smtp-Source: AGHT+IGXg5xRJH744vtEFomJGYmjeGsuULB4WeD6keT5rmRvxzIVvQ8kWkiel1j1Vc1MpoBOUYSQ X-Received: by 2002:a17:906:a19a:b0:a3d:2a52:380f with SMTP id s26-20020a170906a19a00b00a3d2a52380fmr14781767ejy.72.1708625788543; Thu, 22 Feb 2024 10:16:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708625788; cv=pass; d=google.com; s=arc-20160816; b=qPjpg6vwi0Q0KXiQaF66nQfrEKxN8QxBBnkfj44d1fAcsRigK8zAQg7ofl/z6R0hJ6 PcwA75aJOoMus0xSkdhiGZQxAu8CaMLHQSsroiHl/7Xgv0GBaddF7F6CzFnqmKaLhwJL 4AQYWOT63J6pdKSNyyPNnfMMyQsMMt/7BHcVpnRcqt5Mkg1/dyzEg7tDiMtuT2CrJRun rVMYvCYy0dQiuOjIvFV9kByF9xrKeSqYqttGs9IFbsT36FG4l8ZPWsAXdV4RZTrZJ7d3 HRgtEHJ1B3qNxsU1PELoP4EH6L5HVAnC/HHTThDNH83TyH9XHQatv9bATI38C7HS65W1 N94g== 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=LGU1uoSYV6XFxmpWP17GkUNO3Z1gMHblacZZR0S6V/8=; fh=7mnR4/DMo6zaWtUGaVI9DND4TR+QGflpVaaXOChu5h0=; b=iwOp7e0ydXxjozO3PHwDbI0WhSbAghVl7xRbfK8qwzdks56mHpQO0j8i0sL7hI7T11 ZGIlP8dgiN71p0gwoHVLKLE810QQo2rAFBWcOd4keCyNhAXWu1gWmVAUziutyrj+ezye ilVCSEtz3LY0csRO8gSV0iHVxLcfUCliheDSpENHDwtitTUfH/WlyH1q9vKl3UkkGwmL pv7F8NGHaYmhVwdKK3sSYJxogjbkqkU1q4qaJZ2jooJhb+wdvgkQUA9fxHO67/l+7YN5 yf2U9WNvZ8DJqAN72zH2UjXxtnBhKlu5bQe1eGzAFxVvmUvaMBWSYbBjz2bbivVA75oL F/3w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=X+M5ANkB; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-77064-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77064-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id dt20-20020a170907729400b00a3e71ba9290si4575379ejc.216.2024.02.22.10.16.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 10:16:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77064-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=X+M5ANkB; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-77064-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77064-linux.lists.archive=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 4D0711F24B9E for ; Thu, 22 Feb 2024 18:16:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 309D715AACD; Thu, 22 Feb 2024 18:14:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="X+M5ANkB" 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 46A9915AAAA; Thu, 22 Feb 2024 18:14:33 +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=1708625674; cv=none; b=gVnzCdmi/8vKkA9DdZBtPfThwOUIlqgUi+iw8+lrgmVClZSUZN/Cvsy0uTCsRcJ/xxtF0tUO0fvY0Ve8/U+r9sI9f/0CZ42QvcFnvtytH+mnosetnBeeSJtEnlQuBQwWAx8mHY/isx0oAozfOUvv+tzr5MfMSqI7dUCkK4do+TE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708625674; c=relaxed/simple; bh=TPv8mjAc7k5WixCBRXHynM6H/AaB/bUbe1H5MJSrFTQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=b6qHN3zItMNj5J8LKUF/Cz6KMRCc5jUj7qLKst4l0Y9tRjkZIrZmDmls1MrbbqWqWqZ8dcu55CY9TonOXWji3WkdAdrONJDmUSL3D5CQOZEsOardBz4JcXlES5rOCdF3kQnKZMP0YcwQYndNXvy/H4mYNHoKDINY0+UGjoHZpCM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=X+M5ANkB; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 63CADC43399; Thu, 22 Feb 2024 18:14:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708625673; bh=TPv8mjAc7k5WixCBRXHynM6H/AaB/bUbe1H5MJSrFTQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=X+M5ANkB1G/XImwHDpav6Puqp1tOivphrSFKAYvmOdJchFlHyCPJYfTXMrxPNi+Wo Xi5p2qC9Q92a0AH97//XjY6qjSMO0pzcsMplhKKuHRAp1/CqdU62EflPbnWwI1NHpL iMgRNV2C3AoV7bcRuCBbhihhYOGTyP9b/j9oB/of4n8ncIufeKXgVJXY+fOJF67P7T SP3Ecy3Hpc1uA2/A7mPcdN+szfNbAFddDScakVfzxdnXN0yizutE9sfcQP5w1UuOfO y/MM1ie2l+ekMhxnRguIo1l6hd2rWld2YAFHsP5Yg2I5vyTn100oEuAB6E6Q3s5smY DT1CAmYDF8+JQ== From: Maxime Ripard Date: Thu, 22 Feb 2024 19:13:48 +0100 Subject: [PATCH v7 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240222-kms-hdmi-connector-state-v7-2-8f4af575fce2@kernel.org> References: <20240222-kms-hdmi-connector-state-v7-0-8f4af575fce2@kernel.org> In-Reply-To: <20240222-kms-hdmi-connector-state-v7-0-8f4af575fce2@kernel.org> To: Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Jonathan Corbet , Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: Hans Verkuil , Sebastian Wick , =?utf-8?q?Ville_Syrj=C3=A4l=C3=A4?= , 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=TPv8mjAc7k5WixCBRXHynM6H/AaB/bUbe1H5MJSrFTQ=; b=owGbwMvMwCX2+D1vfrpE4FHG02pJDKnX+17F6uVucBPQ2WjBInZLQdLzjvr37ZceBBx8Ei6y/ 9tibRnRjlIWBjEuBlkxRZYYYfMlcadmve5k45sHM4eVCWQIAxenAEzkpyAjw7GvS26/03vapBp3 bfr1pd/XHs1av5C7ZnvFwfhDn96/aFrIyPBO/Z2sBptBi2LkPzHmdT0fdRIXNsttmvNX64XIVPa zbpwA X-Developer-Key: i=mripard@kernel.org; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D 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, }; /** -- 2.43.2