mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 17:13:52 +02:00
drm/amd/display: Swap matrix and multiplier
Swap the order of matrix and multiplier as designed in hardware. Signed-off-by: Alex Hung <alex.hung@amd.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Melissa Wen <mwen@igalia.com> Signed-off-by: Simon Ser <contact@emersion.fr> Link: https://patch.msgid.link/20251115000237.3561250-43-alex.hung@amd.com
This commit is contained in:
parent
de0b0eb2e0
commit
68186c7375
|
|
@ -1651,17 +1651,6 @@ amdgpu_dm_plane_set_colorop_properties(struct drm_plane_state *plane_state,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* 3x4 matrix */
|
||||
colorop = colorop->next;
|
||||
if (!colorop) {
|
||||
drm_dbg(dev, "no 3x4 matrix colorop found\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = __set_dm_plane_colorop_3x4_matrix(plane_state, dc_plane_state, colorop);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Multiplier */
|
||||
colorop = colorop->next;
|
||||
if (!colorop) {
|
||||
|
|
@ -1673,6 +1662,17 @@ amdgpu_dm_plane_set_colorop_properties(struct drm_plane_state *plane_state,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* 3x4 matrix */
|
||||
colorop = colorop->next;
|
||||
if (!colorop) {
|
||||
drm_dbg(dev, "no 3x4 matrix colorop found\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = __set_dm_plane_colorop_3x4_matrix(plane_state, dc_plane_state, colorop);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* 1D Curve & LUT - SHAPER TF & LUT */
|
||||
colorop = colorop->next;
|
||||
if (!colorop) {
|
||||
|
|
|
|||
|
|
@ -74,21 +74,6 @@ int amdgpu_dm_initialize_default_pipeline(struct drm_plane *plane, struct drm_pr
|
|||
|
||||
i++;
|
||||
|
||||
/* 3x4 matrix */
|
||||
ops[i] = kzalloc(sizeof(struct drm_colorop), GFP_KERNEL);
|
||||
if (!ops[i]) {
|
||||
ret = -ENOMEM;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ret = drm_plane_colorop_ctm_3x4_init(dev, ops[i], plane);
|
||||
if (ret)
|
||||
goto cleanup;
|
||||
|
||||
drm_colorop_set_next_property(ops[i-1], ops[i]);
|
||||
|
||||
i++;
|
||||
|
||||
/* Multiplier */
|
||||
ops[i] = kzalloc(sizeof(struct drm_colorop), GFP_KERNEL);
|
||||
if (!ops[i]) {
|
||||
|
|
@ -104,6 +89,21 @@ int amdgpu_dm_initialize_default_pipeline(struct drm_plane *plane, struct drm_pr
|
|||
|
||||
i++;
|
||||
|
||||
/* 3x4 matrix */
|
||||
ops[i] = kzalloc(sizeof(struct drm_colorop), GFP_KERNEL);
|
||||
if (!ops[i]) {
|
||||
ret = -ENOMEM;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ret = drm_plane_colorop_ctm_3x4_init(dev, ops[i], plane);
|
||||
if (ret)
|
||||
goto cleanup;
|
||||
|
||||
drm_colorop_set_next_property(ops[i-1], ops[i]);
|
||||
|
||||
i++;
|
||||
|
||||
/* 1D curve - SHAPER TF */
|
||||
ops[i] = kzalloc(sizeof(*ops[0]), GFP_KERNEL);
|
||||
if (!ops[i]) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user