mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 18:09:56 +00:00
drm/draw: fix color truncation in drm_draw_fill24
[ Upstream commit095232711f] The color parameter passed to drm_draw_fill24() was truncated to 16 bits, leading to an incorrect color drawn to the target iosys_map. Fix this behavior, widening the parameter to 32 bits. Fixes:31fa2c1ca0("drm/panic: Move drawing functions to drm_draw") Signed-off-by: Francesco Valla <francesco@valla.it> Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com> Link: https://lore.kernel.org/r/20251003-drm_draw_fill24_fix-v1-1-8fb7c1c2a893@valla.it Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
0fe5e3f5fb
commit
f0edcc0ff6
@@ -127,7 +127,7 @@ EXPORT_SYMBOL(drm_draw_fill16);
|
|||||||
|
|
||||||
void drm_draw_fill24(struct iosys_map *dmap, unsigned int dpitch,
|
void drm_draw_fill24(struct iosys_map *dmap, unsigned int dpitch,
|
||||||
unsigned int height, unsigned int width,
|
unsigned int height, unsigned int width,
|
||||||
u16 color)
|
u32 color)
|
||||||
{
|
{
|
||||||
unsigned int y, x;
|
unsigned int y, x;
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ void drm_draw_fill16(struct iosys_map *dmap, unsigned int dpitch,
|
|||||||
|
|
||||||
void drm_draw_fill24(struct iosys_map *dmap, unsigned int dpitch,
|
void drm_draw_fill24(struct iosys_map *dmap, unsigned int dpitch,
|
||||||
unsigned int height, unsigned int width,
|
unsigned int height, unsigned int width,
|
||||||
u16 color);
|
u32 color);
|
||||||
|
|
||||||
void drm_draw_fill32(struct iosys_map *dmap, unsigned int dpitch,
|
void drm_draw_fill32(struct iosys_map *dmap, unsigned int dpitch,
|
||||||
unsigned int height, unsigned int width,
|
unsigned int height, unsigned int width,
|
||||||
|
|||||||
Reference in New Issue
Block a user