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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ye3aZHFQQux4brrc@pendragon.ideasonboard.com>
Date:   Mon, 24 Jan 2022 00:44:52 +0200
From:   Laurent Pinchart <laurent.pinchart@...asonboard.com>
To:     Tomohito Esaki <etom@...l.co.jp>
Cc:     dri-devel@...ts.freedesktop.org,
        Alex Deucher <alexander.deucher@....com>,
        Christian König <christian.koenig@....com>,
        "Pan, Xinhui" <Xinhui.Pan@....com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        Maxime Ripard <mripard@...nel.org>,
        Thomas Zimmermann <tzimmermann@...e.de>,
        Ben Skeggs <bskeggs@...hat.com>,
        Michel Dänzer <mdaenzer@...hat.com>,
        Simon Ser <contact@...rsion.fr>,
        Qingqing Zhuo <qingqing.zhuo@....com>,
        Bas Nieuwenhuizen <bas@...nieuwenhuizen.nl>,
        Mark Yacoub <markyacoub@...omium.org>,
        Sean Paul <seanpaul@...omium.org>,
        Evan Quan <evan.quan@....com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Petr Mladek <pmladek@...e.com>,
        Sakari Ailus <sakari.ailus@...ux.intel.com>,
        Lee Jones <lee.jones@...aro.org>,
        Abhinav Kumar <abhinavk@...eaurora.org>,
        Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
        Rob Clark <robdclark@...omium.org>,
        amd-gfx@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        nouveau@...ts.freedesktop.org, Daniel Stone <daniel@...ishbar.org>,
        Damian Hobson-Garcia <dhobsong@...l.co.jp>,
        Takanari Hayama <taki@...l.co.jp>
Subject: Re: [RFC PATCH v3 3/3] drm: remove allow_fb_modifiers

Hello Esaki-san,

Thank you for the patch.

On Fri, Jan 14, 2022 at 07:17:53PM +0900, Tomohito Esaki wrote:
> The allow_fb_modifiers flag is unnecessary since it has been replaced
> with cannot_support_modifiers flag.

The new flag is fb_modifiers_not_supported, not
cannot_support_modifiers.

> Signed-off-by: Tomohito Esaki <etom@...l.co.jp>
> ---
>  drivers/gpu/drm/drm_plane.c                      |  9 ---------
>  drivers/gpu/drm/selftests/test-drm_framebuffer.c |  1 -
>  include/drm/drm_mode_config.h                    | 16 ----------------
>  3 files changed, 26 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
> index 5aa7e241971e..89a3d044ab59 100644
> --- a/drivers/gpu/drm/drm_plane.c
> +++ b/drivers/gpu/drm/drm_plane.c
> @@ -288,15 +288,6 @@ static int __drm_universal_plane_init(struct drm_device *dev,
>  		}
>  	}
>  
> -	/* autoset the cap and check for consistency across all planes */
> -	if (format_modifier_count) {
> -		drm_WARN_ON(dev, !config->allow_fb_modifiers &&
> -			    !list_empty(&config->plane_list));
> -		config->allow_fb_modifiers = true;
> -	} else {
> -		drm_WARN_ON(dev, config->allow_fb_modifiers);
> -	}
> -

Shouldn't we keep a sanity check to ensure that drivers setting
fb_modifiers_not_supported do not pass modifiers ?

	drm_WARN_ON(dev, config->fb_modifiers_not_supported &&
		    format_modifier_count);

Reviewed-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>

>  	plane->modifier_count = format_modifier_count;
>  	plane->modifiers = kmalloc_array(format_modifier_count,
>  					 sizeof(format_modifiers[0]),
> diff --git a/drivers/gpu/drm/selftests/test-drm_framebuffer.c b/drivers/gpu/drm/selftests/test-drm_framebuffer.c
> index 61b44d3a6a61..f6d66285c5fc 100644
> --- a/drivers/gpu/drm/selftests/test-drm_framebuffer.c
> +++ b/drivers/gpu/drm/selftests/test-drm_framebuffer.c
> @@ -323,7 +323,6 @@ static struct drm_device mock_drm_device = {
>  		.max_width = MAX_WIDTH,
>  		.min_height = MIN_HEIGHT,
>  		.max_height = MAX_HEIGHT,
> -		.allow_fb_modifiers = true,
>  		.funcs = &mock_config_funcs,
>  	},
>  };
> diff --git a/include/drm/drm_mode_config.h b/include/drm/drm_mode_config.h
> index da82f45351c7..5001bda9f9af 100644
> --- a/include/drm/drm_mode_config.h
> +++ b/include/drm/drm_mode_config.h
> @@ -917,22 +917,6 @@ struct drm_mode_config {
>  	 */
>  	bool async_page_flip;
>  
> -	/**
> -	 * @allow_fb_modifiers:
> -	 *
> -	 * Whether the driver supports fb modifiers in the ADDFB2.1 ioctl call.
> -	 * Note that drivers should not set this directly, it is automatically
> -	 * set in drm_universal_plane_init().
> -	 *
> -	 * IMPORTANT:
> -	 *
> -	 * If this is set the driver must fill out the full implicit modifier
> -	 * information in their &drm_mode_config_funcs.fb_create hook for legacy
> -	 * userspace which does not set modifiers. Otherwise the GETFB2 ioctl is
> -	 * broken for modifier aware userspace.
> -	 */
> -	bool allow_fb_modifiers;
> -
>  	/**
>  	 * @fb_modifiers_not_supported:
>  	 *

-- 
Regards,

Laurent Pinchart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ