mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-08 18:57:22 +00:00
drm/mgag200: Simplify offset calculation
The offset value sets the distance in bytes between two consecutive scanlines. Reduce the calculation to the minimum. According to the Matrox programming manual, Sec 4.6.5, the offset is the scanline pitch in bits divided by 128. The field pitches[0] in struct drm_framebuffer stores the scanline pitch in bytes, so we have to divide by 16 only. Reducing the existing bpp-shift look-up and offset calculations also returns exactly this for all formats. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Co-developed-by: Jocelyn Falempe <jfalempe@redhat.com> Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com> Link: https://patch.msgid.link/20260415152625.101710-4-tzimmermann@suse.de
This commit is contained in:
parent
8d5ffd34c1
commit
0bfc9fbd8e
1 changed files with 1 additions and 27 deletions
Loading…
Add table
Add a link
Reference in a new issue