Skip to content

Commit 0952327

Browse files
WallaceITJocelyn Falempe
authored andcommitted
drm/draw: fix color truncation in drm_draw_fill24
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: 31fa2c1 ("drm/panic: Move drawing functions to drm_draw") Signed-off-by: Francesco Valla <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jocelyn Falempe <[email protected]>
1 parent db74b04 commit 0952327

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/gpu/drm/drm_draw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ EXPORT_SYMBOL(drm_draw_fill16);
127127

128128
void drm_draw_fill24(struct iosys_map *dmap, unsigned int dpitch,
129129
unsigned int height, unsigned int width,
130-
u16 color)
130+
u32 color)
131131
{
132132
unsigned int y, x;
133133

drivers/gpu/drm/drm_draw_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void drm_draw_fill16(struct iosys_map *dmap, unsigned int dpitch,
4747

4848
void drm_draw_fill24(struct iosys_map *dmap, unsigned int dpitch,
4949
unsigned int height, unsigned int width,
50-
u16 color);
50+
u32 color);
5151

5252
void drm_draw_fill32(struct iosys_map *dmap, unsigned int dpitch,
5353
unsigned int height, unsigned int width,

0 commit comments

Comments
 (0)