diff mbox series

[V8,24/43] drm/amd/display: Skip color pipeline initialization for cursor plane

Message ID 20250326234748.2982010-25-alex.hung@amd.com (mailing list archive)
State New
Headers show
Series Color Pipeline API w/ VKMS | expand

Commit Message

Alex Hung March 26, 2025, 11:47 p.m. UTC
cursor plane does not need to have color pipeline.

Signed-off-by: Alex Hung <alex.hung@amd.com>
---
v7:
 - Add a commit messages

 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Shengyu Qu March 30, 2025, 9:48 a.m. UTC | #1
Hi,

Do we really need to disable cursor plane color pipeline support? I 
don't think we need to disable that if it is supported, since there 
might be some user-defined colored cursor icon.

Best regards,
Shengyu

在 2025/3/27 7:47, Alex Hung 写道:
> cursor plane does not need to have color pipeline.
> 
> Signed-off-by: Alex Hung <alex.hung@amd.com>
> ---
> v7:
>   - Add a commit messages
> 
>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
> index 9632b8b73e7e..b5b9b0b5da63 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
> @@ -1792,6 +1792,9 @@ dm_plane_init_colorops(struct drm_plane *plane)
>   	struct drm_prop_enum_list pipelines[MAX_COLOR_PIPELINES];
>   	int len = 0;
>   
> +	if (plane->type == DRM_PLANE_TYPE_CURSOR)
> +		return 0;
> +
>   	/* Create COLOR_PIPELINE property and attach */
>   	drm_plane_create_color_pipeline_property(plane, pipelines, len);
>
Shengyu Qu March 30, 2025, 12:59 p.m. UTC | #2
Hi,

Do we really need to disable cursor plane color pipeline support? I 
don't think we need to disable that if it is supported, since there 
might be some user-defined colored cursor icon.

Best regards,
Shengyu

For some unknown reason, seems my mail is not shown in the mail list 
archive, so I resent it.

在 2025/3/27 7:47, Alex Hung 写道:
> cursor plane does not need to have color pipeline.
> 
> Signed-off-by: Alex Hung <alex.hung@amd.com>
> ---
> v7:
>   - Add a commit messages
> 
>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
> index 9632b8b73e7e..b5b9b0b5da63 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
> @@ -1792,6 +1792,9 @@ dm_plane_init_colorops(struct drm_plane *plane)
>   	struct drm_prop_enum_list pipelines[MAX_COLOR_PIPELINES];
>   	int len = 0;
>   
> +	if (plane->type == DRM_PLANE_TYPE_CURSOR)
> +		return 0;
> +
>   	/* Create COLOR_PIPELINE property and attach */
>   	drm_plane_create_color_pipeline_property(plane, pipelines, len);
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
index 9632b8b73e7e..b5b9b0b5da63 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
@@ -1792,6 +1792,9 @@  dm_plane_init_colorops(struct drm_plane *plane)
 	struct drm_prop_enum_list pipelines[MAX_COLOR_PIPELINES];
 	int len = 0;
 
+	if (plane->type == DRM_PLANE_TYPE_CURSOR)
+		return 0;
+
 	/* Create COLOR_PIPELINE property and attach */
 	drm_plane_create_color_pipeline_property(plane, pipelines, len);