From: Alex Deucher <alexdeucher@gmail.com>
To: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: "Daniel Vetter" <daniel.vetter@ffwll.ch>,
"Intel Graphics Development" <intel-gfx@lists.freedesktop.org>,
"Zhan Liu" <zhan.liu@amd.com>,
"amd-gfx list" <amd-gfx@lists.freedesktop.org>,
"Kazlauskas, Nicholas" <nicholas.kazlauskas@amd.com>,
"Maling list - DRI developers" <dri-devel@lists.freedesktop.org>,
"Deucher, Alexander" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH v2] drm: Check actual format for legacy pageflip.
Date: Mon, 11 Jan 2021 10:02:43 -0500 [thread overview]
Message-ID: <CADnq5_OVtCubsGP=-=q-hYJ3e6a3=pozi7ZhDiqdUkUKLCiwMg@mail.gmail.com> (raw)
In-Reply-To: <20210110021142.28221-1-bas@basnieuwenhuizen.nl>
On Sat, Jan 9, 2021 at 9:11 PM Bas Nieuwenhuizen
<bas@basnieuwenhuizen.nl> wrote:
>
> With modifiers one can actually have different format_info structs
> for the same format, which now matters for AMDGPU since we convert
> implicit modifiers to explicit modifiers with multiple planes.
>
> I checked other drivers and it doesn't look like they end up triggering
> this case so I think this is safe to relax.
>
> Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Reviewed-by: Zhan Liu <zhan.liu@amd.com>
> Acked-by: Christian König <christian.koenig@amd.com>
> Acked-by: Alex Deucher <alexander.deucher@amd.com>
> Fixes: 816853f9dc40 ("drm/amd/display: Set new format info for converted metadata.")
Do you have commit rights to drm-misc or do you need someone to commit
this for you?
Thanks!
Alex
> ---
> drivers/gpu/drm/drm_plane.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
> index e6231947f987..a0cb746bcb0a 100644
> --- a/drivers/gpu/drm/drm_plane.c
> +++ b/drivers/gpu/drm/drm_plane.c
> @@ -1163,7 +1163,14 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev,
> if (ret)
> goto out;
>
> - if (old_fb->format != fb->format) {
> + /*
> + * Only check the FOURCC format code, excluding modifiers. This is
> + * enough for all legacy drivers. Atomic drivers have their own
> + * checks in their ->atomic_check implementation, which will
> + * return -EINVAL if any hw or driver constraint is violated due
> + * to modifier changes.
> + */
> + if (old_fb->format->format != fb->format->format) {
> DRM_DEBUG_KMS("Page flip is not allowed to change frame buffer format.\n");
> ret = -EINVAL;
> goto out;
> --
> 2.29.2
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: Alex Deucher <alexdeucher@gmail.com>
To: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: "Daniel Vetter" <daniel.vetter@ffwll.ch>,
"Intel Graphics Development" <intel-gfx@lists.freedesktop.org>,
"amd-gfx list" <amd-gfx@lists.freedesktop.org>,
"Kazlauskas, Nicholas" <nicholas.kazlauskas@amd.com>,
"Maling list - DRI developers" <dri-devel@lists.freedesktop.org>,
"Deucher, Alexander" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>
Subject: Re: [Intel-gfx] [PATCH v2] drm: Check actual format for legacy pageflip.
Date: Mon, 11 Jan 2021 10:02:43 -0500 [thread overview]
Message-ID: <CADnq5_OVtCubsGP=-=q-hYJ3e6a3=pozi7ZhDiqdUkUKLCiwMg@mail.gmail.com> (raw)
In-Reply-To: <20210110021142.28221-1-bas@basnieuwenhuizen.nl>
On Sat, Jan 9, 2021 at 9:11 PM Bas Nieuwenhuizen
<bas@basnieuwenhuizen.nl> wrote:
>
> With modifiers one can actually have different format_info structs
> for the same format, which now matters for AMDGPU since we convert
> implicit modifiers to explicit modifiers with multiple planes.
>
> I checked other drivers and it doesn't look like they end up triggering
> this case so I think this is safe to relax.
>
> Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Reviewed-by: Zhan Liu <zhan.liu@amd.com>
> Acked-by: Christian König <christian.koenig@amd.com>
> Acked-by: Alex Deucher <alexander.deucher@amd.com>
> Fixes: 816853f9dc40 ("drm/amd/display: Set new format info for converted metadata.")
Do you have commit rights to drm-misc or do you need someone to commit
this for you?
Thanks!
Alex
> ---
> drivers/gpu/drm/drm_plane.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
> index e6231947f987..a0cb746bcb0a 100644
> --- a/drivers/gpu/drm/drm_plane.c
> +++ b/drivers/gpu/drm/drm_plane.c
> @@ -1163,7 +1163,14 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev,
> if (ret)
> goto out;
>
> - if (old_fb->format != fb->format) {
> + /*
> + * Only check the FOURCC format code, excluding modifiers. This is
> + * enough for all legacy drivers. Atomic drivers have their own
> + * checks in their ->atomic_check implementation, which will
> + * return -EINVAL if any hw or driver constraint is violated due
> + * to modifier changes.
> + */
> + if (old_fb->format->format != fb->format->format) {
> DRM_DEBUG_KMS("Page flip is not allowed to change frame buffer format.\n");
> ret = -EINVAL;
> goto out;
> --
> 2.29.2
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Alex Deucher <alexdeucher@gmail.com>
To: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: "Mario Kleiner" <mario.kleiner.de@gmail.com>,
"Daniel Vetter" <daniel.vetter@ffwll.ch>,
"Intel Graphics Development" <intel-gfx@lists.freedesktop.org>,
"Zhan Liu" <zhan.liu@amd.com>,
"amd-gfx list" <amd-gfx@lists.freedesktop.org>,
"Kazlauskas, Nicholas" <nicholas.kazlauskas@amd.com>,
"Maling list - DRI developers" <dri-devel@lists.freedesktop.org>,
"Deucher, Alexander" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"Ville Syrjälä" <ville.syrjala@linux.intel.com>
Subject: Re: [PATCH v2] drm: Check actual format for legacy pageflip.
Date: Mon, 11 Jan 2021 10:02:43 -0500 [thread overview]
Message-ID: <CADnq5_OVtCubsGP=-=q-hYJ3e6a3=pozi7ZhDiqdUkUKLCiwMg@mail.gmail.com> (raw)
In-Reply-To: <20210110021142.28221-1-bas@basnieuwenhuizen.nl>
On Sat, Jan 9, 2021 at 9:11 PM Bas Nieuwenhuizen
<bas@basnieuwenhuizen.nl> wrote:
>
> With modifiers one can actually have different format_info structs
> for the same format, which now matters for AMDGPU since we convert
> implicit modifiers to explicit modifiers with multiple planes.
>
> I checked other drivers and it doesn't look like they end up triggering
> this case so I think this is safe to relax.
>
> Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Reviewed-by: Zhan Liu <zhan.liu@amd.com>
> Acked-by: Christian König <christian.koenig@amd.com>
> Acked-by: Alex Deucher <alexander.deucher@amd.com>
> Fixes: 816853f9dc40 ("drm/amd/display: Set new format info for converted metadata.")
Do you have commit rights to drm-misc or do you need someone to commit
this for you?
Thanks!
Alex
> ---
> drivers/gpu/drm/drm_plane.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
> index e6231947f987..a0cb746bcb0a 100644
> --- a/drivers/gpu/drm/drm_plane.c
> +++ b/drivers/gpu/drm/drm_plane.c
> @@ -1163,7 +1163,14 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev,
> if (ret)
> goto out;
>
> - if (old_fb->format != fb->format) {
> + /*
> + * Only check the FOURCC format code, excluding modifiers. This is
> + * enough for all legacy drivers. Atomic drivers have their own
> + * checks in their ->atomic_check implementation, which will
> + * return -EINVAL if any hw or driver constraint is violated due
> + * to modifier changes.
> + */
> + if (old_fb->format->format != fb->format->format) {
> DRM_DEBUG_KMS("Page flip is not allowed to change frame buffer format.\n");
> ret = -EINVAL;
> goto out;
> --
> 2.29.2
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2021-01-11 15:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-10 2:11 [PATCH v2] drm: Check actual format for legacy pageflip Bas Nieuwenhuizen
2021-01-10 2:11 ` Bas Nieuwenhuizen
2021-01-10 2:11 ` [Intel-gfx] " Bas Nieuwenhuizen
2021-01-10 2:51 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
2021-01-11 15:02 ` Alex Deucher [this message]
2021-01-11 15:02 ` [PATCH v2] " Alex Deucher
2021-01-11 15:02 ` [Intel-gfx] " Alex Deucher
2021-01-11 16:40 ` Bas Nieuwenhuizen
2021-01-11 16:40 ` Bas Nieuwenhuizen
2021-01-11 16:40 ` [Intel-gfx] " Bas Nieuwenhuizen
2021-01-11 21:28 ` Alex Deucher
2021-01-11 21:28 ` Alex Deucher
2021-01-11 21:28 ` [Intel-gfx] " Alex Deucher
2021-01-12 9:18 ` Daniel Vetter
2021-01-12 9:18 ` Daniel Vetter
2021-01-12 9:18 ` [Intel-gfx] " Daniel Vetter
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='CADnq5_OVtCubsGP=-=q-hYJ3e6a3=pozi7ZhDiqdUkUKLCiwMg@mail.gmail.com' \
--to=alexdeucher@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=bas@basnieuwenhuizen.nl \
--cc=christian.koenig@amd.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=nicholas.kazlauskas@amd.com \
--cc=zhan.liu@amd.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.