All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm: Check actual format for legacy pageflip.
@ 2021-01-10  2:11 ` Bas Nieuwenhuizen
  0 siblings, 0 replies; 16+ messages in thread
From: Bas Nieuwenhuizen @ 2021-01-10  2:11 UTC (permalink / raw)
  To: dri-devel
  Cc: daniel.vetter, intel-gfx, zhan.liu, amd-gfx,
	Christian König, alexander.deucher, nicholas.kazlauskas

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.")
---
 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

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Intel-gfx] [PATCH v2] drm: Check actual format for legacy pageflip.
@ 2021-01-10  2:11 ` Bas Nieuwenhuizen
  0 siblings, 0 replies; 16+ messages in thread
From: Bas Nieuwenhuizen @ 2021-01-10  2:11 UTC (permalink / raw)
  To: dri-devel
  Cc: daniel.vetter, intel-gfx, amd-gfx, Christian König,
	Bas Nieuwenhuizen, alexander.deucher, nicholas.kazlauskas

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.")
---
 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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v2] drm: Check actual format for legacy pageflip.
@ 2021-01-10  2:11 ` Bas Nieuwenhuizen
  0 siblings, 0 replies; 16+ messages in thread
From: Bas Nieuwenhuizen @ 2021-01-10  2:11 UTC (permalink / raw)
  To: dri-devel
  Cc: mario.kleiner.de, daniel.vetter, intel-gfx, zhan.liu, amd-gfx,
	Christian König, Bas Nieuwenhuizen, alexander.deucher,
	nicholas.kazlauskas, ville.syrjala

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.")
---
 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

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Intel-gfx] ✗ Fi.CI.BAT: failure for drm: Check actual format for legacy pageflip.
  2021-01-10  2:11 ` [Intel-gfx] " Bas Nieuwenhuizen
  (?)
  (?)
@ 2021-01-10  2:51 ` Patchwork
  -1 siblings, 0 replies; 16+ messages in thread
From: Patchwork @ 2021-01-10  2:51 UTC (permalink / raw)
  To: Bas Nieuwenhuizen; +Cc: intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 5142 bytes --]

== Series Details ==

Series: drm: Check actual format for legacy pageflip.
URL   : https://patchwork.freedesktop.org/series/85667/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_9573 -> Patchwork_19309
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_19309 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_19309, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19309/index.html

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in Patchwork_19309:

### IGT changes ###

#### Possible regressions ####

  * igt@runner@aborted:
    - fi-tgl-u2:          NOTRUN -> [FAIL][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19309/fi-tgl-u2/igt@runner@aborted.html

  
Known issues
------------

  Here are the changes found in Patchwork_19309 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@amdgpu/amd_basic@memory-alloc:
    - fi-tgl-y:           NOTRUN -> [SKIP][2] ([fdo#109315] / [i915#2575]) +2 similar issues
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19309/fi-tgl-y/igt@amdgpu/amd_basic@memory-alloc.html

  * igt@i915_getparams_basic@basic-subslice-total:
    - fi-tgl-y:           [PASS][3] -> [DMESG-WARN][4] ([i915#402]) +1 similar issue
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9573/fi-tgl-y/igt@i915_getparams_basic@basic-subslice-total.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19309/fi-tgl-y/igt@i915_getparams_basic@basic-subslice-total.html

  * igt@i915_selftest@live@hangcheck:
    - fi-tgl-u2:          [PASS][5] -> [INCOMPLETE][6] ([i915#2840] / [i915#750])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9573/fi-tgl-u2/igt@i915_selftest@live@hangcheck.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19309/fi-tgl-u2/igt@i915_selftest@live@hangcheck.html

  * igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:
    - fi-snb-2600:        NOTRUN -> [SKIP][7] ([fdo#109271]) +30 similar issues
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19309/fi-snb-2600/igt@kms_addfb_basic@addfb25-y-tiled-small-legacy.html

  * igt@kms_chamelium@hdmi-crc-fast:
    - fi-snb-2600:        NOTRUN -> [SKIP][8] ([fdo#109271] / [fdo#111827]) +8 similar issues
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19309/fi-snb-2600/igt@kms_chamelium@hdmi-crc-fast.html

  
#### Possible fixes ####

  * igt@gem_exec_suspend@basic-s0:
    - fi-snb-2600:        [DMESG-WARN][9] ([i915#2772]) -> [PASS][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9573/fi-snb-2600/igt@gem_exec_suspend@basic-s0.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19309/fi-snb-2600/igt@gem_exec_suspend@basic-s0.html

  * igt@gem_ringfill@basic-all:
    - fi-tgl-y:           [DMESG-WARN][11] ([i915#402]) -> [PASS][12]
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9573/fi-tgl-y/igt@gem_ringfill@basic-all.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19309/fi-tgl-y/igt@gem_ringfill@basic-all.html

  * igt@kms_chamelium@dp-crc-fast:
    - fi-kbl-7500u:       [FAIL][13] ([i915#1161] / [i915#262]) -> [PASS][14]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9573/fi-kbl-7500u/igt@kms_chamelium@dp-crc-fast.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19309/fi-kbl-7500u/igt@kms_chamelium@dp-crc-fast.html

  
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#1161]: https://gitlab.freedesktop.org/drm/intel/issues/1161
  [i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
  [i915#262]: https://gitlab.freedesktop.org/drm/intel/issues/262
  [i915#2772]: https://gitlab.freedesktop.org/drm/intel/issues/2772
  [i915#2840]: https://gitlab.freedesktop.org/drm/intel/issues/2840
  [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
  [i915#750]: https://gitlab.freedesktop.org/drm/intel/issues/750


Participating hosts (43 -> 37)
------------------------------

  Missing    (6): fi-ilk-m540 fi-hsw-4200u fi-byt-j1900 fi-bsw-cyan fi-ctg-p8600 fi-bdw-samus 


Build changes
-------------

  * Linux: CI_DRM_9573 -> Patchwork_19309

  CI-20190529: 20190529
  CI_DRM_9573: cd0df21e28c36de80356344ff8683be2813c6ff2 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5953: 65c5eea699141e6f942ce0a8fc85db76ce53cd19 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_19309: 2173ccf34b3d04c7060402bc71adba9ac2d7d96c @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

2173ccf34b3d drm: Check actual format for legacy pageflip.

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19309/index.html

[-- Attachment #1.2: Type: text/html, Size: 6101 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2] drm: Check actual format for legacy pageflip.
  2021-01-10  2:11 ` [Intel-gfx] " Bas Nieuwenhuizen
  (?)
@ 2021-01-11 15:02   ` Alex Deucher
  -1 siblings, 0 replies; 16+ messages in thread
From: Alex Deucher @ 2021-01-11 15:02 UTC (permalink / raw)
  To: Bas Nieuwenhuizen
  Cc: Daniel Vetter, Intel Graphics Development, Zhan Liu,
	amd-gfx list, Kazlauskas, Nicholas, Maling list - DRI developers,
	Deucher, Alexander, Christian König

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Intel-gfx] [PATCH v2] drm: Check actual format for legacy pageflip.
@ 2021-01-11 15:02   ` Alex Deucher
  0 siblings, 0 replies; 16+ messages in thread
From: Alex Deucher @ 2021-01-11 15:02 UTC (permalink / raw)
  To: Bas Nieuwenhuizen
  Cc: Daniel Vetter, Intel Graphics Development, amd-gfx list,
	Kazlauskas, Nicholas, Maling list - DRI developers, Deucher,
	Alexander, Christian König

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2] drm: Check actual format for legacy pageflip.
@ 2021-01-11 15:02   ` Alex Deucher
  0 siblings, 0 replies; 16+ messages in thread
From: Alex Deucher @ 2021-01-11 15:02 UTC (permalink / raw)
  To: Bas Nieuwenhuizen
  Cc: Mario Kleiner, Daniel Vetter, Intel Graphics Development,
	Zhan Liu, amd-gfx list, Kazlauskas, Nicholas,
	Maling list - DRI developers, Deucher, Alexander,
	Christian König, Ville Syrjälä

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2] drm: Check actual format for legacy pageflip.
  2021-01-11 15:02   ` [Intel-gfx] " Alex Deucher
  (?)
@ 2021-01-11 16:40     ` Bas Nieuwenhuizen
  -1 siblings, 0 replies; 16+ messages in thread
From: Bas Nieuwenhuizen @ 2021-01-11 16:40 UTC (permalink / raw)
  To: Alex Deucher
  Cc: Daniel Vetter, Intel Graphics Development, Zhan Liu,
	amd-gfx list, Kazlauskas, Nicholas, Maling list - DRI developers,
	Deucher, Alexander, Christian König

On Mon, Jan 11, 2021 at 4:02 PM Alex Deucher <alexdeucher@gmail.com> wrote:
>
> 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?

I don't have commit rights so if the patch could be committed for me
that would be appreciated!
>
> 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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Intel-gfx] [PATCH v2] drm: Check actual format for legacy pageflip.
@ 2021-01-11 16:40     ` Bas Nieuwenhuizen
  0 siblings, 0 replies; 16+ messages in thread
From: Bas Nieuwenhuizen @ 2021-01-11 16:40 UTC (permalink / raw)
  To: Alex Deucher
  Cc: Daniel Vetter, Intel Graphics Development, amd-gfx list,
	Kazlauskas, Nicholas, Maling list - DRI developers, Deucher,
	Alexander, Christian König

On Mon, Jan 11, 2021 at 4:02 PM Alex Deucher <alexdeucher@gmail.com> wrote:
>
> 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?

I don't have commit rights so if the patch could be committed for me
that would be appreciated!
>
> 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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2] drm: Check actual format for legacy pageflip.
@ 2021-01-11 16:40     ` Bas Nieuwenhuizen
  0 siblings, 0 replies; 16+ messages in thread
From: Bas Nieuwenhuizen @ 2021-01-11 16:40 UTC (permalink / raw)
  To: Alex Deucher
  Cc: Mario Kleiner, Daniel Vetter, Intel Graphics Development,
	Zhan Liu, amd-gfx list, Kazlauskas, Nicholas,
	Maling list - DRI developers, Deucher, Alexander,
	Christian König, Ville Syrjälä

On Mon, Jan 11, 2021 at 4:02 PM Alex Deucher <alexdeucher@gmail.com> wrote:
>
> 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?

I don't have commit rights so if the patch could be committed for me
that would be appreciated!
>
> 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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2] drm: Check actual format for legacy pageflip.
  2021-01-11 16:40     ` [Intel-gfx] " Bas Nieuwenhuizen
  (?)
@ 2021-01-11 21:28       ` Alex Deucher
  -1 siblings, 0 replies; 16+ messages in thread
From: Alex Deucher @ 2021-01-11 21:28 UTC (permalink / raw)
  To: Bas Nieuwenhuizen
  Cc: Daniel Vetter, Intel Graphics Development, Zhan Liu,
	amd-gfx list, Kazlauskas, Nicholas, Maling list - DRI developers,
	Deucher, Alexander, Christian König

On Mon, Jan 11, 2021 at 11:39 AM Bas Nieuwenhuizen
<bas@basnieuwenhuizen.nl> wrote:
>
> On Mon, Jan 11, 2021 at 4:02 PM Alex Deucher <alexdeucher@gmail.com> wrote:
> >
> > 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?
>
> I don't have commit rights so if the patch could be committed for me
> that would be appreciated!

Pushed to drm-misc-fixes.  Thanks!

If you want access to drm-misc, I don't see any reason you shouldn't have it.

Alex


> >
> > 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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Intel-gfx] [PATCH v2] drm: Check actual format for legacy pageflip.
@ 2021-01-11 21:28       ` Alex Deucher
  0 siblings, 0 replies; 16+ messages in thread
From: Alex Deucher @ 2021-01-11 21:28 UTC (permalink / raw)
  To: Bas Nieuwenhuizen
  Cc: Daniel Vetter, Intel Graphics Development, amd-gfx list,
	Kazlauskas, Nicholas, Maling list - DRI developers, Deucher,
	Alexander, Christian König

On Mon, Jan 11, 2021 at 11:39 AM Bas Nieuwenhuizen
<bas@basnieuwenhuizen.nl> wrote:
>
> On Mon, Jan 11, 2021 at 4:02 PM Alex Deucher <alexdeucher@gmail.com> wrote:
> >
> > 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?
>
> I don't have commit rights so if the patch could be committed for me
> that would be appreciated!

Pushed to drm-misc-fixes.  Thanks!

If you want access to drm-misc, I don't see any reason you shouldn't have it.

Alex


> >
> > 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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2] drm: Check actual format for legacy pageflip.
@ 2021-01-11 21:28       ` Alex Deucher
  0 siblings, 0 replies; 16+ messages in thread
From: Alex Deucher @ 2021-01-11 21:28 UTC (permalink / raw)
  To: Bas Nieuwenhuizen
  Cc: Mario Kleiner, Daniel Vetter, Intel Graphics Development,
	Zhan Liu, amd-gfx list, Kazlauskas, Nicholas,
	Maling list - DRI developers, Deucher, Alexander,
	Christian König, Ville Syrjälä

On Mon, Jan 11, 2021 at 11:39 AM Bas Nieuwenhuizen
<bas@basnieuwenhuizen.nl> wrote:
>
> On Mon, Jan 11, 2021 at 4:02 PM Alex Deucher <alexdeucher@gmail.com> wrote:
> >
> > 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?
>
> I don't have commit rights so if the patch could be committed for me
> that would be appreciated!

Pushed to drm-misc-fixes.  Thanks!

If you want access to drm-misc, I don't see any reason you shouldn't have it.

Alex


> >
> > 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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2] drm: Check actual format for legacy pageflip.
  2021-01-11 21:28       ` [Intel-gfx] " Alex Deucher
  (?)
@ 2021-01-12  9:18         ` Daniel Vetter
  -1 siblings, 0 replies; 16+ messages in thread
From: Daniel Vetter @ 2021-01-12  9:18 UTC (permalink / raw)
  To: Alex Deucher
  Cc: Daniel Vetter, Intel Graphics Development, Zhan Liu,
	Maling list - DRI developers, Kazlauskas, Nicholas, amd-gfx list,
	Deucher, Alexander, Christian König

On Mon, Jan 11, 2021 at 04:28:31PM -0500, Alex Deucher wrote:
> On Mon, Jan 11, 2021 at 11:39 AM Bas Nieuwenhuizen
> <bas@basnieuwenhuizen.nl> wrote:
> >
> > On Mon, Jan 11, 2021 at 4:02 PM Alex Deucher <alexdeucher@gmail.com> wrote:
> > >
> > > 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?
> >
> > I don't have commit rights so if the patch could be committed for me
> > that would be appreciated!
> 
> Pushed to drm-misc-fixes.  Thanks!
> 
> If you want access to drm-misc, I don't see any reason you shouldn't have it.

There's some old-school bash tooling involved since we're (not yet, I can
hope) doing gitlab MR:

https://drm.pages.freedesktop.org/maintainer-tools/getting-started.html

Otherwise makes sense imo.
-Daniel

> 
> Alex
> 
> 
> > >
> > > 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

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Intel-gfx] [PATCH v2] drm: Check actual format for legacy pageflip.
@ 2021-01-12  9:18         ` Daniel Vetter
  0 siblings, 0 replies; 16+ messages in thread
From: Daniel Vetter @ 2021-01-12  9:18 UTC (permalink / raw)
  To: Alex Deucher
  Cc: Daniel Vetter, Intel Graphics Development,
	Maling list - DRI developers, Kazlauskas, Nicholas, amd-gfx list,
	Bas Nieuwenhuizen, Deucher, Alexander, Christian König

On Mon, Jan 11, 2021 at 04:28:31PM -0500, Alex Deucher wrote:
> On Mon, Jan 11, 2021 at 11:39 AM Bas Nieuwenhuizen
> <bas@basnieuwenhuizen.nl> wrote:
> >
> > On Mon, Jan 11, 2021 at 4:02 PM Alex Deucher <alexdeucher@gmail.com> wrote:
> > >
> > > 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?
> >
> > I don't have commit rights so if the patch could be committed for me
> > that would be appreciated!
> 
> Pushed to drm-misc-fixes.  Thanks!
> 
> If you want access to drm-misc, I don't see any reason you shouldn't have it.

There's some old-school bash tooling involved since we're (not yet, I can
hope) doing gitlab MR:

https://drm.pages.freedesktop.org/maintainer-tools/getting-started.html

Otherwise makes sense imo.
-Daniel

> 
> Alex
> 
> 
> > >
> > > 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

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2] drm: Check actual format for legacy pageflip.
@ 2021-01-12  9:18         ` Daniel Vetter
  0 siblings, 0 replies; 16+ messages in thread
From: Daniel Vetter @ 2021-01-12  9:18 UTC (permalink / raw)
  To: Alex Deucher
  Cc: Mario Kleiner, Daniel Vetter, Intel Graphics Development,
	Zhan Liu, Maling list - DRI developers, Kazlauskas, Nicholas,
	amd-gfx list, Bas Nieuwenhuizen, Deucher, Alexander,
	Christian König, Ville Syrjälä

On Mon, Jan 11, 2021 at 04:28:31PM -0500, Alex Deucher wrote:
> On Mon, Jan 11, 2021 at 11:39 AM Bas Nieuwenhuizen
> <bas@basnieuwenhuizen.nl> wrote:
> >
> > On Mon, Jan 11, 2021 at 4:02 PM Alex Deucher <alexdeucher@gmail.com> wrote:
> > >
> > > 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?
> >
> > I don't have commit rights so if the patch could be committed for me
> > that would be appreciated!
> 
> Pushed to drm-misc-fixes.  Thanks!
> 
> If you want access to drm-misc, I don't see any reason you shouldn't have it.

There's some old-school bash tooling involved since we're (not yet, I can
hope) doing gitlab MR:

https://drm.pages.freedesktop.org/maintainer-tools/getting-started.html

Otherwise makes sense imo.
-Daniel

> 
> Alex
> 
> 
> > >
> > > 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

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-01-12  9:18 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH v2] " Alex Deucher
2021-01-11 15:02   ` 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

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.