Skip to content

Commit 71bcae3

Browse files
Harry Wentlandemersion
authored andcommitted
drm/amd/display: Add bypass COLOR PIPELINE
Add the default Bypass pipeline and ensure it passes the kms_colorop test plane-XR30-XR30-bypass. Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Harry Wentland <harry.wentland@amd.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Simon Ser <contact@emersion.fr> Link: https://patch.msgid.link/20251115000237.3561250-27-alex.hung@amd.com
1 parent e0edb58 commit 71bcae3

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1782,6 +1782,21 @@ dm_atomic_plane_get_property(struct drm_plane *plane,
17821782

17831783
return 0;
17841784
}
1785+
#else
1786+
1787+
#define MAX_COLOR_PIPELINES 5
1788+
1789+
static int
1790+
dm_plane_init_colorops(struct drm_plane *plane)
1791+
{
1792+
struct drm_prop_enum_list pipelines[MAX_COLOR_PIPELINES];
1793+
int len = 0;
1794+
1795+
/* Create COLOR_PIPELINE property and attach */
1796+
drm_plane_create_color_pipeline_property(plane, pipelines, len);
1797+
1798+
return 0;
1799+
}
17851800
#endif
17861801

17871802
static const struct drm_plane_funcs dm_plane_funcs = {
@@ -1890,7 +1905,12 @@ int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm,
18901905

18911906
#ifdef AMD_PRIVATE_COLOR
18921907
dm_atomic_plane_attach_color_mgmt_properties(dm, plane);
1908+
#else
1909+
res = dm_plane_init_colorops(plane);
1910+
if (res)
1911+
return res;
18931912
#endif
1913+
18941914
/* Create (reset) the plane state */
18951915
if (plane->funcs->reset)
18961916
plane->funcs->reset(plane);

0 commit comments

Comments
 (0)