Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

authored by

Alex Hung and committed by
Simon Ser
68186c73 de0b0eb2

+26 -26
+11 -11
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
··· 1651 1651 if (ret) 1652 1652 return ret; 1653 1653 1654 - /* 3x4 matrix */ 1655 - colorop = colorop->next; 1656 - if (!colorop) { 1657 - drm_dbg(dev, "no 3x4 matrix colorop found\n"); 1658 - return -EINVAL; 1659 - } 1660 - 1661 - ret = __set_dm_plane_colorop_3x4_matrix(plane_state, dc_plane_state, colorop); 1662 - if (ret) 1663 - return ret; 1664 - 1665 1654 /* Multiplier */ 1666 1655 colorop = colorop->next; 1667 1656 if (!colorop) { ··· 1659 1670 } 1660 1671 1661 1672 ret = __set_dm_plane_colorop_multiplier(plane_state, dc_plane_state, colorop); 1673 + if (ret) 1674 + return ret; 1675 + 1676 + /* 3x4 matrix */ 1677 + colorop = colorop->next; 1678 + if (!colorop) { 1679 + drm_dbg(dev, "no 3x4 matrix colorop found\n"); 1680 + return -EINVAL; 1681 + } 1682 + 1683 + ret = __set_dm_plane_colorop_3x4_matrix(plane_state, dc_plane_state, colorop); 1662 1684 if (ret) 1663 1685 return ret; 1664 1686
+15 -15
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c
··· 74 74 75 75 i++; 76 76 77 - /* 3x4 matrix */ 78 - ops[i] = kzalloc(sizeof(struct drm_colorop), GFP_KERNEL); 79 - if (!ops[i]) { 80 - ret = -ENOMEM; 81 - goto cleanup; 82 - } 83 - 84 - ret = drm_plane_colorop_ctm_3x4_init(dev, ops[i], plane); 85 - if (ret) 86 - goto cleanup; 87 - 88 - drm_colorop_set_next_property(ops[i-1], ops[i]); 89 - 90 - i++; 91 - 92 77 /* Multiplier */ 93 78 ops[i] = kzalloc(sizeof(struct drm_colorop), GFP_KERNEL); 94 79 if (!ops[i]) { ··· 82 97 } 83 98 84 99 ret = drm_plane_colorop_mult_init(dev, ops[i], plane); 100 + if (ret) 101 + goto cleanup; 102 + 103 + drm_colorop_set_next_property(ops[i-1], ops[i]); 104 + 105 + i++; 106 + 107 + /* 3x4 matrix */ 108 + ops[i] = kzalloc(sizeof(struct drm_colorop), GFP_KERNEL); 109 + if (!ops[i]) { 110 + ret = -ENOMEM; 111 + goto cleanup; 112 + } 113 + 114 + ret = drm_plane_colorop_ctm_3x4_init(dev, ops[i], plane); 85 115 if (ret) 86 116 goto cleanup; 87 117