* [PATCH 0/8] drm/plane-helpers: Minor clean ups
@ 2023-11-28 10:45 Thomas Zimmermann
2023-11-28 10:45 ` [PATCH 1/8] drm/plane-helper: Move drm_plane_helper_atomic_check() into udl Thomas Zimmermann
` (7 more replies)
0 siblings, 8 replies; 20+ messages in thread
From: Thomas Zimmermann @ 2023-11-28 10:45 UTC (permalink / raw)
To: mripard, maarten.lankhorst, daniel, airlied, suijingfeng
Cc: dri-devel, javierm, amd-gfx, linux-renesas-soc, laurent.pinchart,
Thomas Zimmermann, linux-arm-kernel
Move drm_plane_helper_atomic_check() into udl, which is the only
driver using it. Remove several unnecessary include statements for
<drm/drm_plane_helper.h>.
Thomas Zimmermann (8):
drm/plane-helper: Move drm_plane_helper_atomic_check() into udl
drm/amdgpu: Do not include <drm/drm_plane_helper.h>
drm/loongson: Do not include <drm/drm_plane_helper.h>
drm/shmobile: Do not include <drm/drm_plane_helper.h>
drm/solomon: Do not include <drm/drm_plane_helper.h>
drm/ofdrm: Do not include <drm/drm_plane_helper.h>
drm/simpledrm: Do not include <drm/drm_plane_helper.h>
drm/xlnx: Do not include <drm/drm_plane_helper.h>
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 -
drivers/gpu/drm/drm_plane_helper.c | 32 -------------------
drivers/gpu/drm/loongson/lsdc_plane.c | 1 -
.../drm/renesas/shmobile/shmob_drm_plane.c | 1 -
drivers/gpu/drm/solomon/ssd130x.h | 1 -
drivers/gpu/drm/tiny/ofdrm.c | 1 -
drivers/gpu/drm/tiny/simpledrm.c | 1 -
drivers/gpu/drm/udl/udl_modeset.c | 19 +++++++++--
drivers/gpu/drm/xlnx/zynqmp_kms.c | 1 -
include/drm/drm_plane_helper.h | 2 --
10 files changed, 17 insertions(+), 43 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 1/8] drm/plane-helper: Move drm_plane_helper_atomic_check() into udl
2023-11-28 10:45 [PATCH 0/8] drm/plane-helpers: Minor clean ups Thomas Zimmermann
@ 2023-11-28 10:45 ` Thomas Zimmermann
2023-12-01 2:36 ` [1/8] " Sui Jingfeng
2023-11-28 10:45 ` [PATCH 2/8] drm/amdgpu: Do not include <drm/drm_plane_helper.h> Thomas Zimmermann
` (6 subsequent siblings)
7 siblings, 1 reply; 20+ messages in thread
From: Thomas Zimmermann @ 2023-11-28 10:45 UTC (permalink / raw)
To: mripard, maarten.lankhorst, daniel, airlied, suijingfeng
Cc: dri-devel, javierm, amd-gfx, linux-renesas-soc, laurent.pinchart,
Thomas Zimmermann, linux-arm-kernel
The udl driver is the only caller of drm_plane_helper_atomic_check().
Move the function into the driver. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/gpu/drm/drm_plane_helper.c | 32 ------------------------------
drivers/gpu/drm/udl/udl_modeset.c | 19 ++++++++++++++++--
include/drm/drm_plane_helper.h | 2 --
3 files changed, 17 insertions(+), 36 deletions(-)
diff --git a/drivers/gpu/drm/drm_plane_helper.c b/drivers/gpu/drm/drm_plane_helper.c
index 5e95089676ff8..7982be4b0306d 100644
--- a/drivers/gpu/drm/drm_plane_helper.c
+++ b/drivers/gpu/drm/drm_plane_helper.c
@@ -279,35 +279,3 @@ void drm_plane_helper_destroy(struct drm_plane *plane)
kfree(plane);
}
EXPORT_SYMBOL(drm_plane_helper_destroy);
-
-/**
- * drm_plane_helper_atomic_check() - Helper to check plane atomic-state
- * @plane: plane to check
- * @state: atomic state object
- *
- * Provides a default plane-state check handler for planes whose atomic-state
- * scale and positioning are not expected to change since the plane is always
- * a fullscreen scanout buffer.
- *
- * This is often the case for the primary plane of simple framebuffers. See
- * also drm_crtc_helper_atomic_check() for the respective CRTC-state check
- * helper function.
- *
- * RETURNS:
- * Zero on success, or an errno code otherwise.
- */
-int drm_plane_helper_atomic_check(struct drm_plane *plane, struct drm_atomic_state *state)
-{
- struct drm_plane_state *new_plane_state = drm_atomic_get_new_plane_state(state, plane);
- struct drm_crtc *new_crtc = new_plane_state->crtc;
- struct drm_crtc_state *new_crtc_state = NULL;
-
- if (new_crtc)
- new_crtc_state = drm_atomic_get_new_crtc_state(state, new_crtc);
-
- return drm_atomic_helper_check_plane_state(new_plane_state, new_crtc_state,
- DRM_PLANE_NO_SCALING,
- DRM_PLANE_NO_SCALING,
- false, false);
-}
-EXPORT_SYMBOL(drm_plane_helper_atomic_check);
diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c
index 40876bcdd79a4..7702359c90c22 100644
--- a/drivers/gpu/drm/udl/udl_modeset.c
+++ b/drivers/gpu/drm/udl/udl_modeset.c
@@ -21,7 +21,6 @@
#include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_gem_shmem_helper.h>
#include <drm/drm_modeset_helper_vtables.h>
-#include <drm/drm_plane_helper.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_vblank.h>
@@ -261,6 +260,22 @@ static const uint64_t udl_primary_plane_fmtmods[] = {
DRM_FORMAT_MOD_INVALID
};
+static int udl_primary_plane_helper_atomic_check(struct drm_plane *plane,
+ struct drm_atomic_state *state)
+{
+ struct drm_plane_state *new_plane_state = drm_atomic_get_new_plane_state(state, plane);
+ struct drm_crtc *new_crtc = new_plane_state->crtc;
+ struct drm_crtc_state *new_crtc_state = NULL;
+
+ if (new_crtc)
+ new_crtc_state = drm_atomic_get_new_crtc_state(state, new_crtc);
+
+ return drm_atomic_helper_check_plane_state(new_plane_state, new_crtc_state,
+ DRM_PLANE_NO_SCALING,
+ DRM_PLANE_NO_SCALING,
+ false, false);
+}
+
static void udl_primary_plane_helper_atomic_update(struct drm_plane *plane,
struct drm_atomic_state *state)
{
@@ -296,7 +311,7 @@ static void udl_primary_plane_helper_atomic_update(struct drm_plane *plane,
static const struct drm_plane_helper_funcs udl_primary_plane_helper_funcs = {
DRM_GEM_SHADOW_PLANE_HELPER_FUNCS,
- .atomic_check = drm_plane_helper_atomic_check,
+ .atomic_check = udl_primary_plane_helper_atomic_check,
.atomic_update = udl_primary_plane_helper_atomic_update,
};
diff --git a/include/drm/drm_plane_helper.h b/include/drm/drm_plane_helper.h
index 3a574e8cd22f4..75f9c4830564a 100644
--- a/include/drm/drm_plane_helper.h
+++ b/include/drm/drm_plane_helper.h
@@ -26,7 +26,6 @@
#include <linux/types.h>
-struct drm_atomic_state;
struct drm_crtc;
struct drm_framebuffer;
struct drm_modeset_acquire_ctx;
@@ -42,7 +41,6 @@ int drm_plane_helper_update_primary(struct drm_plane *plane, struct drm_crtc *cr
int drm_plane_helper_disable_primary(struct drm_plane *plane,
struct drm_modeset_acquire_ctx *ctx);
void drm_plane_helper_destroy(struct drm_plane *plane);
-int drm_plane_helper_atomic_check(struct drm_plane *plane, struct drm_atomic_state *state);
/**
* DRM_PLANE_NON_ATOMIC_FUNCS - Default plane functions for non-atomic drivers
--
2.43.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 2/8] drm/amdgpu: Do not include <drm/drm_plane_helper.h>
2023-11-28 10:45 [PATCH 0/8] drm/plane-helpers: Minor clean ups Thomas Zimmermann
2023-11-28 10:45 ` [PATCH 1/8] drm/plane-helper: Move drm_plane_helper_atomic_check() into udl Thomas Zimmermann
@ 2023-11-28 10:45 ` Thomas Zimmermann
2023-11-28 10:45 ` [PATCH 3/8] drm/loongson: " Thomas Zimmermann
` (5 subsequent siblings)
7 siblings, 0 replies; 20+ messages in thread
From: Thomas Zimmermann @ 2023-11-28 10:45 UTC (permalink / raw)
To: mripard, maarten.lankhorst, daniel, airlied, suijingfeng
Cc: dri-devel, javierm, amd-gfx, linux-renesas-soc, laurent.pinchart,
Thomas Zimmermann, linux-arm-kernel
Remove unnecessary include statements for <drm/drm_plane_helper.h>.
The file contains helpers for non-atomic code and should not be
required by most drivers. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index aa43f1761acd3..b8c3a9b104a41 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -92,7 +92,6 @@
#include <drm/drm_vblank.h>
#include <drm/drm_audio_component.h>
#include <drm/drm_gem_atomic_helper.h>
-#include <drm/drm_plane_helper.h>
#include <acpi/video.h>
--
2.43.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 3/8] drm/loongson: Do not include <drm/drm_plane_helper.h>
2023-11-28 10:45 [PATCH 0/8] drm/plane-helpers: Minor clean ups Thomas Zimmermann
2023-11-28 10:45 ` [PATCH 1/8] drm/plane-helper: Move drm_plane_helper_atomic_check() into udl Thomas Zimmermann
2023-11-28 10:45 ` [PATCH 2/8] drm/amdgpu: Do not include <drm/drm_plane_helper.h> Thomas Zimmermann
@ 2023-11-28 10:45 ` Thomas Zimmermann
2023-11-28 11:37 ` [3/8] " Sui Jingfeng
2023-11-28 10:45 ` [PATCH 4/8] drm/shmobile: " Thomas Zimmermann
` (4 subsequent siblings)
7 siblings, 1 reply; 20+ messages in thread
From: Thomas Zimmermann @ 2023-11-28 10:45 UTC (permalink / raw)
To: mripard, maarten.lankhorst, daniel, airlied, suijingfeng
Cc: dri-devel, javierm, amd-gfx, linux-renesas-soc, laurent.pinchart,
Thomas Zimmermann, linux-arm-kernel
Remove unnecessary include statements for <drm/drm_plane_helper.h>.
The file contains helpers for non-atomic code and should not be
required by most drivers. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/gpu/drm/loongson/lsdc_plane.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/loongson/lsdc_plane.c b/drivers/gpu/drm/loongson/lsdc_plane.c
index 0d50946332229..d227a2c1dcf16 100644
--- a/drivers/gpu/drm/loongson/lsdc_plane.c
+++ b/drivers/gpu/drm/loongson/lsdc_plane.c
@@ -9,7 +9,6 @@
#include <drm/drm_atomic_helper.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_gem_atomic_helper.h>
-#include <drm/drm_plane_helper.h>
#include "lsdc_drv.h"
#include "lsdc_regs.h"
--
2.43.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 4/8] drm/shmobile: Do not include <drm/drm_plane_helper.h>
2023-11-28 10:45 [PATCH 0/8] drm/plane-helpers: Minor clean ups Thomas Zimmermann
` (2 preceding siblings ...)
2023-11-28 10:45 ` [PATCH 3/8] drm/loongson: " Thomas Zimmermann
@ 2023-11-28 10:45 ` Thomas Zimmermann
2023-11-28 13:16 ` Geert Uytterhoeven
2023-11-28 10:45 ` [PATCH 5/8] drm/solomon: " Thomas Zimmermann
` (3 subsequent siblings)
7 siblings, 1 reply; 20+ messages in thread
From: Thomas Zimmermann @ 2023-11-28 10:45 UTC (permalink / raw)
To: mripard, maarten.lankhorst, daniel, airlied, suijingfeng
Cc: dri-devel, javierm, amd-gfx, linux-renesas-soc, laurent.pinchart,
Thomas Zimmermann, linux-arm-kernel
Remove unnecessary include statements for <drm/drm_plane_helper.h>.
The file contains helpers for non-atomic code and should not be
required by most drivers. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c b/drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c
index 8f9a728affde8..07ad17d24294d 100644
--- a/drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c
+++ b/drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c
@@ -14,7 +14,6 @@
#include <drm/drm_fourcc.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_gem_dma_helper.h>
-#include <drm/drm_plane_helper.h>
#include "shmob_drm_drv.h"
#include "shmob_drm_kms.h"
--
2.43.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 5/8] drm/solomon: Do not include <drm/drm_plane_helper.h>
2023-11-28 10:45 [PATCH 0/8] drm/plane-helpers: Minor clean ups Thomas Zimmermann
` (3 preceding siblings ...)
2023-11-28 10:45 ` [PATCH 4/8] drm/shmobile: " Thomas Zimmermann
@ 2023-11-28 10:45 ` Thomas Zimmermann
2023-11-28 13:16 ` Geert Uytterhoeven
2023-12-01 8:42 ` Javier Martinez Canillas
2023-11-28 10:45 ` [PATCH 6/8] drm/ofdrm: " Thomas Zimmermann
` (2 subsequent siblings)
7 siblings, 2 replies; 20+ messages in thread
From: Thomas Zimmermann @ 2023-11-28 10:45 UTC (permalink / raw)
To: mripard, maarten.lankhorst, daniel, airlied, suijingfeng
Cc: dri-devel, javierm, amd-gfx, linux-renesas-soc, laurent.pinchart,
Thomas Zimmermann, linux-arm-kernel
Remove unnecessary include statements for <drm/drm_plane_helper.h>.
The file contains helpers for non-atomic code and should not be
required by most drivers. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/gpu/drm/solomon/ssd130x.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/solomon/ssd130x.h b/drivers/gpu/drm/solomon/ssd130x.h
index acf7cedf0c1ab..075c5c3ee75ac 100644
--- a/drivers/gpu/drm/solomon/ssd130x.h
+++ b/drivers/gpu/drm/solomon/ssd130x.h
@@ -17,7 +17,6 @@
#include <drm/drm_crtc.h>
#include <drm/drm_drv.h>
#include <drm/drm_encoder.h>
-#include <drm/drm_plane_helper.h>
#include <linux/regmap.h>
--
2.43.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 6/8] drm/ofdrm: Do not include <drm/drm_plane_helper.h>
2023-11-28 10:45 [PATCH 0/8] drm/plane-helpers: Minor clean ups Thomas Zimmermann
` (4 preceding siblings ...)
2023-11-28 10:45 ` [PATCH 5/8] drm/solomon: " Thomas Zimmermann
@ 2023-11-28 10:45 ` Thomas Zimmermann
2023-11-28 12:01 ` [6/8] " Sui Jingfeng
2023-11-28 10:45 ` [PATCH 7/8] drm/simpledrm: " Thomas Zimmermann
2023-11-28 10:45 ` [PATCH 8/8] drm/xlnx: " Thomas Zimmermann
7 siblings, 1 reply; 20+ messages in thread
From: Thomas Zimmermann @ 2023-11-28 10:45 UTC (permalink / raw)
To: mripard, maarten.lankhorst, daniel, airlied, suijingfeng
Cc: dri-devel, javierm, amd-gfx, linux-renesas-soc, laurent.pinchart,
Thomas Zimmermann, linux-arm-kernel
Remove unnecessary include statements for <drm/drm_plane_helper.h>.
The file contains helpers for non-atomic code and should not be
required by most drivers. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/gpu/drm/tiny/ofdrm.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/tiny/ofdrm.c b/drivers/gpu/drm/tiny/ofdrm.c
index 05a72473cfc65..ab89b7fc7bf61 100644
--- a/drivers/gpu/drm/tiny/ofdrm.c
+++ b/drivers/gpu/drm/tiny/ofdrm.c
@@ -19,7 +19,6 @@
#include <drm/drm_gem_shmem_helper.h>
#include <drm/drm_managed.h>
#include <drm/drm_modeset_helper_vtables.h>
-#include <drm/drm_plane_helper.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_simple_kms_helper.h>
--
2.43.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 7/8] drm/simpledrm: Do not include <drm/drm_plane_helper.h>
2023-11-28 10:45 [PATCH 0/8] drm/plane-helpers: Minor clean ups Thomas Zimmermann
` (5 preceding siblings ...)
2023-11-28 10:45 ` [PATCH 6/8] drm/ofdrm: " Thomas Zimmermann
@ 2023-11-28 10:45 ` Thomas Zimmermann
2023-11-28 11:47 ` [7/8] " Sui Jingfeng
2023-11-28 10:45 ` [PATCH 8/8] drm/xlnx: " Thomas Zimmermann
7 siblings, 1 reply; 20+ messages in thread
From: Thomas Zimmermann @ 2023-11-28 10:45 UTC (permalink / raw)
To: mripard, maarten.lankhorst, daniel, airlied, suijingfeng
Cc: dri-devel, javierm, amd-gfx, linux-renesas-soc, laurent.pinchart,
Thomas Zimmermann, linux-arm-kernel
Remove unnecessary include statements for <drm/drm_plane_helper.h>.
The file contains helpers for non-atomic code and should not be
required by most drivers. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/gpu/drm/tiny/simpledrm.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/tiny/simpledrm.c b/drivers/gpu/drm/tiny/simpledrm.c
index 34bbbd7b53dd9..7ce1c46176750 100644
--- a/drivers/gpu/drm/tiny/simpledrm.c
+++ b/drivers/gpu/drm/tiny/simpledrm.c
@@ -25,7 +25,6 @@
#include <drm/drm_gem_shmem_helper.h>
#include <drm/drm_managed.h>
#include <drm/drm_modeset_helper_vtables.h>
-#include <drm/drm_plane_helper.h>
#include <drm/drm_probe_helper.h>
#define DRIVER_NAME "simpledrm"
--
2.43.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 8/8] drm/xlnx: Do not include <drm/drm_plane_helper.h>
2023-11-28 10:45 [PATCH 0/8] drm/plane-helpers: Minor clean ups Thomas Zimmermann
` (6 preceding siblings ...)
2023-11-28 10:45 ` [PATCH 7/8] drm/simpledrm: " Thomas Zimmermann
@ 2023-11-28 10:45 ` Thomas Zimmermann
2023-11-28 11:02 ` Laurent Pinchart
7 siblings, 1 reply; 20+ messages in thread
From: Thomas Zimmermann @ 2023-11-28 10:45 UTC (permalink / raw)
To: mripard, maarten.lankhorst, daniel, airlied, suijingfeng
Cc: dri-devel, javierm, amd-gfx, linux-renesas-soc, laurent.pinchart,
Thomas Zimmermann, linux-arm-kernel
Remove unnecessary include statements for <drm/drm_plane_helper.h>.
The file contains helpers for non-atomic code and should not be
required by most drivers. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/gpu/drm/xlnx/zynqmp_kms.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/xlnx/zynqmp_kms.c b/drivers/gpu/drm/xlnx/zynqmp_kms.c
index a7f8611be6f42..db3bb4afbfc46 100644
--- a/drivers/gpu/drm/xlnx/zynqmp_kms.c
+++ b/drivers/gpu/drm/xlnx/zynqmp_kms.c
@@ -27,7 +27,6 @@
#include <drm/drm_managed.h>
#include <drm/drm_mode_config.h>
#include <drm/drm_plane.h>
-#include <drm/drm_plane_helper.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_simple_kms_helper.h>
#include <drm/drm_vblank.h>
--
2.43.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH 8/8] drm/xlnx: Do not include <drm/drm_plane_helper.h>
2023-11-28 10:45 ` [PATCH 8/8] drm/xlnx: " Thomas Zimmermann
@ 2023-11-28 11:02 ` Laurent Pinchart
2023-11-28 14:13 ` Thomas Zimmermann
0 siblings, 1 reply; 20+ messages in thread
From: Laurent Pinchart @ 2023-11-28 11:02 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: amd-gfx, suijingfeng, javierm, mripard, linux-renesas-soc,
dri-devel, linux-arm-kernel
Hi Thomas,
Thank you for the patch.
On Tue, Nov 28, 2023 at 11:45:24AM +0100, Thomas Zimmermann wrote:
> Remove unnecessary include statements for <drm/drm_plane_helper.h>.
> The file contains helpers for non-atomic code and should not be
> required by most drivers. No functional changes.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Assuming you've compile-tested the driver,
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Please get this merged through drm-misc as part of the series if
possible.
> ---
> drivers/gpu/drm/xlnx/zynqmp_kms.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xlnx/zynqmp_kms.c b/drivers/gpu/drm/xlnx/zynqmp_kms.c
> index a7f8611be6f42..db3bb4afbfc46 100644
> --- a/drivers/gpu/drm/xlnx/zynqmp_kms.c
> +++ b/drivers/gpu/drm/xlnx/zynqmp_kms.c
> @@ -27,7 +27,6 @@
> #include <drm/drm_managed.h>
> #include <drm/drm_mode_config.h>
> #include <drm/drm_plane.h>
> -#include <drm/drm_plane_helper.h>
> #include <drm/drm_probe_helper.h>
> #include <drm/drm_simple_kms_helper.h>
> #include <drm/drm_vblank.h>
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [3/8] drm/loongson: Do not include <drm/drm_plane_helper.h>
2023-11-28 10:45 ` [PATCH 3/8] drm/loongson: " Thomas Zimmermann
@ 2023-11-28 11:37 ` Sui Jingfeng
0 siblings, 0 replies; 20+ messages in thread
From: Sui Jingfeng @ 2023-11-28 11:37 UTC (permalink / raw)
To: Thomas Zimmermann, mripard, maarten.lankhorst, daniel, airlied
Cc: javierm, amd-gfx, linux-renesas-soc, dri-devel, linux-arm-kernel,
laurent.pinchart
Hi,
Thank you for the patch.
On 2023/11/28 18:45, Thomas Zimmermann wrote:
> Remove unnecessary include statements for <drm/drm_plane_helper.h>.
> The file contains helpers for non-atomic code and should not be
> required by most drivers. No functional changes.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sui Jingfeng <suijingfeng@loongson.cn>
Tested-by: Sui Jingfeng <suijingfeng@loongson.cn>
> ---
> drivers/gpu/drm/loongson/lsdc_plane.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/loongson/lsdc_plane.c b/drivers/gpu/drm/loongson/lsdc_plane.c
> index 0d50946332229..d227a2c1dcf16 100644
> --- a/drivers/gpu/drm/loongson/lsdc_plane.c
> +++ b/drivers/gpu/drm/loongson/lsdc_plane.c
> @@ -9,7 +9,6 @@
> #include <drm/drm_atomic_helper.h>
> #include <drm/drm_framebuffer.h>
> #include <drm/drm_gem_atomic_helper.h>
> -#include <drm/drm_plane_helper.h>
>
> #include "lsdc_drv.h"
> #include "lsdc_regs.h"
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [7/8] drm/simpledrm: Do not include <drm/drm_plane_helper.h>
2023-11-28 10:45 ` [PATCH 7/8] drm/simpledrm: " Thomas Zimmermann
@ 2023-11-28 11:47 ` Sui Jingfeng
0 siblings, 0 replies; 20+ messages in thread
From: Sui Jingfeng @ 2023-11-28 11:47 UTC (permalink / raw)
To: Thomas Zimmermann, mripard, maarten.lankhorst, daniel, airlied
Cc: javierm, amd-gfx, linux-renesas-soc, dri-devel, linux-arm-kernel,
laurent.pinchart
Hi,
On 2023/11/28 18:45, Thomas Zimmermann wrote:
> Remove unnecessary include statements for <drm/drm_plane_helper.h>.
> The file contains helpers for non-atomic code and should not be
> required by most drivers. No functional changes.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sui Jingfeng <suijingfeng@loongson.cn>
> ---
> drivers/gpu/drm/tiny/simpledrm.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/tiny/simpledrm.c b/drivers/gpu/drm/tiny/simpledrm.c
> index 34bbbd7b53dd9..7ce1c46176750 100644
> --- a/drivers/gpu/drm/tiny/simpledrm.c
> +++ b/drivers/gpu/drm/tiny/simpledrm.c
> @@ -25,7 +25,6 @@
> #include <drm/drm_gem_shmem_helper.h>
> #include <drm/drm_managed.h>
> #include <drm/drm_modeset_helper_vtables.h>
> -#include <drm/drm_plane_helper.h>
> #include <drm/drm_probe_helper.h>
>
> #define DRIVER_NAME "simpledrm"
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [6/8] drm/ofdrm: Do not include <drm/drm_plane_helper.h>
2023-11-28 10:45 ` [PATCH 6/8] drm/ofdrm: " Thomas Zimmermann
@ 2023-11-28 12:01 ` Sui Jingfeng
0 siblings, 0 replies; 20+ messages in thread
From: Sui Jingfeng @ 2023-11-28 12:01 UTC (permalink / raw)
To: Thomas Zimmermann, mripard, maarten.lankhorst, daniel, airlied
Cc: javierm, amd-gfx, linux-renesas-soc, dri-devel, linux-arm-kernel,
laurent.pinchart
Hi,
On 2023/11/28 18:45, Thomas Zimmermann wrote:
> Remove unnecessary include statements for <drm/drm_plane_helper.h>.
> The file contains helpers for non-atomic code and should not be
> required by most drivers. No functional changes.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sui Jingfeng <suijingfeng@loongson.cn>
> ---
> drivers/gpu/drm/tiny/ofdrm.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/tiny/ofdrm.c b/drivers/gpu/drm/tiny/ofdrm.c
> index 05a72473cfc65..ab89b7fc7bf61 100644
> --- a/drivers/gpu/drm/tiny/ofdrm.c
> +++ b/drivers/gpu/drm/tiny/ofdrm.c
> @@ -19,7 +19,6 @@
> #include <drm/drm_gem_shmem_helper.h>
> #include <drm/drm_managed.h>
> #include <drm/drm_modeset_helper_vtables.h>
> -#include <drm/drm_plane_helper.h>
> #include <drm/drm_probe_helper.h>
> #include <drm/drm_simple_kms_helper.h>
>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 5/8] drm/solomon: Do not include <drm/drm_plane_helper.h>
2023-11-28 10:45 ` [PATCH 5/8] drm/solomon: " Thomas Zimmermann
@ 2023-11-28 13:16 ` Geert Uytterhoeven
2023-12-01 8:42 ` Javier Martinez Canillas
1 sibling, 0 replies; 20+ messages in thread
From: Geert Uytterhoeven @ 2023-11-28 13:16 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: amd-gfx, suijingfeng, dri-devel, javierm, mripard,
linux-renesas-soc, laurent.pinchart, linux-arm-kernel
On Tue, Nov 28, 2023 at 11:47 AM Thomas Zimmermann <tzimmermann@suse.de> wrote:
> Remove unnecessary include statements for <drm/drm_plane_helper.h>.
> The file contains helpers for non-atomic code and should not be
> required by most drivers. No functional changes.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 4/8] drm/shmobile: Do not include <drm/drm_plane_helper.h>
2023-11-28 10:45 ` [PATCH 4/8] drm/shmobile: " Thomas Zimmermann
@ 2023-11-28 13:16 ` Geert Uytterhoeven
0 siblings, 0 replies; 20+ messages in thread
From: Geert Uytterhoeven @ 2023-11-28 13:16 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: amd-gfx, suijingfeng, dri-devel, javierm, mripard,
linux-renesas-soc, laurent.pinchart, linux-arm-kernel
On Tue, Nov 28, 2023 at 11:47 AM Thomas Zimmermann <tzimmermann@suse.de> wrote:
> Remove unnecessary include statements for <drm/drm_plane_helper.h>.
> The file contains helpers for non-atomic code and should not be
> required by most drivers. No functional changes.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 8/8] drm/xlnx: Do not include <drm/drm_plane_helper.h>
2023-11-28 11:02 ` Laurent Pinchart
@ 2023-11-28 14:13 ` Thomas Zimmermann
0 siblings, 0 replies; 20+ messages in thread
From: Thomas Zimmermann @ 2023-11-28 14:13 UTC (permalink / raw)
To: Laurent Pinchart
Cc: amd-gfx, suijingfeng, javierm, mripard, linux-renesas-soc,
dri-devel, linux-arm-kernel
[-- Attachment #1.1: Type: text/plain, Size: 1558 bytes --]
Hi
Am 28.11.23 um 12:02 schrieb Laurent Pinchart:
> Hi Thomas,
>
> Thank you for the patch.
>
> On Tue, Nov 28, 2023 at 11:45:24AM +0100, Thomas Zimmermann wrote:
>> Remove unnecessary include statements for <drm/drm_plane_helper.h>.
>> The file contains helpers for non-atomic code and should not be
>> required by most drivers. No functional changes.
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>
> Assuming you've compile-tested the driver,
I've COMPILE_TEST'ed the driver on aarch64.
>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>
> Please get this merged through drm-misc as part of the series if
> possible.
Sure.
Best regards
Thomas
>
>> ---
>> drivers/gpu/drm/xlnx/zynqmp_kms.c | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/xlnx/zynqmp_kms.c b/drivers/gpu/drm/xlnx/zynqmp_kms.c
>> index a7f8611be6f42..db3bb4afbfc46 100644
>> --- a/drivers/gpu/drm/xlnx/zynqmp_kms.c
>> +++ b/drivers/gpu/drm/xlnx/zynqmp_kms.c
>> @@ -27,7 +27,6 @@
>> #include <drm/drm_managed.h>
>> #include <drm/drm_mode_config.h>
>> #include <drm/drm_plane.h>
>> -#include <drm/drm_plane_helper.h>
>> #include <drm/drm_probe_helper.h>
>> #include <drm/drm_simple_kms_helper.h>
>> #include <drm/drm_vblank.h>
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [1/8] drm/plane-helper: Move drm_plane_helper_atomic_check() into udl
2023-11-28 10:45 ` [PATCH 1/8] drm/plane-helper: Move drm_plane_helper_atomic_check() into udl Thomas Zimmermann
@ 2023-12-01 2:36 ` Sui Jingfeng
2023-12-01 8:22 ` Thomas Zimmermann
0 siblings, 1 reply; 20+ messages in thread
From: Sui Jingfeng @ 2023-12-01 2:36 UTC (permalink / raw)
To: Thomas Zimmermann, mripard, maarten.lankhorst, daniel, airlied
Cc: javierm, amd-gfx, linux-renesas-soc, dri-devel, linux-arm-kernel,
laurent.pinchart
Hi,
On 2023/11/28 18:45, Thomas Zimmermann wrote:
> The udl driver is the only caller of drm_plane_helper_atomic_check().
> Move the function into the driver. No functional changes.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
> drivers/gpu/drm/drm_plane_helper.c | 32 ------------------------------
> drivers/gpu/drm/udl/udl_modeset.c | 19 ++++++++++++++++--
> include/drm/drm_plane_helper.h | 2 --
> 3 files changed, 17 insertions(+), 36 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_plane_helper.c b/drivers/gpu/drm/drm_plane_helper.c
> index 5e95089676ff8..7982be4b0306d 100644
> --- a/drivers/gpu/drm/drm_plane_helper.c
> +++ b/drivers/gpu/drm/drm_plane_helper.c
> @@ -279,35 +279,3 @@ void drm_plane_helper_destroy(struct drm_plane *plane)
> kfree(plane);
> }
> EXPORT_SYMBOL(drm_plane_helper_destroy);
> -
> -/**
> - * drm_plane_helper_atomic_check() - Helper to check plane atomic-state
> - * @plane: plane to check
> - * @state: atomic state object
> - *
> - * Provides a default plane-state check handler for planes whose atomic-state
> - * scale and positioning are not expected to change since the plane is always
> - * a fullscreen scanout buffer.
> - *
> - * This is often the case for the primary plane of simple framebuffers. See
> - * also drm_crtc_helper_atomic_check() for the respective CRTC-state check
> - * helper function.
> - *
> - * RETURNS:
> - * Zero on success, or an errno code otherwise.
> - */
> -int drm_plane_helper_atomic_check(struct drm_plane *plane, struct drm_atomic_state *state)
> -{
> - struct drm_plane_state *new_plane_state = drm_atomic_get_new_plane_state(state, plane);
> - struct drm_crtc *new_crtc = new_plane_state->crtc;
> - struct drm_crtc_state *new_crtc_state = NULL;
> -
> - if (new_crtc)
> - new_crtc_state = drm_atomic_get_new_crtc_state(state, new_crtc);
> -
> - return drm_atomic_helper_check_plane_state(new_plane_state, new_crtc_state,
> - DRM_PLANE_NO_SCALING,
> - DRM_PLANE_NO_SCALING,
> - false, false);
> -}
> -EXPORT_SYMBOL(drm_plane_helper_atomic_check);
Since this function is removed, does the comments of the drm_crtc_helper_atomic_check()
function (in the drm_crtc_helper.c) need to update as well? I'm ask because I see the
comments of the drm_crtc_helper_atomic_check() still referencing this function.
> diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c
> index 40876bcdd79a4..7702359c90c22 100644
> --- a/drivers/gpu/drm/udl/udl_modeset.c
> +++ b/drivers/gpu/drm/udl/udl_modeset.c
> @@ -21,7 +21,6 @@
> #include <drm/drm_gem_framebuffer_helper.h>
> #include <drm/drm_gem_shmem_helper.h>
> #include <drm/drm_modeset_helper_vtables.h>
> -#include <drm/drm_plane_helper.h>
> #include <drm/drm_probe_helper.h>
> #include <drm/drm_vblank.h>
>
> @@ -261,6 +260,22 @@ static const uint64_t udl_primary_plane_fmtmods[] = {
> DRM_FORMAT_MOD_INVALID
> };
>
> +static int udl_primary_plane_helper_atomic_check(struct drm_plane *plane,
> + struct drm_atomic_state *state)
> +{
> + struct drm_plane_state *new_plane_state = drm_atomic_get_new_plane_state(state, plane);
> + struct drm_crtc *new_crtc = new_plane_state->crtc;
> + struct drm_crtc_state *new_crtc_state = NULL;
> +
> + if (new_crtc)
> + new_crtc_state = drm_atomic_get_new_crtc_state(state, new_crtc);
> +
> + return drm_atomic_helper_check_plane_state(new_plane_state, new_crtc_state,
> + DRM_PLANE_NO_SCALING,
> + DRM_PLANE_NO_SCALING,
> + false, false);
> +}
> +
> static void udl_primary_plane_helper_atomic_update(struct drm_plane *plane,
> struct drm_atomic_state *state)
> {
> @@ -296,7 +311,7 @@ static void udl_primary_plane_helper_atomic_update(struct drm_plane *plane,
>
> static const struct drm_plane_helper_funcs udl_primary_plane_helper_funcs = {
> DRM_GEM_SHADOW_PLANE_HELPER_FUNCS,
> - .atomic_check = drm_plane_helper_atomic_check,
> + .atomic_check = udl_primary_plane_helper_atomic_check,
> .atomic_update = udl_primary_plane_helper_atomic_update,
> };
>
> diff --git a/include/drm/drm_plane_helper.h b/include/drm/drm_plane_helper.h
> index 3a574e8cd22f4..75f9c4830564a 100644
> --- a/include/drm/drm_plane_helper.h
> +++ b/include/drm/drm_plane_helper.h
> @@ -26,7 +26,6 @@
>
> #include <linux/types.h>
>
> -struct drm_atomic_state;
> struct drm_crtc;
> struct drm_framebuffer;
> struct drm_modeset_acquire_ctx;
> @@ -42,7 +41,6 @@ int drm_plane_helper_update_primary(struct drm_plane *plane, struct drm_crtc *cr
> int drm_plane_helper_disable_primary(struct drm_plane *plane,
> struct drm_modeset_acquire_ctx *ctx);
> void drm_plane_helper_destroy(struct drm_plane *plane);
> -int drm_plane_helper_atomic_check(struct drm_plane *plane, struct drm_atomic_state *state);
>
> /**
> * DRM_PLANE_NON_ATOMIC_FUNCS - Default plane functions for non-atomic drivers
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [1/8] drm/plane-helper: Move drm_plane_helper_atomic_check() into udl
2023-12-01 2:36 ` [1/8] " Sui Jingfeng
@ 2023-12-01 8:22 ` Thomas Zimmermann
2023-12-01 13:57 ` Sui Jingfeng
0 siblings, 1 reply; 20+ messages in thread
From: Thomas Zimmermann @ 2023-12-01 8:22 UTC (permalink / raw)
To: Sui Jingfeng, mripard, maarten.lankhorst, daniel, airlied
Cc: amd-gfx, javierm, dri-devel, linux-renesas-soc, laurent.pinchart,
linux-arm-kernel
[-- Attachment #1.1: Type: text/plain, Size: 6176 bytes --]
Hi
Am 01.12.23 um 03:36 schrieb Sui Jingfeng:
> Hi,
>
>
> On 2023/11/28 18:45, Thomas Zimmermann wrote:
>> The udl driver is the only caller of drm_plane_helper_atomic_check().
>> Move the function into the driver. No functional changes.
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>> ---
>> drivers/gpu/drm/drm_plane_helper.c | 32 ------------------------------
>> drivers/gpu/drm/udl/udl_modeset.c | 19 ++++++++++++++++--
>> include/drm/drm_plane_helper.h | 2 --
>> 3 files changed, 17 insertions(+), 36 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/drm_plane_helper.c
>> b/drivers/gpu/drm/drm_plane_helper.c
>> index 5e95089676ff8..7982be4b0306d 100644
>> --- a/drivers/gpu/drm/drm_plane_helper.c
>> +++ b/drivers/gpu/drm/drm_plane_helper.c
>> @@ -279,35 +279,3 @@ void drm_plane_helper_destroy(struct drm_plane
>> *plane)
>> kfree(plane);
>> }
>> EXPORT_SYMBOL(drm_plane_helper_destroy);
>> -
>> -/**
>> - * drm_plane_helper_atomic_check() - Helper to check plane atomic-state
>> - * @plane: plane to check
>> - * @state: atomic state object
>> - *
>> - * Provides a default plane-state check handler for planes whose
>> atomic-state
>> - * scale and positioning are not expected to change since the plane
>> is always
>> - * a fullscreen scanout buffer.
>> - *
>> - * This is often the case for the primary plane of simple
>> framebuffers. See
>> - * also drm_crtc_helper_atomic_check() for the respective CRTC-state
>> check
>> - * helper function.
>> - *
>> - * RETURNS:
>> - * Zero on success, or an errno code otherwise.
>> - */
>> -int drm_plane_helper_atomic_check(struct drm_plane *plane, struct
>> drm_atomic_state *state)
>> -{
>> - struct drm_plane_state *new_plane_state =
>> drm_atomic_get_new_plane_state(state, plane);
>> - struct drm_crtc *new_crtc = new_plane_state->crtc;
>> - struct drm_crtc_state *new_crtc_state = NULL;
>> -
>> - if (new_crtc)
>> - new_crtc_state = drm_atomic_get_new_crtc_state(state, new_crtc);
>> -
>> - return drm_atomic_helper_check_plane_state(new_plane_state,
>> new_crtc_state,
>> - DRM_PLANE_NO_SCALING,
>> - DRM_PLANE_NO_SCALING,
>> - false, false);
>> -}
>> -EXPORT_SYMBOL(drm_plane_helper_atomic_check);
>
>
> Since this function is removed, does the comments of the
> drm_crtc_helper_atomic_check()
> function (in the drm_crtc_helper.c) need to update as well? I'm ask
> because I see the
> comments of the drm_crtc_helper_atomic_check() still referencing this
> function.
Good point. I'll update that comment. Thanks for reviewing.
Best regards
Thomas
>
>
>> diff --git a/drivers/gpu/drm/udl/udl_modeset.c
>> b/drivers/gpu/drm/udl/udl_modeset.c
>> index 40876bcdd79a4..7702359c90c22 100644
>> --- a/drivers/gpu/drm/udl/udl_modeset.c
>> +++ b/drivers/gpu/drm/udl/udl_modeset.c
>> @@ -21,7 +21,6 @@
>> #include <drm/drm_gem_framebuffer_helper.h>
>> #include <drm/drm_gem_shmem_helper.h>
>> #include <drm/drm_modeset_helper_vtables.h>
>> -#include <drm/drm_plane_helper.h>
>> #include <drm/drm_probe_helper.h>
>> #include <drm/drm_vblank.h>
>> @@ -261,6 +260,22 @@ static const uint64_t udl_primary_plane_fmtmods[]
>> = {
>> DRM_FORMAT_MOD_INVALID
>> };
>> +static int udl_primary_plane_helper_atomic_check(struct drm_plane
>> *plane,
>> + struct drm_atomic_state *state)
>> +{
>> + struct drm_plane_state *new_plane_state =
>> drm_atomic_get_new_plane_state(state, plane);
>> + struct drm_crtc *new_crtc = new_plane_state->crtc;
>> + struct drm_crtc_state *new_crtc_state = NULL;
>> +
>> + if (new_crtc)
>> + new_crtc_state = drm_atomic_get_new_crtc_state(state, new_crtc);
>> +
>> + return drm_atomic_helper_check_plane_state(new_plane_state,
>> new_crtc_state,
>> + DRM_PLANE_NO_SCALING,
>> + DRM_PLANE_NO_SCALING,
>> + false, false);
>> +}
>> +
>> static void udl_primary_plane_helper_atomic_update(struct drm_plane
>> *plane,
>> struct drm_atomic_state *state)
>> {
>> @@ -296,7 +311,7 @@ static void
>> udl_primary_plane_helper_atomic_update(struct drm_plane *plane,
>> static const struct drm_plane_helper_funcs
>> udl_primary_plane_helper_funcs = {
>> DRM_GEM_SHADOW_PLANE_HELPER_FUNCS,
>> - .atomic_check = drm_plane_helper_atomic_check,
>> + .atomic_check = udl_primary_plane_helper_atomic_check,
>> .atomic_update = udl_primary_plane_helper_atomic_update,
>> };
>> diff --git a/include/drm/drm_plane_helper.h
>> b/include/drm/drm_plane_helper.h
>> index 3a574e8cd22f4..75f9c4830564a 100644
>> --- a/include/drm/drm_plane_helper.h
>> +++ b/include/drm/drm_plane_helper.h
>> @@ -26,7 +26,6 @@
>> #include <linux/types.h>
>> -struct drm_atomic_state;
>> struct drm_crtc;
>> struct drm_framebuffer;
>> struct drm_modeset_acquire_ctx;
>> @@ -42,7 +41,6 @@ int drm_plane_helper_update_primary(struct drm_plane
>> *plane, struct drm_crtc *cr
>> int drm_plane_helper_disable_primary(struct drm_plane *plane,
>> struct drm_modeset_acquire_ctx *ctx);
>> void drm_plane_helper_destroy(struct drm_plane *plane);
>> -int drm_plane_helper_atomic_check(struct drm_plane *plane, struct
>> drm_atomic_state *state);
>> /**
>> * DRM_PLANE_NON_ATOMIC_FUNCS - Default plane functions for
>> non-atomic drivers
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 5/8] drm/solomon: Do not include <drm/drm_plane_helper.h>
2023-11-28 10:45 ` [PATCH 5/8] drm/solomon: " Thomas Zimmermann
2023-11-28 13:16 ` Geert Uytterhoeven
@ 2023-12-01 8:42 ` Javier Martinez Canillas
1 sibling, 0 replies; 20+ messages in thread
From: Javier Martinez Canillas @ 2023-12-01 8:42 UTC (permalink / raw)
To: Thomas Zimmermann, mripard, maarten.lankhorst, daniel, airlied,
suijingfeng
Cc: dri-devel, amd-gfx, linux-renesas-soc, laurent.pinchart,
Thomas Zimmermann, linux-arm-kernel
Thomas Zimmermann <tzimmermann@suse.de> writes:
Hello Thomas,
> Remove unnecessary include statements for <drm/drm_plane_helper.h>.
> The file contains helpers for non-atomic code and should not be
> required by most drivers. No functional changes.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
> drivers/gpu/drm/solomon/ssd130x.h | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/solomon/ssd130x.h b/drivers/gpu/drm/solomon/ssd130x.h
> index acf7cedf0c1ab..075c5c3ee75ac 100644
> --- a/drivers/gpu/drm/solomon/ssd130x.h
> +++ b/drivers/gpu/drm/solomon/ssd130x.h
> @@ -17,7 +17,6 @@
> #include <drm/drm_crtc.h>
> #include <drm/drm_drv.h>
> #include <drm/drm_encoder.h>
> -#include <drm/drm_plane_helper.h>
>
> #include <linux/regmap.h>
>
> --
> 2.43.0
>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [1/8] drm/plane-helper: Move drm_plane_helper_atomic_check() into udl
2023-12-01 8:22 ` Thomas Zimmermann
@ 2023-12-01 13:57 ` Sui Jingfeng
0 siblings, 0 replies; 20+ messages in thread
From: Sui Jingfeng @ 2023-12-01 13:57 UTC (permalink / raw)
To: Thomas Zimmermann, mripard, maarten.lankhorst, daniel, airlied
Cc: amd-gfx, javierm, dri-devel, linux-renesas-soc, laurent.pinchart,
linux-arm-kernel
Hi,
On 2023/12/1 16:22, Thomas Zimmermann wrote:
> Hi
>
> Am 01.12.23 um 03:36 schrieb Sui Jingfeng:
>> Hi,
>>
>>
>> On 2023/11/28 18:45, Thomas Zimmermann wrote:
>>> The udl driver is the only caller of drm_plane_helper_atomic_check().
>>> Move the function into the driver. No functional changes.
>>>
>>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>>> ---
>>> drivers/gpu/drm/drm_plane_helper.c | 32
>>> ------------------------------
>>> drivers/gpu/drm/udl/udl_modeset.c | 19 ++++++++++++++++--
>>> include/drm/drm_plane_helper.h | 2 --
>>> 3 files changed, 17 insertions(+), 36 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/drm_plane_helper.c
>>> b/drivers/gpu/drm/drm_plane_helper.c
>>> index 5e95089676ff8..7982be4b0306d 100644
>>> --- a/drivers/gpu/drm/drm_plane_helper.c
>>> +++ b/drivers/gpu/drm/drm_plane_helper.c
>>> @@ -279,35 +279,3 @@ void drm_plane_helper_destroy(struct drm_plane
>>> *plane)
>>> kfree(plane);
>>> }
>>> EXPORT_SYMBOL(drm_plane_helper_destroy);
>>> -
>>> -/**
>>> - * drm_plane_helper_atomic_check() - Helper to check plane
>>> atomic-state
>>> - * @plane: plane to check
>>> - * @state: atomic state object
>>> - *
>>> - * Provides a default plane-state check handler for planes whose
>>> atomic-state
>>> - * scale and positioning are not expected to change since the plane
>>> is always
>>> - * a fullscreen scanout buffer.
>>> - *
>>> - * This is often the case for the primary plane of simple
>>> framebuffers. See
>>> - * also drm_crtc_helper_atomic_check() for the respective
>>> CRTC-state check
>>> - * helper function.
>>> - *
>>> - * RETURNS:
>>> - * Zero on success, or an errno code otherwise.
>>> - */
>>> -int drm_plane_helper_atomic_check(struct drm_plane *plane, struct
>>> drm_atomic_state *state)
>>> -{
>>> - struct drm_plane_state *new_plane_state =
>>> drm_atomic_get_new_plane_state(state, plane);
>>> - struct drm_crtc *new_crtc = new_plane_state->crtc;
>>> - struct drm_crtc_state *new_crtc_state = NULL;
>>> -
>>> - if (new_crtc)
>>> - new_crtc_state = drm_atomic_get_new_crtc_state(state,
>>> new_crtc);
>>> -
>>> - return drm_atomic_helper_check_plane_state(new_plane_state,
>>> new_crtc_state,
>>> - DRM_PLANE_NO_SCALING,
>>> - DRM_PLANE_NO_SCALING,
>>> - false, false);
>>> -}
>>> -EXPORT_SYMBOL(drm_plane_helper_atomic_check);
>>
>>
>> Since this function is removed, does the comments of the
>> drm_crtc_helper_atomic_check()
>> function (in the drm_crtc_helper.c) need to update as well? I'm ask
>> because I see the
>> comments of the drm_crtc_helper_atomic_check() still referencing this
>> function.
>
> Good point. I'll update that comment. Thanks for reviewing.
>
OK, with this trivial problem solved:
Acked-by: Sui Jingfeng <suijingfeng@loongson.cn>
> Best regards
> Thomas
>
>>
>>
>>> diff --git a/drivers/gpu/drm/udl/udl_modeset.c
>>> b/drivers/gpu/drm/udl/udl_modeset.c
>>> index 40876bcdd79a4..7702359c90c22 100644
>>> --- a/drivers/gpu/drm/udl/udl_modeset.c
>>> +++ b/drivers/gpu/drm/udl/udl_modeset.c
>>> @@ -21,7 +21,6 @@
>>> #include <drm/drm_gem_framebuffer_helper.h>
>>> #include <drm/drm_gem_shmem_helper.h>
>>> #include <drm/drm_modeset_helper_vtables.h>
>>> -#include <drm/drm_plane_helper.h>
>>> #include <drm/drm_probe_helper.h>
>>> #include <drm/drm_vblank.h>
>>> @@ -261,6 +260,22 @@ static const uint64_t
>>> udl_primary_plane_fmtmods[] = {
>>> DRM_FORMAT_MOD_INVALID
>>> };
>>> +static int udl_primary_plane_helper_atomic_check(struct drm_plane
>>> *plane,
>>> + struct drm_atomic_state *state)
>>> +{
>>> + struct drm_plane_state *new_plane_state =
>>> drm_atomic_get_new_plane_state(state, plane);
>>> + struct drm_crtc *new_crtc = new_plane_state->crtc;
>>> + struct drm_crtc_state *new_crtc_state = NULL;
>>> +
>>> + if (new_crtc)
>>> + new_crtc_state = drm_atomic_get_new_crtc_state(state,
>>> new_crtc);
>>> +
>>> + return drm_atomic_helper_check_plane_state(new_plane_state,
>>> new_crtc_state,
>>> + DRM_PLANE_NO_SCALING,
>>> + DRM_PLANE_NO_SCALING,
>>> + false, false);
>>> +}
>>> +
>>> static void udl_primary_plane_helper_atomic_update(struct
>>> drm_plane *plane,
>>> struct drm_atomic_state *state)
>>> {
>>> @@ -296,7 +311,7 @@ static void
>>> udl_primary_plane_helper_atomic_update(struct drm_plane *plane,
>>> static const struct drm_plane_helper_funcs
>>> udl_primary_plane_helper_funcs = {
>>> DRM_GEM_SHADOW_PLANE_HELPER_FUNCS,
>>> - .atomic_check = drm_plane_helper_atomic_check,
>>> + .atomic_check = udl_primary_plane_helper_atomic_check,
>>> .atomic_update = udl_primary_plane_helper_atomic_update,
>>> };
>>> diff --git a/include/drm/drm_plane_helper.h
>>> b/include/drm/drm_plane_helper.h
>>> index 3a574e8cd22f4..75f9c4830564a 100644
>>> --- a/include/drm/drm_plane_helper.h
>>> +++ b/include/drm/drm_plane_helper.h
>>> @@ -26,7 +26,6 @@
>>> #include <linux/types.h>
>>> -struct drm_atomic_state;
>>> struct drm_crtc;
>>> struct drm_framebuffer;
>>> struct drm_modeset_acquire_ctx;
>>> @@ -42,7 +41,6 @@ int drm_plane_helper_update_primary(struct
>>> drm_plane *plane, struct drm_crtc *cr
>>> int drm_plane_helper_disable_primary(struct drm_plane *plane,
>>> struct drm_modeset_acquire_ctx *ctx);
>>> void drm_plane_helper_destroy(struct drm_plane *plane);
>>> -int drm_plane_helper_atomic_check(struct drm_plane *plane, struct
>>> drm_atomic_state *state);
>>> /**
>>> * DRM_PLANE_NON_ATOMIC_FUNCS - Default plane functions for
>>> non-atomic drivers
>
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2023-12-01 13:57 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-28 10:45 [PATCH 0/8] drm/plane-helpers: Minor clean ups Thomas Zimmermann
2023-11-28 10:45 ` [PATCH 1/8] drm/plane-helper: Move drm_plane_helper_atomic_check() into udl Thomas Zimmermann
2023-12-01 2:36 ` [1/8] " Sui Jingfeng
2023-12-01 8:22 ` Thomas Zimmermann
2023-12-01 13:57 ` Sui Jingfeng
2023-11-28 10:45 ` [PATCH 2/8] drm/amdgpu: Do not include <drm/drm_plane_helper.h> Thomas Zimmermann
2023-11-28 10:45 ` [PATCH 3/8] drm/loongson: " Thomas Zimmermann
2023-11-28 11:37 ` [3/8] " Sui Jingfeng
2023-11-28 10:45 ` [PATCH 4/8] drm/shmobile: " Thomas Zimmermann
2023-11-28 13:16 ` Geert Uytterhoeven
2023-11-28 10:45 ` [PATCH 5/8] drm/solomon: " Thomas Zimmermann
2023-11-28 13:16 ` Geert Uytterhoeven
2023-12-01 8:42 ` Javier Martinez Canillas
2023-11-28 10:45 ` [PATCH 6/8] drm/ofdrm: " Thomas Zimmermann
2023-11-28 12:01 ` [6/8] " Sui Jingfeng
2023-11-28 10:45 ` [PATCH 7/8] drm/simpledrm: " Thomas Zimmermann
2023-11-28 11:47 ` [7/8] " Sui Jingfeng
2023-11-28 10:45 ` [PATCH 8/8] drm/xlnx: " Thomas Zimmermann
2023-11-28 11:02 ` Laurent Pinchart
2023-11-28 14:13 ` Thomas Zimmermann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).