All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] Add missing format_mod_supported functions
@ 2021-12-22  9:05 ` José Expósito
  0 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-22  9:05 UTC (permalink / raw)
  To: contact
  Cc: dmitry.baryshkov, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, jani.nikula, joonas.lahtinen, rodrigo.vivi,
	marex, stefan, shawnguo, s.hauer, kernel, festevam, linux-imx,
	yannick.fertre, philippe.cornu, benjamin.gaignard,
	mcoquelin.stm32, alexandre.torgue, dri-devel, linux-kernel,
	intel-gfx, linux-arm-kernel, linux-stm32,
	José Expósito

Hi all,

This patchset supersedes [1]. Now the title is a bit misleading, but
I left it this way to (hopefully) facilitate the maintainers' work.

A little context: Originally, I sent a patch adding modifiers to the
VKMS driver and Simon Ser kindly reviewed it and pointed out that
"format_mod_supported" was missing [2].
I asked if the docs were incorrect or if it was a bug in
"create_in_format_blob".

In the first version of this series, Simon Ser and Dmitry Baryshkov
agreed [1] that the code should behave as documented and
"create_in_format_blob" should be changed.

This second version implements the required changes and drops the
"format_mod_supported" in the drivers that can use the default
implementation.

Jose

[1] https://lore.kernel.org/dri-devel/CAA8EJpqJ-tWmb5Ba6XSK59toCtLb3nRRmVH8da4Ud_rrRYytmw@mail.gmail.com/T/
[2] https://lore.kernel.org/dri-devel/20211216170532.GA16349@elementary/T/

José Expósito (6):
  drm/plane: Make format_mod_supported truly optional
  drm/plane: Fix typo in format_mod_supported documentation
  drm/simple-kms: Drop format_mod_supported function
  drm/i915/display: Drop format_mod_supported function
  drm: mxsfb: Drop format_mod_supported function
  drm/stm: ltdc: Drop format_mod_supported function

 drivers/gpu/drm/drm_plane.c                 |  8 ++------
 drivers/gpu/drm/drm_simple_kms_helper.c     |  8 --------
 drivers/gpu/drm/i915/display/intel_cursor.c |  8 --------
 drivers/gpu/drm/mxsfb/mxsfb_kms.c           |  8 --------
 drivers/gpu/drm/stm/ltdc.c                  | 11 -----------
 include/drm/drm_plane.h                     |  2 +-
 6 files changed, 3 insertions(+), 42 deletions(-)

-- 
2.25.1


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

* [PATCH v2 0/6] Add missing format_mod_supported functions
@ 2021-12-22  9:05 ` José Expósito
  0 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-22  9:05 UTC (permalink / raw)
  To: contact
  Cc: airlied, alexandre.torgue, benjamin.gaignard, linux-stm32, marex,
	linux-imx, intel-gfx, tzimmermann, s.hauer, rodrigo.vivi, kernel,
	linux-arm-kernel, dri-devel, yannick.fertre, linux-kernel,
	philippe.cornu, mcoquelin.stm32, dmitry.baryshkov,
	José Expósito, shawnguo

Hi all,

This patchset supersedes [1]. Now the title is a bit misleading, but
I left it this way to (hopefully) facilitate the maintainers' work.

A little context: Originally, I sent a patch adding modifiers to the
VKMS driver and Simon Ser kindly reviewed it and pointed out that
"format_mod_supported" was missing [2].
I asked if the docs were incorrect or if it was a bug in
"create_in_format_blob".

In the first version of this series, Simon Ser and Dmitry Baryshkov
agreed [1] that the code should behave as documented and
"create_in_format_blob" should be changed.

This second version implements the required changes and drops the
"format_mod_supported" in the drivers that can use the default
implementation.

Jose

[1] https://lore.kernel.org/dri-devel/CAA8EJpqJ-tWmb5Ba6XSK59toCtLb3nRRmVH8da4Ud_rrRYytmw@mail.gmail.com/T/
[2] https://lore.kernel.org/dri-devel/20211216170532.GA16349@elementary/T/

José Expósito (6):
  drm/plane: Make format_mod_supported truly optional
  drm/plane: Fix typo in format_mod_supported documentation
  drm/simple-kms: Drop format_mod_supported function
  drm/i915/display: Drop format_mod_supported function
  drm: mxsfb: Drop format_mod_supported function
  drm/stm: ltdc: Drop format_mod_supported function

 drivers/gpu/drm/drm_plane.c                 |  8 ++------
 drivers/gpu/drm/drm_simple_kms_helper.c     |  8 --------
 drivers/gpu/drm/i915/display/intel_cursor.c |  8 --------
 drivers/gpu/drm/mxsfb/mxsfb_kms.c           |  8 --------
 drivers/gpu/drm/stm/ltdc.c                  | 11 -----------
 include/drm/drm_plane.h                     |  2 +-
 6 files changed, 3 insertions(+), 42 deletions(-)

-- 
2.25.1


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

* [PATCH v2 0/6] Add missing format_mod_supported functions
@ 2021-12-22  9:05 ` José Expósito
  0 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-22  9:05 UTC (permalink / raw)
  To: contact
  Cc: dmitry.baryshkov, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, jani.nikula, joonas.lahtinen, rodrigo.vivi,
	marex, stefan, shawnguo, s.hauer, kernel, festevam, linux-imx,
	yannick.fertre, philippe.cornu, benjamin.gaignard,
	mcoquelin.stm32, alexandre.torgue, dri-devel, linux-kernel,
	intel-gfx, linux-arm-kernel, linux-stm32,
	José Expósito

Hi all,

This patchset supersedes [1]. Now the title is a bit misleading, but
I left it this way to (hopefully) facilitate the maintainers' work.

A little context: Originally, I sent a patch adding modifiers to the
VKMS driver and Simon Ser kindly reviewed it and pointed out that
"format_mod_supported" was missing [2].
I asked if the docs were incorrect or if it was a bug in
"create_in_format_blob".

In the first version of this series, Simon Ser and Dmitry Baryshkov
agreed [1] that the code should behave as documented and
"create_in_format_blob" should be changed.

This second version implements the required changes and drops the
"format_mod_supported" in the drivers that can use the default
implementation.

Jose

[1] https://lore.kernel.org/dri-devel/CAA8EJpqJ-tWmb5Ba6XSK59toCtLb3nRRmVH8da4Ud_rrRYytmw@mail.gmail.com/T/
[2] https://lore.kernel.org/dri-devel/20211216170532.GA16349@elementary/T/

José Expósito (6):
  drm/plane: Make format_mod_supported truly optional
  drm/plane: Fix typo in format_mod_supported documentation
  drm/simple-kms: Drop format_mod_supported function
  drm/i915/display: Drop format_mod_supported function
  drm: mxsfb: Drop format_mod_supported function
  drm/stm: ltdc: Drop format_mod_supported function

 drivers/gpu/drm/drm_plane.c                 |  8 ++------
 drivers/gpu/drm/drm_simple_kms_helper.c     |  8 --------
 drivers/gpu/drm/i915/display/intel_cursor.c |  8 --------
 drivers/gpu/drm/mxsfb/mxsfb_kms.c           |  8 --------
 drivers/gpu/drm/stm/ltdc.c                  | 11 -----------
 include/drm/drm_plane.h                     |  2 +-
 6 files changed, 3 insertions(+), 42 deletions(-)

-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [Intel-gfx] [PATCH v2 0/6] Add missing format_mod_supported functions
@ 2021-12-22  9:05 ` José Expósito
  0 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-22  9:05 UTC (permalink / raw)
  To: contact
  Cc: airlied, alexandre.torgue, stefan, benjamin.gaignard, festevam,
	linux-stm32, marex, linux-imx, intel-gfx, tzimmermann, s.hauer,
	mripard, kernel, linux-arm-kernel, dri-devel, yannick.fertre,
	linux-kernel, philippe.cornu, mcoquelin.stm32, dmitry.baryshkov,
	José Expósito, shawnguo

Hi all,

This patchset supersedes [1]. Now the title is a bit misleading, but
I left it this way to (hopefully) facilitate the maintainers' work.

A little context: Originally, I sent a patch adding modifiers to the
VKMS driver and Simon Ser kindly reviewed it and pointed out that
"format_mod_supported" was missing [2].
I asked if the docs were incorrect or if it was a bug in
"create_in_format_blob".

In the first version of this series, Simon Ser and Dmitry Baryshkov
agreed [1] that the code should behave as documented and
"create_in_format_blob" should be changed.

This second version implements the required changes and drops the
"format_mod_supported" in the drivers that can use the default
implementation.

Jose

[1] https://lore.kernel.org/dri-devel/CAA8EJpqJ-tWmb5Ba6XSK59toCtLb3nRRmVH8da4Ud_rrRYytmw@mail.gmail.com/T/
[2] https://lore.kernel.org/dri-devel/20211216170532.GA16349@elementary/T/

José Expósito (6):
  drm/plane: Make format_mod_supported truly optional
  drm/plane: Fix typo in format_mod_supported documentation
  drm/simple-kms: Drop format_mod_supported function
  drm/i915/display: Drop format_mod_supported function
  drm: mxsfb: Drop format_mod_supported function
  drm/stm: ltdc: Drop format_mod_supported function

 drivers/gpu/drm/drm_plane.c                 |  8 ++------
 drivers/gpu/drm/drm_simple_kms_helper.c     |  8 --------
 drivers/gpu/drm/i915/display/intel_cursor.c |  8 --------
 drivers/gpu/drm/mxsfb/mxsfb_kms.c           |  8 --------
 drivers/gpu/drm/stm/ltdc.c                  | 11 -----------
 include/drm/drm_plane.h                     |  2 +-
 6 files changed, 3 insertions(+), 42 deletions(-)

-- 
2.25.1


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

* [PATCH v2 1/6] drm/plane: Make format_mod_supported truly optional
  2021-12-22  9:05 ` José Expósito
  (?)
  (?)
@ 2021-12-22  9:05   ` José Expósito
  -1 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-22  9:05 UTC (permalink / raw)
  To: contact
  Cc: dmitry.baryshkov, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, jani.nikula, joonas.lahtinen, rodrigo.vivi,
	marex, stefan, shawnguo, s.hauer, kernel, festevam, linux-imx,
	yannick.fertre, philippe.cornu, benjamin.gaignard,
	mcoquelin.stm32, alexandre.torgue, dri-devel, linux-kernel,
	intel-gfx, linux-arm-kernel, linux-stm32,
	José Expósito

The documentation for "drm_plane_funcs.format_mod_supported" reads:

  This *optional* hook is used for the DRM to determine if the given
  format/modifier combination is valid for the plane. This allows the
  DRM to generate the correct format bitmask (which formats apply to
  which modifier), and to validate modifiers at atomic_check time.

  *If not present*, then any modifier in the plane's modifier
  list is allowed with any of the plane's formats.

However, where the function is not present, an invalid IN_FORMATS blob
property with modifiers but no formats is exposed to user-space.

This breaks the latest Weston [1]. For testing purposes, I extracted the
affected code to a standalone program [2].

Make "create_in_format_blob" behave as documented.

[1] https://gitlab.freedesktop.org/wayland/weston/-/blob/9.0/libweston/backend-drm/kms.c#L431
[2] https://github.com/JoseExposito/drm-sandbox/blob/main/in_formats.c

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 drivers/gpu/drm/drm_plane.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
index 82afb854141b..c1186b7215ee 100644
--- a/drivers/gpu/drm/drm_plane.c
+++ b/drivers/gpu/drm/drm_plane.c
@@ -202,17 +202,13 @@ static int create_in_format_blob(struct drm_device *dev, struct drm_plane *plane
 
 	memcpy(formats_ptr(blob_data), plane->format_types, formats_size);
 
-	/* If we can't determine support, just bail */
-	if (!plane->funcs->format_mod_supported)
-		goto done;
-
 	mod = modifiers_ptr(blob_data);
 	for (i = 0; i < plane->modifier_count; i++) {
 		for (j = 0; j < plane->format_count; j++) {
-			if (plane->funcs->format_mod_supported(plane,
+			if (!plane->funcs->format_mod_supported ||
+			    plane->funcs->format_mod_supported(plane,
 							       plane->format_types[j],
 							       plane->modifiers[i])) {
-
 				mod->formats |= 1ULL << j;
 			}
 		}
-- 
2.25.1


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

* [PATCH v2 1/6] drm/plane: Make format_mod_supported truly optional
@ 2021-12-22  9:05   ` José Expósito
  0 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-22  9:05 UTC (permalink / raw)
  To: contact
  Cc: airlied, alexandre.torgue, benjamin.gaignard, linux-stm32, marex,
	linux-imx, intel-gfx, tzimmermann, s.hauer, rodrigo.vivi, kernel,
	linux-arm-kernel, dri-devel, yannick.fertre, linux-kernel,
	philippe.cornu, mcoquelin.stm32, dmitry.baryshkov,
	José Expósito, shawnguo

The documentation for "drm_plane_funcs.format_mod_supported" reads:

  This *optional* hook is used for the DRM to determine if the given
  format/modifier combination is valid for the plane. This allows the
  DRM to generate the correct format bitmask (which formats apply to
  which modifier), and to validate modifiers at atomic_check time.

  *If not present*, then any modifier in the plane's modifier
  list is allowed with any of the plane's formats.

However, where the function is not present, an invalid IN_FORMATS blob
property with modifiers but no formats is exposed to user-space.

This breaks the latest Weston [1]. For testing purposes, I extracted the
affected code to a standalone program [2].

Make "create_in_format_blob" behave as documented.

[1] https://gitlab.freedesktop.org/wayland/weston/-/blob/9.0/libweston/backend-drm/kms.c#L431
[2] https://github.com/JoseExposito/drm-sandbox/blob/main/in_formats.c

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 drivers/gpu/drm/drm_plane.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
index 82afb854141b..c1186b7215ee 100644
--- a/drivers/gpu/drm/drm_plane.c
+++ b/drivers/gpu/drm/drm_plane.c
@@ -202,17 +202,13 @@ static int create_in_format_blob(struct drm_device *dev, struct drm_plane *plane
 
 	memcpy(formats_ptr(blob_data), plane->format_types, formats_size);
 
-	/* If we can't determine support, just bail */
-	if (!plane->funcs->format_mod_supported)
-		goto done;
-
 	mod = modifiers_ptr(blob_data);
 	for (i = 0; i < plane->modifier_count; i++) {
 		for (j = 0; j < plane->format_count; j++) {
-			if (plane->funcs->format_mod_supported(plane,
+			if (!plane->funcs->format_mod_supported ||
+			    plane->funcs->format_mod_supported(plane,
 							       plane->format_types[j],
 							       plane->modifiers[i])) {
-
 				mod->formats |= 1ULL << j;
 			}
 		}
-- 
2.25.1


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

* [PATCH v2 1/6] drm/plane: Make format_mod_supported truly optional
@ 2021-12-22  9:05   ` José Expósito
  0 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-22  9:05 UTC (permalink / raw)
  To: contact
  Cc: dmitry.baryshkov, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, jani.nikula, joonas.lahtinen, rodrigo.vivi,
	marex, stefan, shawnguo, s.hauer, kernel, festevam, linux-imx,
	yannick.fertre, philippe.cornu, benjamin.gaignard,
	mcoquelin.stm32, alexandre.torgue, dri-devel, linux-kernel,
	intel-gfx, linux-arm-kernel, linux-stm32,
	José Expósito

The documentation for "drm_plane_funcs.format_mod_supported" reads:

  This *optional* hook is used for the DRM to determine if the given
  format/modifier combination is valid for the plane. This allows the
  DRM to generate the correct format bitmask (which formats apply to
  which modifier), and to validate modifiers at atomic_check time.

  *If not present*, then any modifier in the plane's modifier
  list is allowed with any of the plane's formats.

However, where the function is not present, an invalid IN_FORMATS blob
property with modifiers but no formats is exposed to user-space.

This breaks the latest Weston [1]. For testing purposes, I extracted the
affected code to a standalone program [2].

Make "create_in_format_blob" behave as documented.

[1] https://gitlab.freedesktop.org/wayland/weston/-/blob/9.0/libweston/backend-drm/kms.c#L431
[2] https://github.com/JoseExposito/drm-sandbox/blob/main/in_formats.c

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 drivers/gpu/drm/drm_plane.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
index 82afb854141b..c1186b7215ee 100644
--- a/drivers/gpu/drm/drm_plane.c
+++ b/drivers/gpu/drm/drm_plane.c
@@ -202,17 +202,13 @@ static int create_in_format_blob(struct drm_device *dev, struct drm_plane *plane
 
 	memcpy(formats_ptr(blob_data), plane->format_types, formats_size);
 
-	/* If we can't determine support, just bail */
-	if (!plane->funcs->format_mod_supported)
-		goto done;
-
 	mod = modifiers_ptr(blob_data);
 	for (i = 0; i < plane->modifier_count; i++) {
 		for (j = 0; j < plane->format_count; j++) {
-			if (plane->funcs->format_mod_supported(plane,
+			if (!plane->funcs->format_mod_supported ||
+			    plane->funcs->format_mod_supported(plane,
 							       plane->format_types[j],
 							       plane->modifiers[i])) {
-
 				mod->formats |= 1ULL << j;
 			}
 		}
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [Intel-gfx] [PATCH v2 1/6] drm/plane: Make format_mod_supported truly optional
@ 2021-12-22  9:05   ` José Expósito
  0 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-22  9:05 UTC (permalink / raw)
  To: contact
  Cc: airlied, alexandre.torgue, stefan, benjamin.gaignard, festevam,
	linux-stm32, marex, linux-imx, intel-gfx, tzimmermann, s.hauer,
	mripard, kernel, linux-arm-kernel, dri-devel, yannick.fertre,
	linux-kernel, philippe.cornu, mcoquelin.stm32, dmitry.baryshkov,
	José Expósito, shawnguo

The documentation for "drm_plane_funcs.format_mod_supported" reads:

  This *optional* hook is used for the DRM to determine if the given
  format/modifier combination is valid for the plane. This allows the
  DRM to generate the correct format bitmask (which formats apply to
  which modifier), and to validate modifiers at atomic_check time.

  *If not present*, then any modifier in the plane's modifier
  list is allowed with any of the plane's formats.

However, where the function is not present, an invalid IN_FORMATS blob
property with modifiers but no formats is exposed to user-space.

This breaks the latest Weston [1]. For testing purposes, I extracted the
affected code to a standalone program [2].

Make "create_in_format_blob" behave as documented.

[1] https://gitlab.freedesktop.org/wayland/weston/-/blob/9.0/libweston/backend-drm/kms.c#L431
[2] https://github.com/JoseExposito/drm-sandbox/blob/main/in_formats.c

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 drivers/gpu/drm/drm_plane.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
index 82afb854141b..c1186b7215ee 100644
--- a/drivers/gpu/drm/drm_plane.c
+++ b/drivers/gpu/drm/drm_plane.c
@@ -202,17 +202,13 @@ static int create_in_format_blob(struct drm_device *dev, struct drm_plane *plane
 
 	memcpy(formats_ptr(blob_data), plane->format_types, formats_size);
 
-	/* If we can't determine support, just bail */
-	if (!plane->funcs->format_mod_supported)
-		goto done;
-
 	mod = modifiers_ptr(blob_data);
 	for (i = 0; i < plane->modifier_count; i++) {
 		for (j = 0; j < plane->format_count; j++) {
-			if (plane->funcs->format_mod_supported(plane,
+			if (!plane->funcs->format_mod_supported ||
+			    plane->funcs->format_mod_supported(plane,
 							       plane->format_types[j],
 							       plane->modifiers[i])) {
-
 				mod->formats |= 1ULL << j;
 			}
 		}
-- 
2.25.1


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

* [PATCH v2 2/6] drm/plane: Fix typo in format_mod_supported documentation
  2021-12-22  9:05 ` José Expósito
  (?)
  (?)
@ 2021-12-22  9:05   ` José Expósito
  -1 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-22  9:05 UTC (permalink / raw)
  To: contact
  Cc: dmitry.baryshkov, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, jani.nikula, joonas.lahtinen, rodrigo.vivi,
	marex, stefan, shawnguo, s.hauer, kernel, festevam, linux-imx,
	yannick.fertre, philippe.cornu, benjamin.gaignard,
	mcoquelin.stm32, alexandre.torgue, dri-devel, linux-kernel,
	intel-gfx, linux-arm-kernel, linux-stm32,
	José Expósito

Fix minor typo: "valdiate" -> "validate".

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 include/drm/drm_plane.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h
index 0c1102dc4d88..06759badf99f 100644
--- a/include/drm/drm_plane.h
+++ b/include/drm/drm_plane.h
@@ -516,7 +516,7 @@ struct drm_plane_funcs {
 	 * This optional hook is used for the DRM to determine if the given
 	 * format/modifier combination is valid for the plane. This allows the
 	 * DRM to generate the correct format bitmask (which formats apply to
-	 * which modifier), and to valdiate modifiers at atomic_check time.
+	 * which modifier), and to validate modifiers at atomic_check time.
 	 *
 	 * If not present, then any modifier in the plane's modifier
 	 * list is allowed with any of the plane's formats.
-- 
2.25.1


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

* [PATCH v2 2/6] drm/plane: Fix typo in format_mod_supported documentation
@ 2021-12-22  9:05   ` José Expósito
  0 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-22  9:05 UTC (permalink / raw)
  To: contact
  Cc: airlied, alexandre.torgue, benjamin.gaignard, linux-stm32, marex,
	linux-imx, intel-gfx, tzimmermann, s.hauer, rodrigo.vivi, kernel,
	linux-arm-kernel, dri-devel, yannick.fertre, linux-kernel,
	philippe.cornu, mcoquelin.stm32, dmitry.baryshkov,
	José Expósito, shawnguo

Fix minor typo: "valdiate" -> "validate".

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 include/drm/drm_plane.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h
index 0c1102dc4d88..06759badf99f 100644
--- a/include/drm/drm_plane.h
+++ b/include/drm/drm_plane.h
@@ -516,7 +516,7 @@ struct drm_plane_funcs {
 	 * This optional hook is used for the DRM to determine if the given
 	 * format/modifier combination is valid for the plane. This allows the
 	 * DRM to generate the correct format bitmask (which formats apply to
-	 * which modifier), and to valdiate modifiers at atomic_check time.
+	 * which modifier), and to validate modifiers at atomic_check time.
 	 *
 	 * If not present, then any modifier in the plane's modifier
 	 * list is allowed with any of the plane's formats.
-- 
2.25.1


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

* [PATCH v2 2/6] drm/plane: Fix typo in format_mod_supported documentation
@ 2021-12-22  9:05   ` José Expósito
  0 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-22  9:05 UTC (permalink / raw)
  To: contact
  Cc: dmitry.baryshkov, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, jani.nikula, joonas.lahtinen, rodrigo.vivi,
	marex, stefan, shawnguo, s.hauer, kernel, festevam, linux-imx,
	yannick.fertre, philippe.cornu, benjamin.gaignard,
	mcoquelin.stm32, alexandre.torgue, dri-devel, linux-kernel,
	intel-gfx, linux-arm-kernel, linux-stm32,
	José Expósito

Fix minor typo: "valdiate" -> "validate".

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 include/drm/drm_plane.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h
index 0c1102dc4d88..06759badf99f 100644
--- a/include/drm/drm_plane.h
+++ b/include/drm/drm_plane.h
@@ -516,7 +516,7 @@ struct drm_plane_funcs {
 	 * This optional hook is used for the DRM to determine if the given
 	 * format/modifier combination is valid for the plane. This allows the
 	 * DRM to generate the correct format bitmask (which formats apply to
-	 * which modifier), and to valdiate modifiers at atomic_check time.
+	 * which modifier), and to validate modifiers at atomic_check time.
 	 *
 	 * If not present, then any modifier in the plane's modifier
 	 * list is allowed with any of the plane's formats.
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [Intel-gfx] [PATCH v2 2/6] drm/plane: Fix typo in format_mod_supported documentation
@ 2021-12-22  9:05   ` José Expósito
  0 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-22  9:05 UTC (permalink / raw)
  To: contact
  Cc: airlied, alexandre.torgue, stefan, benjamin.gaignard, festevam,
	linux-stm32, marex, linux-imx, intel-gfx, tzimmermann, s.hauer,
	mripard, kernel, linux-arm-kernel, dri-devel, yannick.fertre,
	linux-kernel, philippe.cornu, mcoquelin.stm32, dmitry.baryshkov,
	José Expósito, shawnguo

Fix minor typo: "valdiate" -> "validate".

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 include/drm/drm_plane.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h
index 0c1102dc4d88..06759badf99f 100644
--- a/include/drm/drm_plane.h
+++ b/include/drm/drm_plane.h
@@ -516,7 +516,7 @@ struct drm_plane_funcs {
 	 * This optional hook is used for the DRM to determine if the given
 	 * format/modifier combination is valid for the plane. This allows the
 	 * DRM to generate the correct format bitmask (which formats apply to
-	 * which modifier), and to valdiate modifiers at atomic_check time.
+	 * which modifier), and to validate modifiers at atomic_check time.
 	 *
 	 * If not present, then any modifier in the plane's modifier
 	 * list is allowed with any of the plane's formats.
-- 
2.25.1


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

* [PATCH v2 3/6] drm/simple-kms: Drop format_mod_supported function
  2021-12-22  9:05 ` José Expósito
  (?)
  (?)
@ 2021-12-22  9:05   ` José Expósito
  -1 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-22  9:05 UTC (permalink / raw)
  To: contact
  Cc: dmitry.baryshkov, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, jani.nikula, joonas.lahtinen, rodrigo.vivi,
	marex, stefan, shawnguo, s.hauer, kernel, festevam, linux-imx,
	yannick.fertre, philippe.cornu, benjamin.gaignard,
	mcoquelin.stm32, alexandre.torgue, dri-devel, linux-kernel,
	intel-gfx, linux-arm-kernel, linux-stm32,
	José Expósito

The "drm_plane_funcs.format_mod_supported" can be removed in favor of
the default implementation.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 drivers/gpu/drm/drm_simple_kms_helper.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/gpu/drm/drm_simple_kms_helper.c b/drivers/gpu/drm/drm_simple_kms_helper.c
index 72989ed1baba..2c6aa67c6956 100644
--- a/drivers/gpu/drm/drm_simple_kms_helper.c
+++ b/drivers/gpu/drm/drm_simple_kms_helper.c
@@ -284,13 +284,6 @@ static void drm_simple_kms_plane_cleanup_fb(struct drm_plane *plane,
 	pipe->funcs->cleanup_fb(pipe, state);
 }
 
-static bool drm_simple_kms_format_mod_supported(struct drm_plane *plane,
-						uint32_t format,
-						uint64_t modifier)
-{
-	return modifier == DRM_FORMAT_MOD_LINEAR;
-}
-
 static const struct drm_plane_helper_funcs drm_simple_kms_plane_helper_funcs = {
 	.prepare_fb = drm_simple_kms_plane_prepare_fb,
 	.cleanup_fb = drm_simple_kms_plane_cleanup_fb,
@@ -339,7 +332,6 @@ static const struct drm_plane_funcs drm_simple_kms_plane_funcs = {
 	.reset			= drm_simple_kms_plane_reset,
 	.atomic_duplicate_state	= drm_simple_kms_plane_duplicate_state,
 	.atomic_destroy_state	= drm_simple_kms_plane_destroy_state,
-	.format_mod_supported   = drm_simple_kms_format_mod_supported,
 };
 
 /**
-- 
2.25.1


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

* [PATCH v2 3/6] drm/simple-kms: Drop format_mod_supported function
@ 2021-12-22  9:05   ` José Expósito
  0 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-22  9:05 UTC (permalink / raw)
  To: contact
  Cc: airlied, alexandre.torgue, benjamin.gaignard, linux-stm32, marex,
	linux-imx, intel-gfx, tzimmermann, s.hauer, rodrigo.vivi, kernel,
	linux-arm-kernel, dri-devel, yannick.fertre, linux-kernel,
	philippe.cornu, mcoquelin.stm32, dmitry.baryshkov,
	José Expósito, shawnguo

The "drm_plane_funcs.format_mod_supported" can be removed in favor of
the default implementation.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 drivers/gpu/drm/drm_simple_kms_helper.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/gpu/drm/drm_simple_kms_helper.c b/drivers/gpu/drm/drm_simple_kms_helper.c
index 72989ed1baba..2c6aa67c6956 100644
--- a/drivers/gpu/drm/drm_simple_kms_helper.c
+++ b/drivers/gpu/drm/drm_simple_kms_helper.c
@@ -284,13 +284,6 @@ static void drm_simple_kms_plane_cleanup_fb(struct drm_plane *plane,
 	pipe->funcs->cleanup_fb(pipe, state);
 }
 
-static bool drm_simple_kms_format_mod_supported(struct drm_plane *plane,
-						uint32_t format,
-						uint64_t modifier)
-{
-	return modifier == DRM_FORMAT_MOD_LINEAR;
-}
-
 static const struct drm_plane_helper_funcs drm_simple_kms_plane_helper_funcs = {
 	.prepare_fb = drm_simple_kms_plane_prepare_fb,
 	.cleanup_fb = drm_simple_kms_plane_cleanup_fb,
@@ -339,7 +332,6 @@ static const struct drm_plane_funcs drm_simple_kms_plane_funcs = {
 	.reset			= drm_simple_kms_plane_reset,
 	.atomic_duplicate_state	= drm_simple_kms_plane_duplicate_state,
 	.atomic_destroy_state	= drm_simple_kms_plane_destroy_state,
-	.format_mod_supported   = drm_simple_kms_format_mod_supported,
 };
 
 /**
-- 
2.25.1


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

* [PATCH v2 3/6] drm/simple-kms: Drop format_mod_supported function
@ 2021-12-22  9:05   ` José Expósito
  0 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-22  9:05 UTC (permalink / raw)
  To: contact
  Cc: dmitry.baryshkov, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, jani.nikula, joonas.lahtinen, rodrigo.vivi,
	marex, stefan, shawnguo, s.hauer, kernel, festevam, linux-imx,
	yannick.fertre, philippe.cornu, benjamin.gaignard,
	mcoquelin.stm32, alexandre.torgue, dri-devel, linux-kernel,
	intel-gfx, linux-arm-kernel, linux-stm32,
	José Expósito

The "drm_plane_funcs.format_mod_supported" can be removed in favor of
the default implementation.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 drivers/gpu/drm/drm_simple_kms_helper.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/gpu/drm/drm_simple_kms_helper.c b/drivers/gpu/drm/drm_simple_kms_helper.c
index 72989ed1baba..2c6aa67c6956 100644
--- a/drivers/gpu/drm/drm_simple_kms_helper.c
+++ b/drivers/gpu/drm/drm_simple_kms_helper.c
@@ -284,13 +284,6 @@ static void drm_simple_kms_plane_cleanup_fb(struct drm_plane *plane,
 	pipe->funcs->cleanup_fb(pipe, state);
 }
 
-static bool drm_simple_kms_format_mod_supported(struct drm_plane *plane,
-						uint32_t format,
-						uint64_t modifier)
-{
-	return modifier == DRM_FORMAT_MOD_LINEAR;
-}
-
 static const struct drm_plane_helper_funcs drm_simple_kms_plane_helper_funcs = {
 	.prepare_fb = drm_simple_kms_plane_prepare_fb,
 	.cleanup_fb = drm_simple_kms_plane_cleanup_fb,
@@ -339,7 +332,6 @@ static const struct drm_plane_funcs drm_simple_kms_plane_funcs = {
 	.reset			= drm_simple_kms_plane_reset,
 	.atomic_duplicate_state	= drm_simple_kms_plane_duplicate_state,
 	.atomic_destroy_state	= drm_simple_kms_plane_destroy_state,
-	.format_mod_supported   = drm_simple_kms_format_mod_supported,
 };
 
 /**
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [Intel-gfx] [PATCH v2 3/6] drm/simple-kms: Drop format_mod_supported function
@ 2021-12-22  9:05   ` José Expósito
  0 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-22  9:05 UTC (permalink / raw)
  To: contact
  Cc: airlied, alexandre.torgue, stefan, benjamin.gaignard, festevam,
	linux-stm32, marex, linux-imx, intel-gfx, tzimmermann, s.hauer,
	mripard, kernel, linux-arm-kernel, dri-devel, yannick.fertre,
	linux-kernel, philippe.cornu, mcoquelin.stm32, dmitry.baryshkov,
	José Expósito, shawnguo

The "drm_plane_funcs.format_mod_supported" can be removed in favor of
the default implementation.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 drivers/gpu/drm/drm_simple_kms_helper.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/gpu/drm/drm_simple_kms_helper.c b/drivers/gpu/drm/drm_simple_kms_helper.c
index 72989ed1baba..2c6aa67c6956 100644
--- a/drivers/gpu/drm/drm_simple_kms_helper.c
+++ b/drivers/gpu/drm/drm_simple_kms_helper.c
@@ -284,13 +284,6 @@ static void drm_simple_kms_plane_cleanup_fb(struct drm_plane *plane,
 	pipe->funcs->cleanup_fb(pipe, state);
 }
 
-static bool drm_simple_kms_format_mod_supported(struct drm_plane *plane,
-						uint32_t format,
-						uint64_t modifier)
-{
-	return modifier == DRM_FORMAT_MOD_LINEAR;
-}
-
 static const struct drm_plane_helper_funcs drm_simple_kms_plane_helper_funcs = {
 	.prepare_fb = drm_simple_kms_plane_prepare_fb,
 	.cleanup_fb = drm_simple_kms_plane_cleanup_fb,
@@ -339,7 +332,6 @@ static const struct drm_plane_funcs drm_simple_kms_plane_funcs = {
 	.reset			= drm_simple_kms_plane_reset,
 	.atomic_duplicate_state	= drm_simple_kms_plane_duplicate_state,
 	.atomic_destroy_state	= drm_simple_kms_plane_destroy_state,
-	.format_mod_supported   = drm_simple_kms_format_mod_supported,
 };
 
 /**
-- 
2.25.1


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

* [PATCH v2 4/6] drm/i915/display: Drop format_mod_supported function
  2021-12-22  9:05 ` José Expósito
  (?)
  (?)
@ 2021-12-22  9:05   ` José Expósito
  -1 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-22  9:05 UTC (permalink / raw)
  To: contact
  Cc: dmitry.baryshkov, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, jani.nikula, joonas.lahtinen, rodrigo.vivi,
	marex, stefan, shawnguo, s.hauer, kernel, festevam, linux-imx,
	yannick.fertre, philippe.cornu, benjamin.gaignard,
	mcoquelin.stm32, alexandre.torgue, dri-devel, linux-kernel,
	intel-gfx, linux-arm-kernel, linux-stm32,
	José Expósito

The "drm_plane_funcs.format_mod_supported" can be removed in favor of
the default implementation.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 drivers/gpu/drm/i915/display/intel_cursor.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_cursor.c b/drivers/gpu/drm/i915/display/intel_cursor.c
index 11842f212613..6a5e022f5e21 100644
--- a/drivers/gpu/drm/i915/display/intel_cursor.c
+++ b/drivers/gpu/drm/i915/display/intel_cursor.c
@@ -602,13 +602,6 @@ static bool i9xx_cursor_get_hw_state(struct intel_plane *plane,
 	return ret;
 }
 
-static bool intel_cursor_format_mod_supported(struct drm_plane *_plane,
-					      u32 format, u64 modifier)
-{
-	return modifier == DRM_FORMAT_MOD_LINEAR &&
-		format == DRM_FORMAT_ARGB8888;
-}
-
 static int
 intel_legacy_cursor_update(struct drm_plane *_plane,
 			   struct drm_crtc *_crtc,
@@ -745,7 +738,6 @@ static const struct drm_plane_funcs intel_cursor_plane_funcs = {
 	.destroy = intel_plane_destroy,
 	.atomic_duplicate_state = intel_plane_duplicate_state,
 	.atomic_destroy_state = intel_plane_destroy_state,
-	.format_mod_supported = intel_cursor_format_mod_supported,
 };
 
 struct intel_plane *
-- 
2.25.1


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

* [PATCH v2 4/6] drm/i915/display: Drop format_mod_supported function
@ 2021-12-22  9:05   ` José Expósito
  0 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-22  9:05 UTC (permalink / raw)
  To: contact
  Cc: airlied, alexandre.torgue, benjamin.gaignard, linux-stm32, marex,
	linux-imx, intel-gfx, tzimmermann, s.hauer, rodrigo.vivi, kernel,
	linux-arm-kernel, dri-devel, yannick.fertre, linux-kernel,
	philippe.cornu, mcoquelin.stm32, dmitry.baryshkov,
	José Expósito, shawnguo

The "drm_plane_funcs.format_mod_supported" can be removed in favor of
the default implementation.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 drivers/gpu/drm/i915/display/intel_cursor.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_cursor.c b/drivers/gpu/drm/i915/display/intel_cursor.c
index 11842f212613..6a5e022f5e21 100644
--- a/drivers/gpu/drm/i915/display/intel_cursor.c
+++ b/drivers/gpu/drm/i915/display/intel_cursor.c
@@ -602,13 +602,6 @@ static bool i9xx_cursor_get_hw_state(struct intel_plane *plane,
 	return ret;
 }
 
-static bool intel_cursor_format_mod_supported(struct drm_plane *_plane,
-					      u32 format, u64 modifier)
-{
-	return modifier == DRM_FORMAT_MOD_LINEAR &&
-		format == DRM_FORMAT_ARGB8888;
-}
-
 static int
 intel_legacy_cursor_update(struct drm_plane *_plane,
 			   struct drm_crtc *_crtc,
@@ -745,7 +738,6 @@ static const struct drm_plane_funcs intel_cursor_plane_funcs = {
 	.destroy = intel_plane_destroy,
 	.atomic_duplicate_state = intel_plane_duplicate_state,
 	.atomic_destroy_state = intel_plane_destroy_state,
-	.format_mod_supported = intel_cursor_format_mod_supported,
 };
 
 struct intel_plane *
-- 
2.25.1


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

* [PATCH v2 4/6] drm/i915/display: Drop format_mod_supported function
@ 2021-12-22  9:05   ` José Expósito
  0 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-22  9:05 UTC (permalink / raw)
  To: contact
  Cc: dmitry.baryshkov, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, jani.nikula, joonas.lahtinen, rodrigo.vivi,
	marex, stefan, shawnguo, s.hauer, kernel, festevam, linux-imx,
	yannick.fertre, philippe.cornu, benjamin.gaignard,
	mcoquelin.stm32, alexandre.torgue, dri-devel, linux-kernel,
	intel-gfx, linux-arm-kernel, linux-stm32,
	José Expósito

The "drm_plane_funcs.format_mod_supported" can be removed in favor of
the default implementation.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 drivers/gpu/drm/i915/display/intel_cursor.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_cursor.c b/drivers/gpu/drm/i915/display/intel_cursor.c
index 11842f212613..6a5e022f5e21 100644
--- a/drivers/gpu/drm/i915/display/intel_cursor.c
+++ b/drivers/gpu/drm/i915/display/intel_cursor.c
@@ -602,13 +602,6 @@ static bool i9xx_cursor_get_hw_state(struct intel_plane *plane,
 	return ret;
 }
 
-static bool intel_cursor_format_mod_supported(struct drm_plane *_plane,
-					      u32 format, u64 modifier)
-{
-	return modifier == DRM_FORMAT_MOD_LINEAR &&
-		format == DRM_FORMAT_ARGB8888;
-}
-
 static int
 intel_legacy_cursor_update(struct drm_plane *_plane,
 			   struct drm_crtc *_crtc,
@@ -745,7 +738,6 @@ static const struct drm_plane_funcs intel_cursor_plane_funcs = {
 	.destroy = intel_plane_destroy,
 	.atomic_duplicate_state = intel_plane_duplicate_state,
 	.atomic_destroy_state = intel_plane_destroy_state,
-	.format_mod_supported = intel_cursor_format_mod_supported,
 };
 
 struct intel_plane *
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [Intel-gfx] [PATCH v2 4/6] drm/i915/display: Drop format_mod_supported function
@ 2021-12-22  9:05   ` José Expósito
  0 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-22  9:05 UTC (permalink / raw)
  To: contact
  Cc: airlied, alexandre.torgue, stefan, benjamin.gaignard, festevam,
	linux-stm32, marex, linux-imx, intel-gfx, tzimmermann, s.hauer,
	mripard, kernel, linux-arm-kernel, dri-devel, yannick.fertre,
	linux-kernel, philippe.cornu, mcoquelin.stm32, dmitry.baryshkov,
	José Expósito, shawnguo

The "drm_plane_funcs.format_mod_supported" can be removed in favor of
the default implementation.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 drivers/gpu/drm/i915/display/intel_cursor.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_cursor.c b/drivers/gpu/drm/i915/display/intel_cursor.c
index 11842f212613..6a5e022f5e21 100644
--- a/drivers/gpu/drm/i915/display/intel_cursor.c
+++ b/drivers/gpu/drm/i915/display/intel_cursor.c
@@ -602,13 +602,6 @@ static bool i9xx_cursor_get_hw_state(struct intel_plane *plane,
 	return ret;
 }
 
-static bool intel_cursor_format_mod_supported(struct drm_plane *_plane,
-					      u32 format, u64 modifier)
-{
-	return modifier == DRM_FORMAT_MOD_LINEAR &&
-		format == DRM_FORMAT_ARGB8888;
-}
-
 static int
 intel_legacy_cursor_update(struct drm_plane *_plane,
 			   struct drm_crtc *_crtc,
@@ -745,7 +738,6 @@ static const struct drm_plane_funcs intel_cursor_plane_funcs = {
 	.destroy = intel_plane_destroy,
 	.atomic_duplicate_state = intel_plane_duplicate_state,
 	.atomic_destroy_state = intel_plane_destroy_state,
-	.format_mod_supported = intel_cursor_format_mod_supported,
 };
 
 struct intel_plane *
-- 
2.25.1


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

* [PATCH v2 5/6] drm: mxsfb: Drop format_mod_supported function
  2021-12-22  9:05 ` José Expósito
  (?)
  (?)
@ 2021-12-22  9:05   ` José Expósito
  -1 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-22  9:05 UTC (permalink / raw)
  To: contact
  Cc: dmitry.baryshkov, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, jani.nikula, joonas.lahtinen, rodrigo.vivi,
	marex, stefan, shawnguo, s.hauer, kernel, festevam, linux-imx,
	yannick.fertre, philippe.cornu, benjamin.gaignard,
	mcoquelin.stm32, alexandre.torgue, dri-devel, linux-kernel,
	intel-gfx, linux-arm-kernel, linux-stm32,
	José Expósito

The "drm_plane_funcs.format_mod_supported" can be removed in favor of
the default implementation.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 drivers/gpu/drm/mxsfb/mxsfb_kms.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/gpu/drm/mxsfb/mxsfb_kms.c b/drivers/gpu/drm/mxsfb/mxsfb_kms.c
index 0655582ae8ed..df32e1c3cc5d 100644
--- a/drivers/gpu/drm/mxsfb/mxsfb_kms.c
+++ b/drivers/gpu/drm/mxsfb/mxsfb_kms.c
@@ -554,13 +554,6 @@ static void mxsfb_plane_overlay_atomic_update(struct drm_plane *plane,
 	writel(ctrl, mxsfb->base + LCDC_AS_CTRL);
 }
 
-static bool mxsfb_format_mod_supported(struct drm_plane *plane,
-				       uint32_t format,
-				       uint64_t modifier)
-{
-	return modifier == DRM_FORMAT_MOD_LINEAR;
-}
-
 static const struct drm_plane_helper_funcs mxsfb_plane_primary_helper_funcs = {
 	.atomic_check = mxsfb_plane_atomic_check,
 	.atomic_update = mxsfb_plane_primary_atomic_update,
@@ -572,7 +565,6 @@ static const struct drm_plane_helper_funcs mxsfb_plane_overlay_helper_funcs = {
 };
 
 static const struct drm_plane_funcs mxsfb_plane_funcs = {
-	.format_mod_supported	= mxsfb_format_mod_supported,
 	.update_plane		= drm_atomic_helper_update_plane,
 	.disable_plane		= drm_atomic_helper_disable_plane,
 	.destroy		= drm_plane_cleanup,
-- 
2.25.1


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

* [PATCH v2 5/6] drm: mxsfb: Drop format_mod_supported function
@ 2021-12-22  9:05   ` José Expósito
  0 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-22  9:05 UTC (permalink / raw)
  To: contact
  Cc: airlied, alexandre.torgue, benjamin.gaignard, linux-stm32, marex,
	linux-imx, intel-gfx, tzimmermann, s.hauer, rodrigo.vivi, kernel,
	linux-arm-kernel, dri-devel, yannick.fertre, linux-kernel,
	philippe.cornu, mcoquelin.stm32, dmitry.baryshkov,
	José Expósito, shawnguo

The "drm_plane_funcs.format_mod_supported" can be removed in favor of
the default implementation.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 drivers/gpu/drm/mxsfb/mxsfb_kms.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/gpu/drm/mxsfb/mxsfb_kms.c b/drivers/gpu/drm/mxsfb/mxsfb_kms.c
index 0655582ae8ed..df32e1c3cc5d 100644
--- a/drivers/gpu/drm/mxsfb/mxsfb_kms.c
+++ b/drivers/gpu/drm/mxsfb/mxsfb_kms.c
@@ -554,13 +554,6 @@ static void mxsfb_plane_overlay_atomic_update(struct drm_plane *plane,
 	writel(ctrl, mxsfb->base + LCDC_AS_CTRL);
 }
 
-static bool mxsfb_format_mod_supported(struct drm_plane *plane,
-				       uint32_t format,
-				       uint64_t modifier)
-{
-	return modifier == DRM_FORMAT_MOD_LINEAR;
-}
-
 static const struct drm_plane_helper_funcs mxsfb_plane_primary_helper_funcs = {
 	.atomic_check = mxsfb_plane_atomic_check,
 	.atomic_update = mxsfb_plane_primary_atomic_update,
@@ -572,7 +565,6 @@ static const struct drm_plane_helper_funcs mxsfb_plane_overlay_helper_funcs = {
 };
 
 static const struct drm_plane_funcs mxsfb_plane_funcs = {
-	.format_mod_supported	= mxsfb_format_mod_supported,
 	.update_plane		= drm_atomic_helper_update_plane,
 	.disable_plane		= drm_atomic_helper_disable_plane,
 	.destroy		= drm_plane_cleanup,
-- 
2.25.1


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

* [PATCH v2 5/6] drm: mxsfb: Drop format_mod_supported function
@ 2021-12-22  9:05   ` José Expósito
  0 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-22  9:05 UTC (permalink / raw)
  To: contact
  Cc: dmitry.baryshkov, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, jani.nikula, joonas.lahtinen, rodrigo.vivi,
	marex, stefan, shawnguo, s.hauer, kernel, festevam, linux-imx,
	yannick.fertre, philippe.cornu, benjamin.gaignard,
	mcoquelin.stm32, alexandre.torgue, dri-devel, linux-kernel,
	intel-gfx, linux-arm-kernel, linux-stm32,
	José Expósito

The "drm_plane_funcs.format_mod_supported" can be removed in favor of
the default implementation.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 drivers/gpu/drm/mxsfb/mxsfb_kms.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/gpu/drm/mxsfb/mxsfb_kms.c b/drivers/gpu/drm/mxsfb/mxsfb_kms.c
index 0655582ae8ed..df32e1c3cc5d 100644
--- a/drivers/gpu/drm/mxsfb/mxsfb_kms.c
+++ b/drivers/gpu/drm/mxsfb/mxsfb_kms.c
@@ -554,13 +554,6 @@ static void mxsfb_plane_overlay_atomic_update(struct drm_plane *plane,
 	writel(ctrl, mxsfb->base + LCDC_AS_CTRL);
 }
 
-static bool mxsfb_format_mod_supported(struct drm_plane *plane,
-				       uint32_t format,
-				       uint64_t modifier)
-{
-	return modifier == DRM_FORMAT_MOD_LINEAR;
-}
-
 static const struct drm_plane_helper_funcs mxsfb_plane_primary_helper_funcs = {
 	.atomic_check = mxsfb_plane_atomic_check,
 	.atomic_update = mxsfb_plane_primary_atomic_update,
@@ -572,7 +565,6 @@ static const struct drm_plane_helper_funcs mxsfb_plane_overlay_helper_funcs = {
 };
 
 static const struct drm_plane_funcs mxsfb_plane_funcs = {
-	.format_mod_supported	= mxsfb_format_mod_supported,
 	.update_plane		= drm_atomic_helper_update_plane,
 	.disable_plane		= drm_atomic_helper_disable_plane,
 	.destroy		= drm_plane_cleanup,
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [Intel-gfx] [PATCH v2 5/6] drm: mxsfb: Drop format_mod_supported function
@ 2021-12-22  9:05   ` José Expósito
  0 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-22  9:05 UTC (permalink / raw)
  To: contact
  Cc: airlied, alexandre.torgue, stefan, benjamin.gaignard, festevam,
	linux-stm32, marex, linux-imx, intel-gfx, tzimmermann, s.hauer,
	mripard, kernel, linux-arm-kernel, dri-devel, yannick.fertre,
	linux-kernel, philippe.cornu, mcoquelin.stm32, dmitry.baryshkov,
	José Expósito, shawnguo

The "drm_plane_funcs.format_mod_supported" can be removed in favor of
the default implementation.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 drivers/gpu/drm/mxsfb/mxsfb_kms.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/gpu/drm/mxsfb/mxsfb_kms.c b/drivers/gpu/drm/mxsfb/mxsfb_kms.c
index 0655582ae8ed..df32e1c3cc5d 100644
--- a/drivers/gpu/drm/mxsfb/mxsfb_kms.c
+++ b/drivers/gpu/drm/mxsfb/mxsfb_kms.c
@@ -554,13 +554,6 @@ static void mxsfb_plane_overlay_atomic_update(struct drm_plane *plane,
 	writel(ctrl, mxsfb->base + LCDC_AS_CTRL);
 }
 
-static bool mxsfb_format_mod_supported(struct drm_plane *plane,
-				       uint32_t format,
-				       uint64_t modifier)
-{
-	return modifier == DRM_FORMAT_MOD_LINEAR;
-}
-
 static const struct drm_plane_helper_funcs mxsfb_plane_primary_helper_funcs = {
 	.atomic_check = mxsfb_plane_atomic_check,
 	.atomic_update = mxsfb_plane_primary_atomic_update,
@@ -572,7 +565,6 @@ static const struct drm_plane_helper_funcs mxsfb_plane_overlay_helper_funcs = {
 };
 
 static const struct drm_plane_funcs mxsfb_plane_funcs = {
-	.format_mod_supported	= mxsfb_format_mod_supported,
 	.update_plane		= drm_atomic_helper_update_plane,
 	.disable_plane		= drm_atomic_helper_disable_plane,
 	.destroy		= drm_plane_cleanup,
-- 
2.25.1


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

* [PATCH v2 6/6] drm/stm: ltdc: Drop format_mod_supported function
  2021-12-22  9:05 ` José Expósito
  (?)
  (?)
@ 2021-12-22  9:05   ` José Expósito
  -1 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-22  9:05 UTC (permalink / raw)
  To: contact
  Cc: dmitry.baryshkov, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, jani.nikula, joonas.lahtinen, rodrigo.vivi,
	marex, stefan, shawnguo, s.hauer, kernel, festevam, linux-imx,
	yannick.fertre, philippe.cornu, benjamin.gaignard,
	mcoquelin.stm32, alexandre.torgue, dri-devel, linux-kernel,
	intel-gfx, linux-arm-kernel, linux-stm32,
	José Expósito

The "drm_plane_funcs.format_mod_supported" can be removed in favor of
the default implementation.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 drivers/gpu/drm/stm/ltdc.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index dbdee954692a..ef909e50f0e4 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -925,16 +925,6 @@ static void ltdc_plane_atomic_print_state(struct drm_printer *p,
 	fpsi->counter = 0;
 }
 
-static bool ltdc_plane_format_mod_supported(struct drm_plane *plane,
-					    u32 format,
-					    u64 modifier)
-{
-	if (modifier == DRM_FORMAT_MOD_LINEAR)
-		return true;
-
-	return false;
-}
-
 static const struct drm_plane_funcs ltdc_plane_funcs = {
 	.update_plane = drm_atomic_helper_update_plane,
 	.disable_plane = drm_atomic_helper_disable_plane,
@@ -943,7 +933,6 @@ static const struct drm_plane_funcs ltdc_plane_funcs = {
 	.atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
 	.atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
 	.atomic_print_state = ltdc_plane_atomic_print_state,
-	.format_mod_supported = ltdc_plane_format_mod_supported,
 };
 
 static const struct drm_plane_helper_funcs ltdc_plane_helper_funcs = {
-- 
2.25.1


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

* [PATCH v2 6/6] drm/stm: ltdc: Drop format_mod_supported function
@ 2021-12-22  9:05   ` José Expósito
  0 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-22  9:05 UTC (permalink / raw)
  To: contact
  Cc: airlied, alexandre.torgue, benjamin.gaignard, linux-stm32, marex,
	linux-imx, intel-gfx, tzimmermann, s.hauer, rodrigo.vivi, kernel,
	linux-arm-kernel, dri-devel, yannick.fertre, linux-kernel,
	philippe.cornu, mcoquelin.stm32, dmitry.baryshkov,
	José Expósito, shawnguo

The "drm_plane_funcs.format_mod_supported" can be removed in favor of
the default implementation.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 drivers/gpu/drm/stm/ltdc.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index dbdee954692a..ef909e50f0e4 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -925,16 +925,6 @@ static void ltdc_plane_atomic_print_state(struct drm_printer *p,
 	fpsi->counter = 0;
 }
 
-static bool ltdc_plane_format_mod_supported(struct drm_plane *plane,
-					    u32 format,
-					    u64 modifier)
-{
-	if (modifier == DRM_FORMAT_MOD_LINEAR)
-		return true;
-
-	return false;
-}
-
 static const struct drm_plane_funcs ltdc_plane_funcs = {
 	.update_plane = drm_atomic_helper_update_plane,
 	.disable_plane = drm_atomic_helper_disable_plane,
@@ -943,7 +933,6 @@ static const struct drm_plane_funcs ltdc_plane_funcs = {
 	.atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
 	.atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
 	.atomic_print_state = ltdc_plane_atomic_print_state,
-	.format_mod_supported = ltdc_plane_format_mod_supported,
 };
 
 static const struct drm_plane_helper_funcs ltdc_plane_helper_funcs = {
-- 
2.25.1


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

* [PATCH v2 6/6] drm/stm: ltdc: Drop format_mod_supported function
@ 2021-12-22  9:05   ` José Expósito
  0 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-22  9:05 UTC (permalink / raw)
  To: contact
  Cc: dmitry.baryshkov, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, jani.nikula, joonas.lahtinen, rodrigo.vivi,
	marex, stefan, shawnguo, s.hauer, kernel, festevam, linux-imx,
	yannick.fertre, philippe.cornu, benjamin.gaignard,
	mcoquelin.stm32, alexandre.torgue, dri-devel, linux-kernel,
	intel-gfx, linux-arm-kernel, linux-stm32,
	José Expósito

The "drm_plane_funcs.format_mod_supported" can be removed in favor of
the default implementation.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 drivers/gpu/drm/stm/ltdc.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index dbdee954692a..ef909e50f0e4 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -925,16 +925,6 @@ static void ltdc_plane_atomic_print_state(struct drm_printer *p,
 	fpsi->counter = 0;
 }
 
-static bool ltdc_plane_format_mod_supported(struct drm_plane *plane,
-					    u32 format,
-					    u64 modifier)
-{
-	if (modifier == DRM_FORMAT_MOD_LINEAR)
-		return true;
-
-	return false;
-}
-
 static const struct drm_plane_funcs ltdc_plane_funcs = {
 	.update_plane = drm_atomic_helper_update_plane,
 	.disable_plane = drm_atomic_helper_disable_plane,
@@ -943,7 +933,6 @@ static const struct drm_plane_funcs ltdc_plane_funcs = {
 	.atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
 	.atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
 	.atomic_print_state = ltdc_plane_atomic_print_state,
-	.format_mod_supported = ltdc_plane_format_mod_supported,
 };
 
 static const struct drm_plane_helper_funcs ltdc_plane_helper_funcs = {
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [Intel-gfx] [PATCH v2 6/6] drm/stm: ltdc: Drop format_mod_supported function
@ 2021-12-22  9:05   ` José Expósito
  0 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-22  9:05 UTC (permalink / raw)
  To: contact
  Cc: airlied, alexandre.torgue, stefan, benjamin.gaignard, festevam,
	linux-stm32, marex, linux-imx, intel-gfx, tzimmermann, s.hauer,
	mripard, kernel, linux-arm-kernel, dri-devel, yannick.fertre,
	linux-kernel, philippe.cornu, mcoquelin.stm32, dmitry.baryshkov,
	José Expósito, shawnguo

The "drm_plane_funcs.format_mod_supported" can be removed in favor of
the default implementation.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 drivers/gpu/drm/stm/ltdc.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index dbdee954692a..ef909e50f0e4 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -925,16 +925,6 @@ static void ltdc_plane_atomic_print_state(struct drm_printer *p,
 	fpsi->counter = 0;
 }
 
-static bool ltdc_plane_format_mod_supported(struct drm_plane *plane,
-					    u32 format,
-					    u64 modifier)
-{
-	if (modifier == DRM_FORMAT_MOD_LINEAR)
-		return true;
-
-	return false;
-}
-
 static const struct drm_plane_funcs ltdc_plane_funcs = {
 	.update_plane = drm_atomic_helper_update_plane,
 	.disable_plane = drm_atomic_helper_disable_plane,
@@ -943,7 +933,6 @@ static const struct drm_plane_funcs ltdc_plane_funcs = {
 	.atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
 	.atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
 	.atomic_print_state = ltdc_plane_atomic_print_state,
-	.format_mod_supported = ltdc_plane_format_mod_supported,
 };
 
 static const struct drm_plane_helper_funcs ltdc_plane_helper_funcs = {
-- 
2.25.1


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

* Re: [PATCH v2 1/6] drm/plane: Make format_mod_supported truly optional
  2021-12-22  9:05   ` José Expósito
@ 2021-12-22 13:10     ` kernel test robot
  -1 siblings, 0 replies; 63+ messages in thread
From: kernel test robot @ 2021-12-22 13:10 UTC (permalink / raw)
  To: José Expósito, contact
  Cc: llvm, kbuild-all, dmitry.baryshkov, maarten.lankhorst, mripard,
	tzimmermann, airlied, daniel, jani.nikula, joonas.lahtinen,
	rodrigo.vivi

Hi "José,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on atorgue-stm32/stm32-next]
[also build test WARNING on v5.16-rc6 next-20211221]
[cannot apply to drm/drm-next drm-intel/for-linux-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Jos-Exp-sito/Add-missing-format_mod_supported-functions/20211222-170806
base:   https://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32.git stm32-next
config: arm-randconfig-r031-20211222 (https://download.01.org/0day-ci/archive/20211222/202112222123.OJy3roxk-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project de4e0195ae1c39f1c3b07834b8e32c113f4f20eb)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://github.com/0day-ci/linux/commit/0a433a79da79d35aa0b0130be9f44ef3e8fd9b08
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Jos-Exp-sito/Add-missing-format_mod_supported-functions/20211222-170806
        git checkout 0a433a79da79d35aa0b0130be9f44ef3e8fd9b08
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/gpu/drm/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/drm_plane.c:222:1: warning: unused label 'done' [-Wunused-label]
   done:
   ^~~~~
   1 warning generated.


vim +/done +222 drivers/gpu/drm/drm_plane.c

db1689aa61bd1e Ben Widawsky  2017-07-23  163  
db1689aa61bd1e Ben Widawsky  2017-07-23  164  static int create_in_format_blob(struct drm_device *dev, struct drm_plane *plane)
db1689aa61bd1e Ben Widawsky  2017-07-23  165  {
db1689aa61bd1e Ben Widawsky  2017-07-23  166  	const struct drm_mode_config *config = &dev->mode_config;
db1689aa61bd1e Ben Widawsky  2017-07-23  167  	struct drm_property_blob *blob;
db1689aa61bd1e Ben Widawsky  2017-07-23  168  	struct drm_format_modifier *mod;
db1689aa61bd1e Ben Widawsky  2017-07-23  169  	size_t blob_size, formats_size, modifiers_size;
db1689aa61bd1e Ben Widawsky  2017-07-23  170  	struct drm_format_modifier_blob *blob_data;
db1689aa61bd1e Ben Widawsky  2017-07-23  171  	unsigned int i, j;
db1689aa61bd1e Ben Widawsky  2017-07-23  172  
db1689aa61bd1e Ben Widawsky  2017-07-23  173  	formats_size = sizeof(__u32) * plane->format_count;
db1689aa61bd1e Ben Widawsky  2017-07-23  174  	if (WARN_ON(!formats_size)) {
db1689aa61bd1e Ben Widawsky  2017-07-23  175  		/* 0 formats are never expected */
db1689aa61bd1e Ben Widawsky  2017-07-23  176  		return 0;
db1689aa61bd1e Ben Widawsky  2017-07-23  177  	}
db1689aa61bd1e Ben Widawsky  2017-07-23  178  
db1689aa61bd1e Ben Widawsky  2017-07-23  179  	modifiers_size =
db1689aa61bd1e Ben Widawsky  2017-07-23  180  		sizeof(struct drm_format_modifier) * plane->modifier_count;
db1689aa61bd1e Ben Widawsky  2017-07-23  181  
db1689aa61bd1e Ben Widawsky  2017-07-23  182  	blob_size = sizeof(struct drm_format_modifier_blob);
db1689aa61bd1e Ben Widawsky  2017-07-23  183  	/* Modifiers offset is a pointer to a struct with a 64 bit field so it
db1689aa61bd1e Ben Widawsky  2017-07-23  184  	 * should be naturally aligned to 8B.
db1689aa61bd1e Ben Widawsky  2017-07-23  185  	 */
db1689aa61bd1e Ben Widawsky  2017-07-23  186  	BUILD_BUG_ON(sizeof(struct drm_format_modifier_blob) % 8);
db1689aa61bd1e Ben Widawsky  2017-07-23  187  	blob_size += ALIGN(formats_size, 8);
db1689aa61bd1e Ben Widawsky  2017-07-23  188  	blob_size += modifiers_size;
db1689aa61bd1e Ben Widawsky  2017-07-23  189  
db1689aa61bd1e Ben Widawsky  2017-07-23  190  	blob = drm_property_create_blob(dev, blob_size, NULL);
db1689aa61bd1e Ben Widawsky  2017-07-23  191  	if (IS_ERR(blob))
db1689aa61bd1e Ben Widawsky  2017-07-23  192  		return -1;
db1689aa61bd1e Ben Widawsky  2017-07-23  193  
11b83e3fbc4196 Ville Syrjälä 2018-02-23  194  	blob_data = blob->data;
db1689aa61bd1e Ben Widawsky  2017-07-23  195  	blob_data->version = FORMAT_BLOB_CURRENT;
db1689aa61bd1e Ben Widawsky  2017-07-23  196  	blob_data->count_formats = plane->format_count;
db1689aa61bd1e Ben Widawsky  2017-07-23  197  	blob_data->formats_offset = sizeof(struct drm_format_modifier_blob);
db1689aa61bd1e Ben Widawsky  2017-07-23  198  	blob_data->count_modifiers = plane->modifier_count;
db1689aa61bd1e Ben Widawsky  2017-07-23  199  
db1689aa61bd1e Ben Widawsky  2017-07-23  200  	blob_data->modifiers_offset =
db1689aa61bd1e Ben Widawsky  2017-07-23  201  		ALIGN(blob_data->formats_offset + formats_size, 8);
db1689aa61bd1e Ben Widawsky  2017-07-23  202  
db1689aa61bd1e Ben Widawsky  2017-07-23  203  	memcpy(formats_ptr(blob_data), plane->format_types, formats_size);
db1689aa61bd1e Ben Widawsky  2017-07-23  204  
db1689aa61bd1e Ben Widawsky  2017-07-23  205  	mod = modifiers_ptr(blob_data);
db1689aa61bd1e Ben Widawsky  2017-07-23  206  	for (i = 0; i < plane->modifier_count; i++) {
db1689aa61bd1e Ben Widawsky  2017-07-23  207  		for (j = 0; j < plane->format_count; j++) {
0a433a79da79d3 José Expósito 2021-12-22  208  			if (!plane->funcs->format_mod_supported ||
0a433a79da79d3 José Expósito 2021-12-22  209  			    plane->funcs->format_mod_supported(plane,
db1689aa61bd1e Ben Widawsky  2017-07-23  210  							       plane->format_types[j],
db1689aa61bd1e Ben Widawsky  2017-07-23  211  							       plane->modifiers[i])) {
aadd41485bb227 Dan Carpenter 2017-08-09  212  				mod->formats |= 1ULL << j;
db1689aa61bd1e Ben Widawsky  2017-07-23  213  			}
db1689aa61bd1e Ben Widawsky  2017-07-23  214  		}
db1689aa61bd1e Ben Widawsky  2017-07-23  215  
db1689aa61bd1e Ben Widawsky  2017-07-23  216  		mod->modifier = plane->modifiers[i];
db1689aa61bd1e Ben Widawsky  2017-07-23  217  		mod->offset = 0;
db1689aa61bd1e Ben Widawsky  2017-07-23  218  		mod->pad = 0;
db1689aa61bd1e Ben Widawsky  2017-07-23  219  		mod++;
db1689aa61bd1e Ben Widawsky  2017-07-23  220  	}
db1689aa61bd1e Ben Widawsky  2017-07-23  221  
db1689aa61bd1e Ben Widawsky  2017-07-23 @222  done:
db1689aa61bd1e Ben Widawsky  2017-07-23  223  	drm_object_attach_property(&plane->base, config->modifiers_property,
db1689aa61bd1e Ben Widawsky  2017-07-23  224  				   blob->base.id);
db1689aa61bd1e Ben Widawsky  2017-07-23  225  
db1689aa61bd1e Ben Widawsky  2017-07-23  226  	return 0;
db1689aa61bd1e Ben Widawsky  2017-07-23  227  }
db1689aa61bd1e Ben Widawsky  2017-07-23  228  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

* Re: [PATCH v2 1/6] drm/plane: Make format_mod_supported truly optional
@ 2021-12-22 13:10     ` kernel test robot
  0 siblings, 0 replies; 63+ messages in thread
From: kernel test robot @ 2021-12-22 13:10 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 7147 bytes --]

Hi "José,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on atorgue-stm32/stm32-next]
[also build test WARNING on v5.16-rc6 next-20211221]
[cannot apply to drm/drm-next drm-intel/for-linux-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Jos-Exp-sito/Add-missing-format_mod_supported-functions/20211222-170806
base:   https://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32.git stm32-next
config: arm-randconfig-r031-20211222 (https://download.01.org/0day-ci/archive/20211222/202112222123.OJy3roxk-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project de4e0195ae1c39f1c3b07834b8e32c113f4f20eb)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://github.com/0day-ci/linux/commit/0a433a79da79d35aa0b0130be9f44ef3e8fd9b08
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Jos-Exp-sito/Add-missing-format_mod_supported-functions/20211222-170806
        git checkout 0a433a79da79d35aa0b0130be9f44ef3e8fd9b08
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/gpu/drm/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/drm_plane.c:222:1: warning: unused label 'done' [-Wunused-label]
   done:
   ^~~~~
   1 warning generated.


vim +/done +222 drivers/gpu/drm/drm_plane.c

db1689aa61bd1e Ben Widawsky  2017-07-23  163  
db1689aa61bd1e Ben Widawsky  2017-07-23  164  static int create_in_format_blob(struct drm_device *dev, struct drm_plane *plane)
db1689aa61bd1e Ben Widawsky  2017-07-23  165  {
db1689aa61bd1e Ben Widawsky  2017-07-23  166  	const struct drm_mode_config *config = &dev->mode_config;
db1689aa61bd1e Ben Widawsky  2017-07-23  167  	struct drm_property_blob *blob;
db1689aa61bd1e Ben Widawsky  2017-07-23  168  	struct drm_format_modifier *mod;
db1689aa61bd1e Ben Widawsky  2017-07-23  169  	size_t blob_size, formats_size, modifiers_size;
db1689aa61bd1e Ben Widawsky  2017-07-23  170  	struct drm_format_modifier_blob *blob_data;
db1689aa61bd1e Ben Widawsky  2017-07-23  171  	unsigned int i, j;
db1689aa61bd1e Ben Widawsky  2017-07-23  172  
db1689aa61bd1e Ben Widawsky  2017-07-23  173  	formats_size = sizeof(__u32) * plane->format_count;
db1689aa61bd1e Ben Widawsky  2017-07-23  174  	if (WARN_ON(!formats_size)) {
db1689aa61bd1e Ben Widawsky  2017-07-23  175  		/* 0 formats are never expected */
db1689aa61bd1e Ben Widawsky  2017-07-23  176  		return 0;
db1689aa61bd1e Ben Widawsky  2017-07-23  177  	}
db1689aa61bd1e Ben Widawsky  2017-07-23  178  
db1689aa61bd1e Ben Widawsky  2017-07-23  179  	modifiers_size =
db1689aa61bd1e Ben Widawsky  2017-07-23  180  		sizeof(struct drm_format_modifier) * plane->modifier_count;
db1689aa61bd1e Ben Widawsky  2017-07-23  181  
db1689aa61bd1e Ben Widawsky  2017-07-23  182  	blob_size = sizeof(struct drm_format_modifier_blob);
db1689aa61bd1e Ben Widawsky  2017-07-23  183  	/* Modifiers offset is a pointer to a struct with a 64 bit field so it
db1689aa61bd1e Ben Widawsky  2017-07-23  184  	 * should be naturally aligned to 8B.
db1689aa61bd1e Ben Widawsky  2017-07-23  185  	 */
db1689aa61bd1e Ben Widawsky  2017-07-23  186  	BUILD_BUG_ON(sizeof(struct drm_format_modifier_blob) % 8);
db1689aa61bd1e Ben Widawsky  2017-07-23  187  	blob_size += ALIGN(formats_size, 8);
db1689aa61bd1e Ben Widawsky  2017-07-23  188  	blob_size += modifiers_size;
db1689aa61bd1e Ben Widawsky  2017-07-23  189  
db1689aa61bd1e Ben Widawsky  2017-07-23  190  	blob = drm_property_create_blob(dev, blob_size, NULL);
db1689aa61bd1e Ben Widawsky  2017-07-23  191  	if (IS_ERR(blob))
db1689aa61bd1e Ben Widawsky  2017-07-23  192  		return -1;
db1689aa61bd1e Ben Widawsky  2017-07-23  193  
11b83e3fbc4196 Ville Syrjälä 2018-02-23  194  	blob_data = blob->data;
db1689aa61bd1e Ben Widawsky  2017-07-23  195  	blob_data->version = FORMAT_BLOB_CURRENT;
db1689aa61bd1e Ben Widawsky  2017-07-23  196  	blob_data->count_formats = plane->format_count;
db1689aa61bd1e Ben Widawsky  2017-07-23  197  	blob_data->formats_offset = sizeof(struct drm_format_modifier_blob);
db1689aa61bd1e Ben Widawsky  2017-07-23  198  	blob_data->count_modifiers = plane->modifier_count;
db1689aa61bd1e Ben Widawsky  2017-07-23  199  
db1689aa61bd1e Ben Widawsky  2017-07-23  200  	blob_data->modifiers_offset =
db1689aa61bd1e Ben Widawsky  2017-07-23  201  		ALIGN(blob_data->formats_offset + formats_size, 8);
db1689aa61bd1e Ben Widawsky  2017-07-23  202  
db1689aa61bd1e Ben Widawsky  2017-07-23  203  	memcpy(formats_ptr(blob_data), plane->format_types, formats_size);
db1689aa61bd1e Ben Widawsky  2017-07-23  204  
db1689aa61bd1e Ben Widawsky  2017-07-23  205  	mod = modifiers_ptr(blob_data);
db1689aa61bd1e Ben Widawsky  2017-07-23  206  	for (i = 0; i < plane->modifier_count; i++) {
db1689aa61bd1e Ben Widawsky  2017-07-23  207  		for (j = 0; j < plane->format_count; j++) {
0a433a79da79d3 José Expósito 2021-12-22  208  			if (!plane->funcs->format_mod_supported ||
0a433a79da79d3 José Expósito 2021-12-22  209  			    plane->funcs->format_mod_supported(plane,
db1689aa61bd1e Ben Widawsky  2017-07-23  210  							       plane->format_types[j],
db1689aa61bd1e Ben Widawsky  2017-07-23  211  							       plane->modifiers[i])) {
aadd41485bb227 Dan Carpenter 2017-08-09  212  				mod->formats |= 1ULL << j;
db1689aa61bd1e Ben Widawsky  2017-07-23  213  			}
db1689aa61bd1e Ben Widawsky  2017-07-23  214  		}
db1689aa61bd1e Ben Widawsky  2017-07-23  215  
db1689aa61bd1e Ben Widawsky  2017-07-23  216  		mod->modifier = plane->modifiers[i];
db1689aa61bd1e Ben Widawsky  2017-07-23  217  		mod->offset = 0;
db1689aa61bd1e Ben Widawsky  2017-07-23  218  		mod->pad = 0;
db1689aa61bd1e Ben Widawsky  2017-07-23  219  		mod++;
db1689aa61bd1e Ben Widawsky  2017-07-23  220  	}
db1689aa61bd1e Ben Widawsky  2017-07-23  221  
db1689aa61bd1e Ben Widawsky  2017-07-23 @222  done:
db1689aa61bd1e Ben Widawsky  2017-07-23  223  	drm_object_attach_property(&plane->base, config->modifiers_property,
db1689aa61bd1e Ben Widawsky  2017-07-23  224  				   blob->base.id);
db1689aa61bd1e Ben Widawsky  2017-07-23  225  
db1689aa61bd1e Ben Widawsky  2017-07-23  226  	return 0;
db1689aa61bd1e Ben Widawsky  2017-07-23  227  }
db1689aa61bd1e Ben Widawsky  2017-07-23  228  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

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

* Re: [PATCH v2 2/6] drm/plane: Fix typo in format_mod_supported documentation
  2021-12-22  9:05   ` José Expósito
  (?)
  (?)
@ 2021-12-23 10:07     ` Simon Ser
  -1 siblings, 0 replies; 63+ messages in thread
From: Simon Ser @ 2021-12-23 10:07 UTC (permalink / raw)
  To: José Expósito
  Cc: dmitry.baryshkov, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, jani.nikula, joonas.lahtinen, rodrigo.vivi,
	marex, stefan, shawnguo, s.hauer, kernel, festevam, linux-imx,
	yannick.fertre, philippe.cornu, benjamin.gaignard,
	mcoquelin.stm32, alexandre.torgue, dri-devel, linux-kernel,
	intel-gfx, linux-arm-kernel, linux-stm32

Reviewed-by: Simon Ser <contact@emersion.fr>

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

* Re: [PATCH v2 2/6] drm/plane: Fix typo in format_mod_supported documentation
@ 2021-12-23 10:07     ` Simon Ser
  0 siblings, 0 replies; 63+ messages in thread
From: Simon Ser @ 2021-12-23 10:07 UTC (permalink / raw)
  To: José Expósito
  Cc: airlied, alexandre.torgue, benjamin.gaignard, linux-stm32, marex,
	linux-imx, intel-gfx, tzimmermann, s.hauer, rodrigo.vivi, kernel,
	linux-arm-kernel, dri-devel, yannick.fertre, linux-kernel,
	philippe.cornu, mcoquelin.stm32, dmitry.baryshkov, shawnguo

Reviewed-by: Simon Ser <contact@emersion.fr>

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

* Re: [Intel-gfx] [PATCH v2 2/6] drm/plane: Fix typo in format_mod_supported documentation
@ 2021-12-23 10:07     ` Simon Ser
  0 siblings, 0 replies; 63+ messages in thread
From: Simon Ser @ 2021-12-23 10:07 UTC (permalink / raw)
  To: José Expósito
  Cc: airlied, alexandre.torgue, stefan, benjamin.gaignard, festevam,
	linux-stm32, marex, linux-imx, intel-gfx, tzimmermann, s.hauer,
	mripard, kernel, linux-arm-kernel, dri-devel, yannick.fertre,
	linux-kernel, philippe.cornu, mcoquelin.stm32, dmitry.baryshkov,
	shawnguo

Reviewed-by: Simon Ser <contact@emersion.fr>

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

* Re: [PATCH v2 2/6] drm/plane: Fix typo in format_mod_supported documentation
@ 2021-12-23 10:07     ` Simon Ser
  0 siblings, 0 replies; 63+ messages in thread
From: Simon Ser @ 2021-12-23 10:07 UTC (permalink / raw)
  To: José Expósito
  Cc: dmitry.baryshkov, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, jani.nikula, joonas.lahtinen, rodrigo.vivi,
	marex, stefan, shawnguo, s.hauer, kernel, festevam, linux-imx,
	yannick.fertre, philippe.cornu, benjamin.gaignard,
	mcoquelin.stm32, alexandre.torgue, dri-devel, linux-kernel,
	intel-gfx, linux-arm-kernel, linux-stm32

Reviewed-by: Simon Ser <contact@emersion.fr>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2 1/6] drm/plane: Make format_mod_supported truly optional
  2021-12-22  9:05   ` José Expósito
  (?)
  (?)
@ 2021-12-23 10:10     ` Simon Ser
  -1 siblings, 0 replies; 63+ messages in thread
From: Simon Ser @ 2021-12-23 10:10 UTC (permalink / raw)
  To: José Expósito
  Cc: dmitry.baryshkov, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, jani.nikula, joonas.lahtinen, rodrigo.vivi,
	marex, stefan, shawnguo, s.hauer, kernel, festevam, linux-imx,
	yannick.fertre, philippe.cornu, benjamin.gaignard,
	mcoquelin.stm32, alexandre.torgue, dri-devel, linux-kernel,
	intel-gfx, linux-arm-kernel, linux-stm32, Ville Syrjala

On Wednesday, December 22nd, 2021 at 10:05, José Expósito <jose.exposito89@gmail.com> wrote:

> Make "create_in_format_blob" behave as documented.

LGTM, nice!

Reviewed-by: Simon Ser <contact@emersion.fr>

CC Ville just in case

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

* Re: [PATCH v2 1/6] drm/plane: Make format_mod_supported truly optional
@ 2021-12-23 10:10     ` Simon Ser
  0 siblings, 0 replies; 63+ messages in thread
From: Simon Ser @ 2021-12-23 10:10 UTC (permalink / raw)
  To: José Expósito
  Cc: airlied, alexandre.torgue, benjamin.gaignard, linux-stm32, marex,
	linux-imx, intel-gfx, tzimmermann, s.hauer, rodrigo.vivi, kernel,
	linux-arm-kernel, dri-devel, yannick.fertre, linux-kernel,
	philippe.cornu, mcoquelin.stm32, dmitry.baryshkov, shawnguo

On Wednesday, December 22nd, 2021 at 10:05, José Expósito <jose.exposito89@gmail.com> wrote:

> Make "create_in_format_blob" behave as documented.

LGTM, nice!

Reviewed-by: Simon Ser <contact@emersion.fr>

CC Ville just in case

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

* Re: [Intel-gfx]  [PATCH v2 1/6] drm/plane: Make format_mod_supported truly optional
@ 2021-12-23 10:10     ` Simon Ser
  0 siblings, 0 replies; 63+ messages in thread
From: Simon Ser @ 2021-12-23 10:10 UTC (permalink / raw)
  To: José Expósito
  Cc: airlied, alexandre.torgue, stefan, benjamin.gaignard, festevam,
	linux-stm32, marex, linux-imx, intel-gfx, tzimmermann, s.hauer,
	mripard, kernel, linux-arm-kernel, dri-devel, yannick.fertre,
	linux-kernel, philippe.cornu, mcoquelin.stm32, dmitry.baryshkov,
	shawnguo

On Wednesday, December 22nd, 2021 at 10:05, José Expósito <jose.exposito89@gmail.com> wrote:

> Make "create_in_format_blob" behave as documented.

LGTM, nice!

Reviewed-by: Simon Ser <contact@emersion.fr>

CC Ville just in case

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

* Re: [PATCH v2 1/6] drm/plane: Make format_mod_supported truly optional
@ 2021-12-23 10:10     ` Simon Ser
  0 siblings, 0 replies; 63+ messages in thread
From: Simon Ser @ 2021-12-23 10:10 UTC (permalink / raw)
  To: José Expósito
  Cc: dmitry.baryshkov, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, jani.nikula, joonas.lahtinen, rodrigo.vivi,
	marex, stefan, shawnguo, s.hauer, kernel, festevam, linux-imx,
	yannick.fertre, philippe.cornu, benjamin.gaignard,
	mcoquelin.stm32, alexandre.torgue, dri-devel, linux-kernel,
	intel-gfx, linux-arm-kernel, linux-stm32, Ville Syrjala

On Wednesday, December 22nd, 2021 at 10:05, José Expósito <jose.exposito89@gmail.com> wrote:

> Make "create_in_format_blob" behave as documented.

LGTM, nice!

Reviewed-by: Simon Ser <contact@emersion.fr>

CC Ville just in case

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2 1/6] drm/plane: Make format_mod_supported truly optional
  2021-12-22  9:05   ` José Expósito
  (?)
  (?)
@ 2021-12-23 11:56     ` Ville Syrjälä
  -1 siblings, 0 replies; 63+ messages in thread
From: Ville Syrjälä @ 2021-12-23 11:56 UTC (permalink / raw)
  To: José Expósito
  Cc: contact, airlied, alexandre.torgue, benjamin.gaignard,
	linux-stm32, marex, linux-imx, intel-gfx, tzimmermann, s.hauer,
	rodrigo.vivi, kernel, linux-arm-kernel, dri-devel,
	yannick.fertre, linux-kernel, philippe.cornu, mcoquelin.stm32,
	dmitry.baryshkov, shawnguo

On Wed, Dec 22, 2021 at 10:05:47AM +0100, José Expósito wrote:
> The documentation for "drm_plane_funcs.format_mod_supported" reads:
> 
>   This *optional* hook is used for the DRM to determine if the given
>   format/modifier combination is valid for the plane. This allows the
>   DRM to generate the correct format bitmask (which formats apply to
>   which modifier), and to validate modifiers at atomic_check time.
> 
>   *If not present*, then any modifier in the plane's modifier
>   list is allowed with any of the plane's formats.
> 
> However, where the function is not present, an invalid IN_FORMATS blob
> property with modifiers but no formats is exposed to user-space.
> 
> This breaks the latest Weston [1]. For testing purposes, I extracted the
> affected code to a standalone program [2].
> 
> Make "create_in_format_blob" behave as documented.
> 
> [1] https://gitlab.freedesktop.org/wayland/weston/-/blob/9.0/libweston/backend-drm/kms.c#L431
> [2] https://github.com/JoseExposito/drm-sandbox/blob/main/in_formats.c
> 
> Signed-off-by: José Expósito <jose.exposito89@gmail.com>
> ---
>  drivers/gpu/drm/drm_plane.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
> index 82afb854141b..c1186b7215ee 100644
> --- a/drivers/gpu/drm/drm_plane.c
> +++ b/drivers/gpu/drm/drm_plane.c
> @@ -202,17 +202,13 @@ static int create_in_format_blob(struct drm_device *dev, struct drm_plane *plane
>  
>  	memcpy(formats_ptr(blob_data), plane->format_types, formats_size);
>  
> -	/* If we can't determine support, just bail */
> -	if (!plane->funcs->format_mod_supported)
> -		goto done;
> -
>  	mod = modifiers_ptr(blob_data);
>  	for (i = 0; i < plane->modifier_count; i++) {
>  		for (j = 0; j < plane->format_count; j++) {
> -			if (plane->funcs->format_mod_supported(plane,
> +			if (!plane->funcs->format_mod_supported ||
> +			    plane->funcs->format_mod_supported(plane,
>  							       plane->format_types[j],
>  							       plane->modifiers[i])) {

So instead of skipping the whole loop you just skip doing anything
inside the loop? Can't see how that achieves anything at all.

https://patchwork.freedesktop.org/series/83018/
is what I had in mind earlier but no one reviewed it and 
the discussion veered off track IIRC.

-- 
Ville Syrjälä
Intel

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

* Re: [PATCH v2 1/6] drm/plane: Make format_mod_supported truly optional
@ 2021-12-23 11:56     ` Ville Syrjälä
  0 siblings, 0 replies; 63+ messages in thread
From: Ville Syrjälä @ 2021-12-23 11:56 UTC (permalink / raw)
  To: José Expósito
  Cc: marex, mcoquelin.stm32, kernel, s.hauer, tzimmermann, airlied,
	intel-gfx, alexandre.torgue, dri-devel, linux-kernel,
	yannick.fertre, linux-imx, benjamin.gaignard, rodrigo.vivi,
	dmitry.baryshkov, shawnguo, linux-stm32, linux-arm-kernel,
	philippe.cornu

On Wed, Dec 22, 2021 at 10:05:47AM +0100, José Expósito wrote:
> The documentation for "drm_plane_funcs.format_mod_supported" reads:
> 
>   This *optional* hook is used for the DRM to determine if the given
>   format/modifier combination is valid for the plane. This allows the
>   DRM to generate the correct format bitmask (which formats apply to
>   which modifier), and to validate modifiers at atomic_check time.
> 
>   *If not present*, then any modifier in the plane's modifier
>   list is allowed with any of the plane's formats.
> 
> However, where the function is not present, an invalid IN_FORMATS blob
> property with modifiers but no formats is exposed to user-space.
> 
> This breaks the latest Weston [1]. For testing purposes, I extracted the
> affected code to a standalone program [2].
> 
> Make "create_in_format_blob" behave as documented.
> 
> [1] https://gitlab.freedesktop.org/wayland/weston/-/blob/9.0/libweston/backend-drm/kms.c#L431
> [2] https://github.com/JoseExposito/drm-sandbox/blob/main/in_formats.c
> 
> Signed-off-by: José Expósito <jose.exposito89@gmail.com>
> ---
>  drivers/gpu/drm/drm_plane.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
> index 82afb854141b..c1186b7215ee 100644
> --- a/drivers/gpu/drm/drm_plane.c
> +++ b/drivers/gpu/drm/drm_plane.c
> @@ -202,17 +202,13 @@ static int create_in_format_blob(struct drm_device *dev, struct drm_plane *plane
>  
>  	memcpy(formats_ptr(blob_data), plane->format_types, formats_size);
>  
> -	/* If we can't determine support, just bail */
> -	if (!plane->funcs->format_mod_supported)
> -		goto done;
> -
>  	mod = modifiers_ptr(blob_data);
>  	for (i = 0; i < plane->modifier_count; i++) {
>  		for (j = 0; j < plane->format_count; j++) {
> -			if (plane->funcs->format_mod_supported(plane,
> +			if (!plane->funcs->format_mod_supported ||
> +			    plane->funcs->format_mod_supported(plane,
>  							       plane->format_types[j],
>  							       plane->modifiers[i])) {

So instead of skipping the whole loop you just skip doing anything
inside the loop? Can't see how that achieves anything at all.

https://patchwork.freedesktop.org/series/83018/
is what I had in mind earlier but no one reviewed it and 
the discussion veered off track IIRC.

-- 
Ville Syrjälä
Intel

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

* Re: [Intel-gfx]  [PATCH v2 1/6] drm/plane: Make format_mod_supported truly optional
@ 2021-12-23 11:56     ` Ville Syrjälä
  0 siblings, 0 replies; 63+ messages in thread
From: Ville Syrjälä @ 2021-12-23 11:56 UTC (permalink / raw)
  To: José Expósito
  Cc: marex, mcoquelin.stm32, kernel, s.hauer, tzimmermann, airlied,
	contact, intel-gfx, alexandre.torgue, dri-devel, linux-kernel,
	yannick.fertre, linux-imx, benjamin.gaignard, dmitry.baryshkov,
	shawnguo, linux-stm32, linux-arm-kernel, philippe.cornu

On Wed, Dec 22, 2021 at 10:05:47AM +0100, José Expósito wrote:
> The documentation for "drm_plane_funcs.format_mod_supported" reads:
> 
>   This *optional* hook is used for the DRM to determine if the given
>   format/modifier combination is valid for the plane. This allows the
>   DRM to generate the correct format bitmask (which formats apply to
>   which modifier), and to validate modifiers at atomic_check time.
> 
>   *If not present*, then any modifier in the plane's modifier
>   list is allowed with any of the plane's formats.
> 
> However, where the function is not present, an invalid IN_FORMATS blob
> property with modifiers but no formats is exposed to user-space.
> 
> This breaks the latest Weston [1]. For testing purposes, I extracted the
> affected code to a standalone program [2].
> 
> Make "create_in_format_blob" behave as documented.
> 
> [1] https://gitlab.freedesktop.org/wayland/weston/-/blob/9.0/libweston/backend-drm/kms.c#L431
> [2] https://github.com/JoseExposito/drm-sandbox/blob/main/in_formats.c
> 
> Signed-off-by: José Expósito <jose.exposito89@gmail.com>
> ---
>  drivers/gpu/drm/drm_plane.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
> index 82afb854141b..c1186b7215ee 100644
> --- a/drivers/gpu/drm/drm_plane.c
> +++ b/drivers/gpu/drm/drm_plane.c
> @@ -202,17 +202,13 @@ static int create_in_format_blob(struct drm_device *dev, struct drm_plane *plane
>  
>  	memcpy(formats_ptr(blob_data), plane->format_types, formats_size);
>  
> -	/* If we can't determine support, just bail */
> -	if (!plane->funcs->format_mod_supported)
> -		goto done;
> -
>  	mod = modifiers_ptr(blob_data);
>  	for (i = 0; i < plane->modifier_count; i++) {
>  		for (j = 0; j < plane->format_count; j++) {
> -			if (plane->funcs->format_mod_supported(plane,
> +			if (!plane->funcs->format_mod_supported ||
> +			    plane->funcs->format_mod_supported(plane,
>  							       plane->format_types[j],
>  							       plane->modifiers[i])) {

So instead of skipping the whole loop you just skip doing anything
inside the loop? Can't see how that achieves anything at all.

https://patchwork.freedesktop.org/series/83018/
is what I had in mind earlier but no one reviewed it and 
the discussion veered off track IIRC.

-- 
Ville Syrjälä
Intel

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

* Re: [PATCH v2 1/6] drm/plane: Make format_mod_supported truly optional
@ 2021-12-23 11:56     ` Ville Syrjälä
  0 siblings, 0 replies; 63+ messages in thread
From: Ville Syrjälä @ 2021-12-23 11:56 UTC (permalink / raw)
  To: José Expósito
  Cc: contact, airlied, alexandre.torgue, benjamin.gaignard,
	linux-stm32, marex, linux-imx, intel-gfx, tzimmermann, s.hauer,
	rodrigo.vivi, kernel, linux-arm-kernel, dri-devel,
	yannick.fertre, linux-kernel, philippe.cornu, mcoquelin.stm32,
	dmitry.baryshkov, shawnguo

On Wed, Dec 22, 2021 at 10:05:47AM +0100, José Expósito wrote:
> The documentation for "drm_plane_funcs.format_mod_supported" reads:
> 
>   This *optional* hook is used for the DRM to determine if the given
>   format/modifier combination is valid for the plane. This allows the
>   DRM to generate the correct format bitmask (which formats apply to
>   which modifier), and to validate modifiers at atomic_check time.
> 
>   *If not present*, then any modifier in the plane's modifier
>   list is allowed with any of the plane's formats.
> 
> However, where the function is not present, an invalid IN_FORMATS blob
> property with modifiers but no formats is exposed to user-space.
> 
> This breaks the latest Weston [1]. For testing purposes, I extracted the
> affected code to a standalone program [2].
> 
> Make "create_in_format_blob" behave as documented.
> 
> [1] https://gitlab.freedesktop.org/wayland/weston/-/blob/9.0/libweston/backend-drm/kms.c#L431
> [2] https://github.com/JoseExposito/drm-sandbox/blob/main/in_formats.c
> 
> Signed-off-by: José Expósito <jose.exposito89@gmail.com>
> ---
>  drivers/gpu/drm/drm_plane.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
> index 82afb854141b..c1186b7215ee 100644
> --- a/drivers/gpu/drm/drm_plane.c
> +++ b/drivers/gpu/drm/drm_plane.c
> @@ -202,17 +202,13 @@ static int create_in_format_blob(struct drm_device *dev, struct drm_plane *plane
>  
>  	memcpy(formats_ptr(blob_data), plane->format_types, formats_size);
>  
> -	/* If we can't determine support, just bail */
> -	if (!plane->funcs->format_mod_supported)
> -		goto done;
> -
>  	mod = modifiers_ptr(blob_data);
>  	for (i = 0; i < plane->modifier_count; i++) {
>  		for (j = 0; j < plane->format_count; j++) {
> -			if (plane->funcs->format_mod_supported(plane,
> +			if (!plane->funcs->format_mod_supported ||
> +			    plane->funcs->format_mod_supported(plane,
>  							       plane->format_types[j],
>  							       plane->modifiers[i])) {

So instead of skipping the whole loop you just skip doing anything
inside the loop? Can't see how that achieves anything at all.

https://patchwork.freedesktop.org/series/83018/
is what I had in mind earlier but no one reviewed it and 
the discussion veered off track IIRC.

-- 
Ville Syrjälä
Intel

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2 1/6] drm/plane: Make format_mod_supported truly optional
  2021-12-23 11:56     ` Ville Syrjälä
  (?)
  (?)
@ 2021-12-23 13:42       ` Simon Ser
  -1 siblings, 0 replies; 63+ messages in thread
From: Simon Ser @ 2021-12-23 13:42 UTC (permalink / raw)
  To: Ville Syrjälä
  Cc: José Expósito, airlied, alexandre.torgue,
	benjamin.gaignard, linux-stm32, marex, linux-imx, intel-gfx,
	tzimmermann, s.hauer, rodrigo.vivi, kernel, linux-arm-kernel,
	dri-devel, yannick.fertre, linux-kernel, philippe.cornu,
	mcoquelin.stm32, dmitry.baryshkov, shawnguo

On Thursday, December 23rd, 2021 at 12:56, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:

> > -	/* If we can't determine support, just bail */
> > -	if (!plane->funcs->format_mod_supported)
> > -		goto done;
> > -
> >  	mod = modifiers_ptr(blob_data);
> >  	for (i = 0; i < plane->modifier_count; i++) {
> >  		for (j = 0; j < plane->format_count; j++) {
> > -			if (plane->funcs->format_mod_supported(plane,
> > +			if (!plane->funcs->format_mod_supported ||
> > +			    plane->funcs->format_mod_supported(plane,
> >  							       plane->format_types[j],
> >  							       plane->modifiers[i])) {
>
> So instead of skipping the whole loop you just skip doing anything
> inside the loop? Can't see how that achieves anything at all.

No, the check is skipped when the function isn't populated by the driver.

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

* Re: [PATCH v2 1/6] drm/plane: Make format_mod_supported truly optional
@ 2021-12-23 13:42       ` Simon Ser
  0 siblings, 0 replies; 63+ messages in thread
From: Simon Ser @ 2021-12-23 13:42 UTC (permalink / raw)
  To: Ville Syrjälä
  Cc: marex, mcoquelin.stm32, kernel, s.hauer, tzimmermann, airlied,
	intel-gfx, alexandre.torgue, dri-devel, linux-kernel,
	yannick.fertre, linux-imx, benjamin.gaignard, rodrigo.vivi,
	dmitry.baryshkov, José Expósito, shawnguo, linux-stm32,
	linux-arm-kernel, philippe.cornu

On Thursday, December 23rd, 2021 at 12:56, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:

> > -	/* If we can't determine support, just bail */
> > -	if (!plane->funcs->format_mod_supported)
> > -		goto done;
> > -
> >  	mod = modifiers_ptr(blob_data);
> >  	for (i = 0; i < plane->modifier_count; i++) {
> >  		for (j = 0; j < plane->format_count; j++) {
> > -			if (plane->funcs->format_mod_supported(plane,
> > +			if (!plane->funcs->format_mod_supported ||
> > +			    plane->funcs->format_mod_supported(plane,
> >  							       plane->format_types[j],
> >  							       plane->modifiers[i])) {
>
> So instead of skipping the whole loop you just skip doing anything
> inside the loop? Can't see how that achieves anything at all.

No, the check is skipped when the function isn't populated by the driver.

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

* Re: [Intel-gfx]  [PATCH v2 1/6] drm/plane: Make format_mod_supported truly optional
@ 2021-12-23 13:42       ` Simon Ser
  0 siblings, 0 replies; 63+ messages in thread
From: Simon Ser @ 2021-12-23 13:42 UTC (permalink / raw)
  To: Ville Syrjälä
  Cc: marex, mcoquelin.stm32, kernel, s.hauer, tzimmermann, airlied,
	intel-gfx, alexandre.torgue, dri-devel, linux-kernel,
	yannick.fertre, linux-imx, benjamin.gaignard, dmitry.baryshkov,
	José Expósito, shawnguo, linux-stm32, linux-arm-kernel,
	philippe.cornu

On Thursday, December 23rd, 2021 at 12:56, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:

> > -	/* If we can't determine support, just bail */
> > -	if (!plane->funcs->format_mod_supported)
> > -		goto done;
> > -
> >  	mod = modifiers_ptr(blob_data);
> >  	for (i = 0; i < plane->modifier_count; i++) {
> >  		for (j = 0; j < plane->format_count; j++) {
> > -			if (plane->funcs->format_mod_supported(plane,
> > +			if (!plane->funcs->format_mod_supported ||
> > +			    plane->funcs->format_mod_supported(plane,
> >  							       plane->format_types[j],
> >  							       plane->modifiers[i])) {
>
> So instead of skipping the whole loop you just skip doing anything
> inside the loop? Can't see how that achieves anything at all.

No, the check is skipped when the function isn't populated by the driver.

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

* Re: [PATCH v2 1/6] drm/plane: Make format_mod_supported truly optional
@ 2021-12-23 13:42       ` Simon Ser
  0 siblings, 0 replies; 63+ messages in thread
From: Simon Ser @ 2021-12-23 13:42 UTC (permalink / raw)
  To: Ville Syrjälä
  Cc: José Expósito, airlied, alexandre.torgue,
	benjamin.gaignard, linux-stm32, marex, linux-imx, intel-gfx,
	tzimmermann, s.hauer, rodrigo.vivi, kernel, linux-arm-kernel,
	dri-devel, yannick.fertre, linux-kernel, philippe.cornu,
	mcoquelin.stm32, dmitry.baryshkov, shawnguo

On Thursday, December 23rd, 2021 at 12:56, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:

> > -	/* If we can't determine support, just bail */
> > -	if (!plane->funcs->format_mod_supported)
> > -		goto done;
> > -
> >  	mod = modifiers_ptr(blob_data);
> >  	for (i = 0; i < plane->modifier_count; i++) {
> >  		for (j = 0; j < plane->format_count; j++) {
> > -			if (plane->funcs->format_mod_supported(plane,
> > +			if (!plane->funcs->format_mod_supported ||
> > +			    plane->funcs->format_mod_supported(plane,
> >  							       plane->format_types[j],
> >  							       plane->modifiers[i])) {
>
> So instead of skipping the whole loop you just skip doing anything
> inside the loop? Can't see how that achieves anything at all.

No, the check is skipped when the function isn't populated by the driver.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2 1/6] drm/plane: Make format_mod_supported truly optional
  2021-12-23 13:42       ` Simon Ser
  (?)
  (?)
@ 2021-12-23 15:03         ` Ville Syrjälä
  -1 siblings, 0 replies; 63+ messages in thread
From: Ville Syrjälä @ 2021-12-23 15:03 UTC (permalink / raw)
  To: Simon Ser
  Cc: José Expósito, airlied, alexandre.torgue,
	benjamin.gaignard, linux-stm32, marex, linux-imx, intel-gfx,
	tzimmermann, s.hauer, rodrigo.vivi, kernel, linux-arm-kernel,
	dri-devel, yannick.fertre, linux-kernel, philippe.cornu,
	mcoquelin.stm32, dmitry.baryshkov, shawnguo

On Thu, Dec 23, 2021 at 01:42:32PM +0000, Simon Ser wrote:
> On Thursday, December 23rd, 2021 at 12:56, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> 
> > > -	/* If we can't determine support, just bail */
> > > -	if (!plane->funcs->format_mod_supported)
> > > -		goto done;
> > > -
> > >  	mod = modifiers_ptr(blob_data);
> > >  	for (i = 0; i < plane->modifier_count; i++) {
> > >  		for (j = 0; j < plane->format_count; j++) {
> > > -			if (plane->funcs->format_mod_supported(plane,
> > > +			if (!plane->funcs->format_mod_supported ||
> > > +			    plane->funcs->format_mod_supported(plane,
> > >  							       plane->format_types[j],
> > >  							       plane->modifiers[i])) {
> >
> > So instead of skipping the whole loop you just skip doing anything
> > inside the loop? Can't see how that achieves anything at all.
> 
> No, the check is skipped when the function isn't populated by the driver.

Ah right. So we advertise all modifiers in that case. Looks like
drm_plane_check_pixel_format() does support that model, so seems OK.

Another related thing that might be worth checking is whether
drivers generally do anything to validate the modifiers in
the addfb2 ioctl. Looks like i915 and amdgpu are the only ones
to use drm_any_plane_has_format() for that, so all the other
drivers must either be checking it manually (or they're just
potentially broken when handed unexpected modifiers by evil
userspace).

-- 
Ville Syrjälä
Intel

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

* Re: [PATCH v2 1/6] drm/plane: Make format_mod_supported truly optional
@ 2021-12-23 15:03         ` Ville Syrjälä
  0 siblings, 0 replies; 63+ messages in thread
From: Ville Syrjälä @ 2021-12-23 15:03 UTC (permalink / raw)
  To: Simon Ser
  Cc: marex, mcoquelin.stm32, kernel, s.hauer, tzimmermann, airlied,
	intel-gfx, alexandre.torgue, dri-devel, linux-kernel,
	yannick.fertre, linux-imx, benjamin.gaignard, rodrigo.vivi,
	dmitry.baryshkov, José Expósito, shawnguo, linux-stm32,
	linux-arm-kernel, philippe.cornu

On Thu, Dec 23, 2021 at 01:42:32PM +0000, Simon Ser wrote:
> On Thursday, December 23rd, 2021 at 12:56, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> 
> > > -	/* If we can't determine support, just bail */
> > > -	if (!plane->funcs->format_mod_supported)
> > > -		goto done;
> > > -
> > >  	mod = modifiers_ptr(blob_data);
> > >  	for (i = 0; i < plane->modifier_count; i++) {
> > >  		for (j = 0; j < plane->format_count; j++) {
> > > -			if (plane->funcs->format_mod_supported(plane,
> > > +			if (!plane->funcs->format_mod_supported ||
> > > +			    plane->funcs->format_mod_supported(plane,
> > >  							       plane->format_types[j],
> > >  							       plane->modifiers[i])) {
> >
> > So instead of skipping the whole loop you just skip doing anything
> > inside the loop? Can't see how that achieves anything at all.
> 
> No, the check is skipped when the function isn't populated by the driver.

Ah right. So we advertise all modifiers in that case. Looks like
drm_plane_check_pixel_format() does support that model, so seems OK.

Another related thing that might be worth checking is whether
drivers generally do anything to validate the modifiers in
the addfb2 ioctl. Looks like i915 and amdgpu are the only ones
to use drm_any_plane_has_format() for that, so all the other
drivers must either be checking it manually (or they're just
potentially broken when handed unexpected modifiers by evil
userspace).

-- 
Ville Syrjälä
Intel

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

* Re: [Intel-gfx]  [PATCH v2 1/6] drm/plane: Make format_mod_supported truly optional
@ 2021-12-23 15:03         ` Ville Syrjälä
  0 siblings, 0 replies; 63+ messages in thread
From: Ville Syrjälä @ 2021-12-23 15:03 UTC (permalink / raw)
  To: Simon Ser
  Cc: marex, mcoquelin.stm32, kernel, s.hauer, tzimmermann, airlied,
	intel-gfx, alexandre.torgue, dri-devel, linux-kernel,
	yannick.fertre, linux-imx, benjamin.gaignard, dmitry.baryshkov,
	José Expósito, shawnguo, linux-stm32, linux-arm-kernel,
	philippe.cornu

On Thu, Dec 23, 2021 at 01:42:32PM +0000, Simon Ser wrote:
> On Thursday, December 23rd, 2021 at 12:56, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> 
> > > -	/* If we can't determine support, just bail */
> > > -	if (!plane->funcs->format_mod_supported)
> > > -		goto done;
> > > -
> > >  	mod = modifiers_ptr(blob_data);
> > >  	for (i = 0; i < plane->modifier_count; i++) {
> > >  		for (j = 0; j < plane->format_count; j++) {
> > > -			if (plane->funcs->format_mod_supported(plane,
> > > +			if (!plane->funcs->format_mod_supported ||
> > > +			    plane->funcs->format_mod_supported(plane,
> > >  							       plane->format_types[j],
> > >  							       plane->modifiers[i])) {
> >
> > So instead of skipping the whole loop you just skip doing anything
> > inside the loop? Can't see how that achieves anything at all.
> 
> No, the check is skipped when the function isn't populated by the driver.

Ah right. So we advertise all modifiers in that case. Looks like
drm_plane_check_pixel_format() does support that model, so seems OK.

Another related thing that might be worth checking is whether
drivers generally do anything to validate the modifiers in
the addfb2 ioctl. Looks like i915 and amdgpu are the only ones
to use drm_any_plane_has_format() for that, so all the other
drivers must either be checking it manually (or they're just
potentially broken when handed unexpected modifiers by evil
userspace).

-- 
Ville Syrjälä
Intel

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

* Re: [PATCH v2 1/6] drm/plane: Make format_mod_supported truly optional
@ 2021-12-23 15:03         ` Ville Syrjälä
  0 siblings, 0 replies; 63+ messages in thread
From: Ville Syrjälä @ 2021-12-23 15:03 UTC (permalink / raw)
  To: Simon Ser
  Cc: José Expósito, airlied, alexandre.torgue,
	benjamin.gaignard, linux-stm32, marex, linux-imx, intel-gfx,
	tzimmermann, s.hauer, rodrigo.vivi, kernel, linux-arm-kernel,
	dri-devel, yannick.fertre, linux-kernel, philippe.cornu,
	mcoquelin.stm32, dmitry.baryshkov, shawnguo

On Thu, Dec 23, 2021 at 01:42:32PM +0000, Simon Ser wrote:
> On Thursday, December 23rd, 2021 at 12:56, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> 
> > > -	/* If we can't determine support, just bail */
> > > -	if (!plane->funcs->format_mod_supported)
> > > -		goto done;
> > > -
> > >  	mod = modifiers_ptr(blob_data);
> > >  	for (i = 0; i < plane->modifier_count; i++) {
> > >  		for (j = 0; j < plane->format_count; j++) {
> > > -			if (plane->funcs->format_mod_supported(plane,
> > > +			if (!plane->funcs->format_mod_supported ||
> > > +			    plane->funcs->format_mod_supported(plane,
> > >  							       plane->format_types[j],
> > >  							       plane->modifiers[i])) {
> >
> > So instead of skipping the whole loop you just skip doing anything
> > inside the loop? Can't see how that achieves anything at all.
> 
> No, the check is skipped when the function isn't populated by the driver.

Ah right. So we advertise all modifiers in that case. Looks like
drm_plane_check_pixel_format() does support that model, so seems OK.

Another related thing that might be worth checking is whether
drivers generally do anything to validate the modifiers in
the addfb2 ioctl. Looks like i915 and amdgpu are the only ones
to use drm_any_plane_has_format() for that, so all the other
drivers must either be checking it manually (or they're just
potentially broken when handed unexpected modifiers by evil
userspace).

-- 
Ville Syrjälä
Intel

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2 1/6] drm/plane: Make format_mod_supported truly optional
  2021-12-23 15:03         ` Ville Syrjälä
  (?)
  (?)
@ 2021-12-23 16:57           ` José Expósito
  -1 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-23 16:57 UTC (permalink / raw)
  To: Ville Syrjälä
  Cc: Simon Ser, airlied, alexandre.torgue, benjamin.gaignard,
	linux-stm32, marex, linux-imx, intel-gfx, tzimmermann, s.hauer,
	rodrigo.vivi, kernel, linux-arm-kernel, dri-devel,
	yannick.fertre, linux-kernel, philippe.cornu, mcoquelin.stm32,
	dmitry.baryshkov, shawnguo

Thanks for your reviews :) I'll wait a couple of days to see
if somebody else wants to comment and I'll send v3 adding the
reviewed by tags and fixing the compiler warning.

On Thu, Dec 23, 2021 at 05:03:19PM +0200, Ville Syrjälä wrote:
> Another related thing that might be worth checking is whether
> drivers generally do anything to validate the modifiers in
> the addfb2 ioctl. Looks like i915 and amdgpu are the only ones
> to use drm_any_plane_has_format() for that, so all the other
> drivers must either be checking it manually (or they're just
> potentially broken when handed unexpected modifiers by evil
> userspace).

I'm pretty new to this subsystem, so please correct me if I'm 
wrong, but after looking into a couple of drivers I think you
are right, this check is missing in some drivers.

This possible bug reminds me of this ToDo task [1]:

> Many drivers wrap drm_gem_fb_create() only to check for valid formats. For
> atomic drivers we could check for valid formats by calling
> drm_plane_check_pixel_format() against all planes, and pass if any plane
> supports the format. For non-atomic that's not possible since like the format
> list for the primary plane is fake and we'd therefor reject valid formats.

I had a look to the Raspberry Pi driver (mainly because I'm trying
to understand it) and it looks like the check is missing. Other
drivers, for example Mali, are checking the format modifier manually.

I'll try to do some actual testing during Christmas and see
how it goes.

José Expósito

[1] https://www.kernel.org/doc/html/latest/gpu/todo.html#drm-framebuffer-funcs-and-drm-mode-config-funcs-fb-create-cleanup

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

* Re: [PATCH v2 1/6] drm/plane: Make format_mod_supported truly optional
@ 2021-12-23 16:57           ` José Expósito
  0 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-23 16:57 UTC (permalink / raw)
  To: Ville Syrjälä
  Cc: marex, mcoquelin.stm32, kernel, s.hauer, tzimmermann, airlied,
	intel-gfx, alexandre.torgue, dri-devel, linux-kernel,
	yannick.fertre, linux-imx, benjamin.gaignard, rodrigo.vivi,
	dmitry.baryshkov, shawnguo, linux-stm32, linux-arm-kernel,
	philippe.cornu

Thanks for your reviews :) I'll wait a couple of days to see
if somebody else wants to comment and I'll send v3 adding the
reviewed by tags and fixing the compiler warning.

On Thu, Dec 23, 2021 at 05:03:19PM +0200, Ville Syrjälä wrote:
> Another related thing that might be worth checking is whether
> drivers generally do anything to validate the modifiers in
> the addfb2 ioctl. Looks like i915 and amdgpu are the only ones
> to use drm_any_plane_has_format() for that, so all the other
> drivers must either be checking it manually (or they're just
> potentially broken when handed unexpected modifiers by evil
> userspace).

I'm pretty new to this subsystem, so please correct me if I'm 
wrong, but after looking into a couple of drivers I think you
are right, this check is missing in some drivers.

This possible bug reminds me of this ToDo task [1]:

> Many drivers wrap drm_gem_fb_create() only to check for valid formats. For
> atomic drivers we could check for valid formats by calling
> drm_plane_check_pixel_format() against all planes, and pass if any plane
> supports the format. For non-atomic that's not possible since like the format
> list for the primary plane is fake and we'd therefor reject valid formats.

I had a look to the Raspberry Pi driver (mainly because I'm trying
to understand it) and it looks like the check is missing. Other
drivers, for example Mali, are checking the format modifier manually.

I'll try to do some actual testing during Christmas and see
how it goes.

José Expósito

[1] https://www.kernel.org/doc/html/latest/gpu/todo.html#drm-framebuffer-funcs-and-drm-mode-config-funcs-fb-create-cleanup

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

* Re: [PATCH v2 1/6] drm/plane: Make format_mod_supported truly optional
@ 2021-12-23 16:57           ` José Expósito
  0 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-23 16:57 UTC (permalink / raw)
  To: Ville Syrjälä
  Cc: Simon Ser, airlied, alexandre.torgue, benjamin.gaignard,
	linux-stm32, marex, linux-imx, intel-gfx, tzimmermann, s.hauer,
	rodrigo.vivi, kernel, linux-arm-kernel, dri-devel,
	yannick.fertre, linux-kernel, philippe.cornu, mcoquelin.stm32,
	dmitry.baryshkov, shawnguo

Thanks for your reviews :) I'll wait a couple of days to see
if somebody else wants to comment and I'll send v3 adding the
reviewed by tags and fixing the compiler warning.

On Thu, Dec 23, 2021 at 05:03:19PM +0200, Ville Syrjälä wrote:
> Another related thing that might be worth checking is whether
> drivers generally do anything to validate the modifiers in
> the addfb2 ioctl. Looks like i915 and amdgpu are the only ones
> to use drm_any_plane_has_format() for that, so all the other
> drivers must either be checking it manually (or they're just
> potentially broken when handed unexpected modifiers by evil
> userspace).

I'm pretty new to this subsystem, so please correct me if I'm 
wrong, but after looking into a couple of drivers I think you
are right, this check is missing in some drivers.

This possible bug reminds me of this ToDo task [1]:

> Many drivers wrap drm_gem_fb_create() only to check for valid formats. For
> atomic drivers we could check for valid formats by calling
> drm_plane_check_pixel_format() against all planes, and pass if any plane
> supports the format. For non-atomic that's not possible since like the format
> list for the primary plane is fake and we'd therefor reject valid formats.

I had a look to the Raspberry Pi driver (mainly because I'm trying
to understand it) and it looks like the check is missing. Other
drivers, for example Mali, are checking the format modifier manually.

I'll try to do some actual testing during Christmas and see
how it goes.

José Expósito

[1] https://www.kernel.org/doc/html/latest/gpu/todo.html#drm-framebuffer-funcs-and-drm-mode-config-funcs-fb-create-cleanup

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [Intel-gfx]  [PATCH v2 1/6] drm/plane: Make format_mod_supported truly optional
@ 2021-12-23 16:57           ` José Expósito
  0 siblings, 0 replies; 63+ messages in thread
From: José Expósito @ 2021-12-23 16:57 UTC (permalink / raw)
  To: Ville Syrjälä
  Cc: marex, mcoquelin.stm32, kernel, s.hauer, tzimmermann, airlied,
	Simon Ser, intel-gfx, alexandre.torgue, dri-devel, linux-kernel,
	yannick.fertre, linux-imx, benjamin.gaignard, dmitry.baryshkov,
	shawnguo, linux-stm32, linux-arm-kernel, philippe.cornu

Thanks for your reviews :) I'll wait a couple of days to see
if somebody else wants to comment and I'll send v3 adding the
reviewed by tags and fixing the compiler warning.

On Thu, Dec 23, 2021 at 05:03:19PM +0200, Ville Syrjälä wrote:
> Another related thing that might be worth checking is whether
> drivers generally do anything to validate the modifiers in
> the addfb2 ioctl. Looks like i915 and amdgpu are the only ones
> to use drm_any_plane_has_format() for that, so all the other
> drivers must either be checking it manually (or they're just
> potentially broken when handed unexpected modifiers by evil
> userspace).

I'm pretty new to this subsystem, so please correct me if I'm 
wrong, but after looking into a couple of drivers I think you
are right, this check is missing in some drivers.

This possible bug reminds me of this ToDo task [1]:

> Many drivers wrap drm_gem_fb_create() only to check for valid formats. For
> atomic drivers we could check for valid formats by calling
> drm_plane_check_pixel_format() against all planes, and pass if any plane
> supports the format. For non-atomic that's not possible since like the format
> list for the primary plane is fake and we'd therefor reject valid formats.

I had a look to the Raspberry Pi driver (mainly because I'm trying
to understand it) and it looks like the check is missing. Other
drivers, for example Mali, are checking the format modifier manually.

I'll try to do some actual testing during Christmas and see
how it goes.

José Expósito

[1] https://www.kernel.org/doc/html/latest/gpu/todo.html#drm-framebuffer-funcs-and-drm-mode-config-funcs-fb-create-cleanup

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

* [Intel-gfx] ✗ Fi.CI.BUILD: failure for Add missing format_mod_supported functions (rev2)
  2021-12-22  9:05 ` José Expósito
                   ` (8 preceding siblings ...)
  (?)
@ 2022-01-10 19:14 ` Patchwork
  -1 siblings, 0 replies; 63+ messages in thread
From: Patchwork @ 2022-01-10 19:14 UTC (permalink / raw)
  To: José Expósito; +Cc: intel-gfx

== Series Details ==

Series: Add missing format_mod_supported functions (rev2)
URL   : https://patchwork.freedesktop.org/series/98680/
State : failure

== Summary ==

Applying: drm/plane: Make format_mod_supported truly optional
Using index info to reconstruct a base tree...
M	drivers/gpu/drm/drm_plane.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/drm_plane.c
No changes -- Patch already applied.
Applying: drm/plane: Fix typo in format_mod_supported documentation
Using index info to reconstruct a base tree...
M	include/drm/drm_plane.h
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.
Applying: drm/simple-kms: Drop format_mod_supported function
Applying: drm/i915/display: Drop format_mod_supported function
Using index info to reconstruct a base tree...
M	drivers/gpu/drm/i915/display/intel_cursor.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/i915/display/intel_cursor.c
CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/display/intel_cursor.c
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0004 drm/i915/display: Drop format_mod_supported function
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".



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

* Re: [PATCH v2 6/6] drm/stm: ltdc: Drop format_mod_supported function
  2021-12-22  9:05   ` José Expósito
  (?)
  (?)
@ 2022-01-12  9:44     ` yannick Fertre
  -1 siblings, 0 replies; 63+ messages in thread
From: yannick Fertre @ 2022-01-12  9:44 UTC (permalink / raw)
  To: José Expósito, contact
  Cc: dmitry.baryshkov, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, jani.nikula, joonas.lahtinen, rodrigo.vivi,
	marex, stefan, shawnguo, s.hauer, kernel, festevam, linux-imx,
	philippe.cornu, benjamin.gaignard, mcoquelin.stm32,
	alexandre.torgue, dri-devel, linux-kernel, intel-gfx,
	linux-arm-kernel, linux-stm32

Hello José,
thanks for your patch.

Reviewed-by: Yannick Fertre <yannick.fertre@foss.st.com>
Tested-by: Yannick Fertre <yannick.fertre@foss.st.com>


On 12/22/21 10:05 AM, José Expósito wrote:
> The "drm_plane_funcs.format_mod_supported" can be removed in favor of
> the default implementation.
> 
> Signed-off-by: José Expósito <jose.exposito89@gmail.com>
> ---
>   drivers/gpu/drm/stm/ltdc.c | 11 -----------
>   1 file changed, 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> index dbdee954692a..ef909e50f0e4 100644
> --- a/drivers/gpu/drm/stm/ltdc.c
> +++ b/drivers/gpu/drm/stm/ltdc.c
> @@ -925,16 +925,6 @@ static void ltdc_plane_atomic_print_state(struct drm_printer *p,
>   	fpsi->counter = 0;
>   }
>   
> -static bool ltdc_plane_format_mod_supported(struct drm_plane *plane,
> -					    u32 format,
> -					    u64 modifier)
> -{
> -	if (modifier == DRM_FORMAT_MOD_LINEAR)
> -		return true;
> -
> -	return false;
> -}
> -
>   static const struct drm_plane_funcs ltdc_plane_funcs = {
>   	.update_plane = drm_atomic_helper_update_plane,
>   	.disable_plane = drm_atomic_helper_disable_plane,
> @@ -943,7 +933,6 @@ static const struct drm_plane_funcs ltdc_plane_funcs = {
>   	.atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
>   	.atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
>   	.atomic_print_state = ltdc_plane_atomic_print_state,
> -	.format_mod_supported = ltdc_plane_format_mod_supported,
>   };
>   
>   static const struct drm_plane_helper_funcs ltdc_plane_helper_funcs = {
> 

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

* Re: [PATCH v2 6/6] drm/stm: ltdc: Drop format_mod_supported function
@ 2022-01-12  9:44     ` yannick Fertre
  0 siblings, 0 replies; 63+ messages in thread
From: yannick Fertre @ 2022-01-12  9:44 UTC (permalink / raw)
  To: José Expósito, contact
  Cc: airlied, alexandre.torgue, benjamin.gaignard, linux-stm32, marex,
	linux-imx, intel-gfx, tzimmermann, s.hauer, rodrigo.vivi, kernel,
	linux-arm-kernel, dri-devel, linux-kernel, philippe.cornu,
	mcoquelin.stm32, dmitry.baryshkov, shawnguo

Hello José,
thanks for your patch.

Reviewed-by: Yannick Fertre <yannick.fertre@foss.st.com>
Tested-by: Yannick Fertre <yannick.fertre@foss.st.com>


On 12/22/21 10:05 AM, José Expósito wrote:
> The "drm_plane_funcs.format_mod_supported" can be removed in favor of
> the default implementation.
> 
> Signed-off-by: José Expósito <jose.exposito89@gmail.com>
> ---
>   drivers/gpu/drm/stm/ltdc.c | 11 -----------
>   1 file changed, 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> index dbdee954692a..ef909e50f0e4 100644
> --- a/drivers/gpu/drm/stm/ltdc.c
> +++ b/drivers/gpu/drm/stm/ltdc.c
> @@ -925,16 +925,6 @@ static void ltdc_plane_atomic_print_state(struct drm_printer *p,
>   	fpsi->counter = 0;
>   }
>   
> -static bool ltdc_plane_format_mod_supported(struct drm_plane *plane,
> -					    u32 format,
> -					    u64 modifier)
> -{
> -	if (modifier == DRM_FORMAT_MOD_LINEAR)
> -		return true;
> -
> -	return false;
> -}
> -
>   static const struct drm_plane_funcs ltdc_plane_funcs = {
>   	.update_plane = drm_atomic_helper_update_plane,
>   	.disable_plane = drm_atomic_helper_disable_plane,
> @@ -943,7 +933,6 @@ static const struct drm_plane_funcs ltdc_plane_funcs = {
>   	.atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
>   	.atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
>   	.atomic_print_state = ltdc_plane_atomic_print_state,
> -	.format_mod_supported = ltdc_plane_format_mod_supported,
>   };
>   
>   static const struct drm_plane_helper_funcs ltdc_plane_helper_funcs = {
> 

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

* Re: [PATCH v2 6/6] drm/stm: ltdc: Drop format_mod_supported function
@ 2022-01-12  9:44     ` yannick Fertre
  0 siblings, 0 replies; 63+ messages in thread
From: yannick Fertre @ 2022-01-12  9:44 UTC (permalink / raw)
  To: José Expósito, contact
  Cc: dmitry.baryshkov, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, jani.nikula, joonas.lahtinen, rodrigo.vivi,
	marex, stefan, shawnguo, s.hauer, kernel, festevam, linux-imx,
	philippe.cornu, benjamin.gaignard, mcoquelin.stm32,
	alexandre.torgue, dri-devel, linux-kernel, intel-gfx,
	linux-arm-kernel, linux-stm32

Hello José,
thanks for your patch.

Reviewed-by: Yannick Fertre <yannick.fertre@foss.st.com>
Tested-by: Yannick Fertre <yannick.fertre@foss.st.com>


On 12/22/21 10:05 AM, José Expósito wrote:
> The "drm_plane_funcs.format_mod_supported" can be removed in favor of
> the default implementation.
> 
> Signed-off-by: José Expósito <jose.exposito89@gmail.com>
> ---
>   drivers/gpu/drm/stm/ltdc.c | 11 -----------
>   1 file changed, 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> index dbdee954692a..ef909e50f0e4 100644
> --- a/drivers/gpu/drm/stm/ltdc.c
> +++ b/drivers/gpu/drm/stm/ltdc.c
> @@ -925,16 +925,6 @@ static void ltdc_plane_atomic_print_state(struct drm_printer *p,
>   	fpsi->counter = 0;
>   }
>   
> -static bool ltdc_plane_format_mod_supported(struct drm_plane *plane,
> -					    u32 format,
> -					    u64 modifier)
> -{
> -	if (modifier == DRM_FORMAT_MOD_LINEAR)
> -		return true;
> -
> -	return false;
> -}
> -
>   static const struct drm_plane_funcs ltdc_plane_funcs = {
>   	.update_plane = drm_atomic_helper_update_plane,
>   	.disable_plane = drm_atomic_helper_disable_plane,
> @@ -943,7 +933,6 @@ static const struct drm_plane_funcs ltdc_plane_funcs = {
>   	.atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
>   	.atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
>   	.atomic_print_state = ltdc_plane_atomic_print_state,
> -	.format_mod_supported = ltdc_plane_format_mod_supported,
>   };
>   
>   static const struct drm_plane_helper_funcs ltdc_plane_helper_funcs = {
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [Intel-gfx] [PATCH v2 6/6] drm/stm: ltdc: Drop format_mod_supported function
@ 2022-01-12  9:44     ` yannick Fertre
  0 siblings, 0 replies; 63+ messages in thread
From: yannick Fertre @ 2022-01-12  9:44 UTC (permalink / raw)
  To: José Expósito, contact
  Cc: airlied, alexandre.torgue, stefan, benjamin.gaignard, festevam,
	linux-stm32, marex, linux-imx, intel-gfx, tzimmermann, s.hauer,
	mripard, kernel, linux-arm-kernel, dri-devel, linux-kernel,
	philippe.cornu, mcoquelin.stm32, dmitry.baryshkov, shawnguo

Hello José,
thanks for your patch.

Reviewed-by: Yannick Fertre <yannick.fertre@foss.st.com>
Tested-by: Yannick Fertre <yannick.fertre@foss.st.com>


On 12/22/21 10:05 AM, José Expósito wrote:
> The "drm_plane_funcs.format_mod_supported" can be removed in favor of
> the default implementation.
> 
> Signed-off-by: José Expósito <jose.exposito89@gmail.com>
> ---
>   drivers/gpu/drm/stm/ltdc.c | 11 -----------
>   1 file changed, 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> index dbdee954692a..ef909e50f0e4 100644
> --- a/drivers/gpu/drm/stm/ltdc.c
> +++ b/drivers/gpu/drm/stm/ltdc.c
> @@ -925,16 +925,6 @@ static void ltdc_plane_atomic_print_state(struct drm_printer *p,
>   	fpsi->counter = 0;
>   }
>   
> -static bool ltdc_plane_format_mod_supported(struct drm_plane *plane,
> -					    u32 format,
> -					    u64 modifier)
> -{
> -	if (modifier == DRM_FORMAT_MOD_LINEAR)
> -		return true;
> -
> -	return false;
> -}
> -
>   static const struct drm_plane_funcs ltdc_plane_funcs = {
>   	.update_plane = drm_atomic_helper_update_plane,
>   	.disable_plane = drm_atomic_helper_disable_plane,
> @@ -943,7 +933,6 @@ static const struct drm_plane_funcs ltdc_plane_funcs = {
>   	.atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
>   	.atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
>   	.atomic_print_state = ltdc_plane_atomic_print_state,
> -	.format_mod_supported = ltdc_plane_format_mod_supported,
>   };
>   
>   static const struct drm_plane_helper_funcs ltdc_plane_helper_funcs = {
> 

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

* Re: [PATCH v2 6/6] drm/stm: ltdc: Drop format_mod_supported function
  2021-12-22  9:05   ` José Expósito
  (?)
  (?)
@ 2022-01-12 10:01     ` Jagan Teki
  -1 siblings, 0 replies; 63+ messages in thread
From: Jagan Teki @ 2022-01-12 10:01 UTC (permalink / raw)
  To: José Expósito
  Cc: contact, airlied, alexandre.torgue, benjamin.gaignard,
	linux-stm32, marex, linux-imx, intel-gfx, tzimmermann, s.hauer,
	rodrigo.vivi, kernel, linux-arm-kernel, dri-devel,
	yannick.fertre, linux-kernel, philippe.cornu, mcoquelin.stm32,
	dmitry.baryshkov, shawnguo

On Wed, Dec 22, 2021 at 2:36 PM José Expósito <jose.exposito89@gmail.com> wrote:
>
> The "drm_plane_funcs.format_mod_supported" can be removed in favor of
> the default implementation.
>
> Signed-off-by: José Expósito <jose.exposito89@gmail.com>
> ---

Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com> # i.Core STM32MP1

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

* Re: [PATCH v2 6/6] drm/stm: ltdc: Drop format_mod_supported function
@ 2022-01-12 10:01     ` Jagan Teki
  0 siblings, 0 replies; 63+ messages in thread
From: Jagan Teki @ 2022-01-12 10:01 UTC (permalink / raw)
  To: José Expósito
  Cc: marex, mcoquelin.stm32, kernel, s.hauer, tzimmermann, airlied,
	intel-gfx, alexandre.torgue, dri-devel, linux-kernel,
	yannick.fertre, linux-imx, benjamin.gaignard, rodrigo.vivi,
	dmitry.baryshkov, shawnguo, linux-stm32, linux-arm-kernel,
	philippe.cornu

On Wed, Dec 22, 2021 at 2:36 PM José Expósito <jose.exposito89@gmail.com> wrote:
>
> The "drm_plane_funcs.format_mod_supported" can be removed in favor of
> the default implementation.
>
> Signed-off-by: José Expósito <jose.exposito89@gmail.com>
> ---

Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com> # i.Core STM32MP1

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

* Re: [Intel-gfx] [PATCH v2 6/6] drm/stm: ltdc: Drop format_mod_supported function
@ 2022-01-12 10:01     ` Jagan Teki
  0 siblings, 0 replies; 63+ messages in thread
From: Jagan Teki @ 2022-01-12 10:01 UTC (permalink / raw)
  To: José Expósito
  Cc: marex, mcoquelin.stm32, kernel, s.hauer, tzimmermann, airlied,
	contact, intel-gfx, alexandre.torgue, dri-devel, linux-kernel,
	yannick.fertre, linux-imx, benjamin.gaignard, dmitry.baryshkov,
	shawnguo, linux-stm32, linux-arm-kernel, philippe.cornu

On Wed, Dec 22, 2021 at 2:36 PM José Expósito <jose.exposito89@gmail.com> wrote:
>
> The "drm_plane_funcs.format_mod_supported" can be removed in favor of
> the default implementation.
>
> Signed-off-by: José Expósito <jose.exposito89@gmail.com>
> ---

Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com> # i.Core STM32MP1

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

* Re: [PATCH v2 6/6] drm/stm: ltdc: Drop format_mod_supported function
@ 2022-01-12 10:01     ` Jagan Teki
  0 siblings, 0 replies; 63+ messages in thread
From: Jagan Teki @ 2022-01-12 10:01 UTC (permalink / raw)
  To: José Expósito
  Cc: contact, airlied, alexandre.torgue, benjamin.gaignard,
	linux-stm32, marex, linux-imx, intel-gfx, tzimmermann, s.hauer,
	rodrigo.vivi, kernel, linux-arm-kernel, dri-devel,
	yannick.fertre, linux-kernel, philippe.cornu, mcoquelin.stm32,
	dmitry.baryshkov, shawnguo

On Wed, Dec 22, 2021 at 2:36 PM José Expósito <jose.exposito89@gmail.com> wrote:
>
> The "drm_plane_funcs.format_mod_supported" can be removed in favor of
> the default implementation.
>
> Signed-off-by: José Expósito <jose.exposito89@gmail.com>
> ---

Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com> # i.Core STM32MP1

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2022-01-12 10:21 UTC | newest]

Thread overview: 63+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-22  9:05 [PATCH v2 0/6] Add missing format_mod_supported functions José Expósito
2021-12-22  9:05 ` [Intel-gfx] " José Expósito
2021-12-22  9:05 ` José Expósito
2021-12-22  9:05 ` José Expósito
2021-12-22  9:05 ` [PATCH v2 1/6] drm/plane: Make format_mod_supported truly optional José Expósito
2021-12-22  9:05   ` [Intel-gfx] " José Expósito
2021-12-22  9:05   ` José Expósito
2021-12-22  9:05   ` José Expósito
2021-12-22 13:10   ` kernel test robot
2021-12-22 13:10     ` kernel test robot
2021-12-23 10:10   ` Simon Ser
2021-12-23 10:10     ` Simon Ser
2021-12-23 10:10     ` [Intel-gfx] " Simon Ser
2021-12-23 10:10     ` Simon Ser
2021-12-23 11:56   ` Ville Syrjälä
2021-12-23 11:56     ` Ville Syrjälä
2021-12-23 11:56     ` [Intel-gfx] " Ville Syrjälä
2021-12-23 11:56     ` Ville Syrjälä
2021-12-23 13:42     ` Simon Ser
2021-12-23 13:42       ` Simon Ser
2021-12-23 13:42       ` [Intel-gfx] " Simon Ser
2021-12-23 13:42       ` Simon Ser
2021-12-23 15:03       ` Ville Syrjälä
2021-12-23 15:03         ` Ville Syrjälä
2021-12-23 15:03         ` [Intel-gfx] " Ville Syrjälä
2021-12-23 15:03         ` Ville Syrjälä
2021-12-23 16:57         ` José Expósito
2021-12-23 16:57           ` [Intel-gfx] " José Expósito
2021-12-23 16:57           ` José Expósito
2021-12-23 16:57           ` José Expósito
2021-12-22  9:05 ` [PATCH v2 2/6] drm/plane: Fix typo in format_mod_supported documentation José Expósito
2021-12-22  9:05   ` [Intel-gfx] " José Expósito
2021-12-22  9:05   ` José Expósito
2021-12-22  9:05   ` José Expósito
2021-12-23 10:07   ` Simon Ser
2021-12-23 10:07     ` Simon Ser
2021-12-23 10:07     ` [Intel-gfx] " Simon Ser
2021-12-23 10:07     ` Simon Ser
2021-12-22  9:05 ` [PATCH v2 3/6] drm/simple-kms: Drop format_mod_supported function José Expósito
2021-12-22  9:05   ` [Intel-gfx] " José Expósito
2021-12-22  9:05   ` José Expósito
2021-12-22  9:05   ` José Expósito
2021-12-22  9:05 ` [PATCH v2 4/6] drm/i915/display: " José Expósito
2021-12-22  9:05   ` [Intel-gfx] " José Expósito
2021-12-22  9:05   ` José Expósito
2021-12-22  9:05   ` José Expósito
2021-12-22  9:05 ` [PATCH v2 5/6] drm: mxsfb: " José Expósito
2021-12-22  9:05   ` [Intel-gfx] " José Expósito
2021-12-22  9:05   ` José Expósito
2021-12-22  9:05   ` José Expósito
2021-12-22  9:05 ` [PATCH v2 6/6] drm/stm: ltdc: " José Expósito
2021-12-22  9:05   ` [Intel-gfx] " José Expósito
2021-12-22  9:05   ` José Expósito
2021-12-22  9:05   ` José Expósito
2022-01-12  9:44   ` yannick Fertre
2022-01-12  9:44     ` [Intel-gfx] " yannick Fertre
2022-01-12  9:44     ` yannick Fertre
2022-01-12  9:44     ` yannick Fertre
2022-01-12 10:01   ` Jagan Teki
2022-01-12 10:01     ` Jagan Teki
2022-01-12 10:01     ` [Intel-gfx] " Jagan Teki
2022-01-12 10:01     ` Jagan Teki
2022-01-10 19:14 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for Add missing format_mod_supported functions (rev2) Patchwork

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.