(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

drm/amd/display: Fix LSDMA divide by zero

[WHY] element_size_to_bytes_per_pixel() handled only element sizes 0 to 4 and returned 0 for every other value, and an unexpected element size caused a divide by zero. [HOW] Derive the size as 1 << element_size, which matches the existing encoding, and fall back to 1 for values of 8 or more to keep the result nonzero. Reviewed-by: Austin Zheng <austin.zheng@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: George Zhang <george.zhang@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


Author Alex Hung Committer Alex Deucher Date Commit Parent 708d3e7a
+1 -21
1 changed file
+1 -21
1 changed file