From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Tomohito Esaki <etom@igel.co.jp>
Cc: "David Airlie" <airlied@linux.ie>,
nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
"Michel Dänzer" <mdaenzer@redhat.com>,
"Daniel Stone" <daniel@fooishbar.org>,
"Lee Jones" <lee.jones@linaro.org>,
"Rob Clark" <robdclark@chromium.org>,
"Evan Quan" <evan.quan@amd.com>,
amd-gfx@lists.freedesktop.org, "Ben Skeggs" <bskeggs@redhat.com>,
"Petr Mladek" <pmladek@suse.com>,
"Sakari Ailus" <sakari.ailus@linux.intel.com>,
"Bas Nieuwenhuizen" <bas@basnieuwenhuizen.nl>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Abhinav Kumar" <abhinavk@codeaurora.org>,
"Dmitry Baryshkov" <dmitry.baryshkov@linaro.org>,
"Takanari Hayama" <taki@igel.co.jp>,
"Sean Paul" <seanpaul@chromium.org>,
"Maxime Ripard" <mripard@kernel.org>,
"Daniel Vetter" <daniel@ffwll.ch>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Mark Yacoub" <markyacoub@chromium.org>,
"Qingqing Zhuo" <qingqing.zhuo@amd.com>,
"Pan, Xinhui" <Xinhui.Pan@amd.com>,
linux-kernel@vger.kernel.org, "Simon Ser" <contact@emersion.fr>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Damian Hobson-Garcia" <dhobsong@igel.co.jp>,
"Christian König" <christian.koenig@amd.com>
Subject: Re: [Nouveau] [RFC PATCH v3 3/3] drm: remove allow_fb_modifiers
Date: Mon, 24 Jan 2022 00:44:52 +0200 [thread overview]
Message-ID: <Ye3aZHFQQux4brrc@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20220114101753.24996-4-etom@igel.co.jp>
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@igel.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@ideasonboard.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
prev parent reply other threads:[~2022-01-23 22:45 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-14 10:17 [Nouveau] [RFC PATCH v3 0/3] Add support modifiers for drivers whose planes only support linear layout Tomohito Esaki
2022-01-14 10:17 ` [Nouveau] [RFC PATCH v3 1/3] drm: introduce fb_modifiers_not_supported flag in mode_config Tomohito Esaki
2022-01-14 14:43 ` Harry Wentland
2022-01-23 22:50 ` Laurent Pinchart
2022-01-25 5:19 ` Esaki Tomohito
2022-01-14 10:17 ` [Nouveau] [RFC PATCH v3 2/3] drm: add support modifiers for drivers whose planes only support linear layout Tomohito Esaki
2022-01-14 14:16 ` Andy Shevchenko
2022-01-14 15:07 ` Simon Ser
2022-01-14 15:17 ` Andy Shevchenko
2022-01-14 15:42 ` Simon Ser
2022-01-14 16:06 ` Andy Shevchenko
2022-01-17 5:15 ` Esaki Tomohito
2022-01-18 9:53 ` Andy Shevchenko
2022-01-19 2:35 ` Esaki Tomohito
2022-01-19 19:17 ` Andy Shevchenko
2022-01-23 22:37 ` Laurent Pinchart
2022-01-14 10:17 ` [Nouveau] [RFC PATCH v3 3/3] drm: remove allow_fb_modifiers Tomohito Esaki
2022-01-23 22:44 ` Laurent Pinchart [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Ye3aZHFQQux4brrc@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=Xinhui.Pan@amd.com \
--cc=abhinavk@codeaurora.org \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bas@basnieuwenhuizen.nl \
--cc=bskeggs@redhat.com \
--cc=christian.koenig@amd.com \
--cc=contact@emersion.fr \
--cc=daniel@ffwll.ch \
--cc=daniel@fooishbar.org \
--cc=dhobsong@igel.co.jp \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=etom@igel.co.jp \
--cc=evan.quan@amd.com \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=markyacoub@chromium.org \
--cc=mdaenzer@redhat.com \
--cc=mripard@kernel.org \
--cc=nouveau@lists.freedesktop.org \
--cc=pmladek@suse.com \
--cc=qingqing.zhuo@amd.com \
--cc=robdclark@chromium.org \
--cc=sakari.ailus@linux.intel.com \
--cc=seanpaul@chromium.org \
--cc=taki@igel.co.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).