lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1c91ff55-e6c6-4543-bbf5-c7543cc03979@igalia.com>
Date: Mon, 26 Feb 2024 09:30:24 -0300
From: Maíra Canal <mcanal@...lia.com>
To: Maxime Ripard <mripard@...nel.org>,
 Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
 Thomas Zimmermann <tzimmermann@...e.de>, David Airlie <airlied@...il.com>,
 Daniel Vetter <daniel@...ll.ch>, Jonathan Corbet <corbet@....net>,
 Sandy Huang <hjc@...k-chips.com>, Heiko Stübner
 <heiko@...ech.de>, Chen-Yu Tsai <wens@...e.org>,
 Jernej Skrabec <jernej.skrabec@...il.com>,
 Samuel Holland <samuel@...lland.org>
Cc: Hans Verkuil <hverkuil@...all.nl>,
 Sebastian Wick <sebastian.wick@...hat.com>,
 Ville Syrjälä <ville.syrjala@...ux.intel.com>,
 dri-devel@...ts.freedesktop.org, linux-arm-kernel@...ts.infradead.org,
 linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-media@...r.kernel.org, linux-rockchip@...ts.infradead.org,
 linux-sunxi@...ts.linux.dev
Subject: Re: [PATCH v7 30/36] drm/vc4: tests: Convert to plane creation helper

On 2/22/24 15:14, Maxime Ripard wrote:
> Now that we have a plane create helper for kunit mocked drivers, let's
> convert to it in vc4.

Reviewed-by: Maíra Canal <mcanal@...lia.com>

Best Regards,
- Maíra

> 
> Signed-off-by: Maxime Ripard <mripard@...nel.org>
> ---
>   drivers/gpu/drm/vc4/tests/vc4_mock_plane.c | 34 +++++++-----------------------
>   1 file changed, 8 insertions(+), 26 deletions(-)
> 
> diff --git a/drivers/gpu/drm/vc4/tests/vc4_mock_plane.c b/drivers/gpu/drm/vc4/tests/vc4_mock_plane.c
> index 973f5f929097..14357db82238 100644
> --- a/drivers/gpu/drm/vc4/tests/vc4_mock_plane.c
> +++ b/drivers/gpu/drm/vc4/tests/vc4_mock_plane.c
> @@ -1,43 +1,25 @@
>   // SPDX-License-Identifier: GPL-2.0
>   
> -#include <drm/drm_atomic_state_helper.h>
> -#include <drm/drm_fourcc.h>
> -#include <drm/drm_modeset_helper_vtables.h>
> +#include <drm/drm_kunit_helpers.h>
>   #include <drm/drm_plane.h>
>   
>   #include <kunit/test.h>
>   
>   #include "vc4_mock.h"
>   
> -static const struct drm_plane_helper_funcs vc4_dummy_plane_helper_funcs = {
> -};
> -
> -static const struct drm_plane_funcs vc4_dummy_plane_funcs = {
> -	.atomic_destroy_state	= drm_atomic_helper_plane_destroy_state,
> -	.atomic_duplicate_state	= drm_atomic_helper_plane_duplicate_state,
> -	.reset			= drm_atomic_helper_plane_reset,
> -};
> -
> -static const uint32_t vc4_dummy_plane_formats[] = {
> -	DRM_FORMAT_XRGB8888,
> -};
> -
>   struct drm_plane *vc4_dummy_plane(struct kunit *test, struct drm_device *drm,
>   				  enum drm_plane_type type)
>   {
>   	struct drm_plane *plane;
>   
> -	plane = __drmm_universal_plane_alloc(drm, sizeof(struct drm_plane), 0,
> -						 0,
> -						 &vc4_dummy_plane_funcs,
> -						 vc4_dummy_plane_formats,
> -						 ARRAY_SIZE(vc4_dummy_plane_formats),
> -						 NULL,
> -						 DRM_PLANE_TYPE_PRIMARY,
> -						 NULL);
> +	KUNIT_ASSERT_EQ(test, type, DRM_PLANE_TYPE_PRIMARY);
> +
> +	plane = drm_kunit_helper_create_primary_plane(test, drm,
> +						      NULL,
> +						      NULL,
> +						      NULL, 0,
> +						      NULL);
>   	KUNIT_ASSERT_NOT_ERR_OR_NULL(test, plane);
>   
> -	drm_plane_helper_add(plane, &vc4_dummy_plane_helper_funcs);
> -
>   	return plane;
>   }
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ