mirror of
https://github.com/torvalds/linux.git
synced 2024-11-28 07:01:32 +00:00
drm: psuedocolor support for ARGB modes
If there is an alpha channel, need to mask in 1's in the alpha channel to prevent the fb from being completely transparent. Signed-off-by: Rob Clark <rob@ti.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
a250b9fdc5
commit
9da12b6aeb
@ -627,6 +627,11 @@ static int setcolreg(struct drm_crtc *crtc, u16 red, u16 green,
|
||||
value = (red << info->var.red.offset) |
|
||||
(green << info->var.green.offset) |
|
||||
(blue << info->var.blue.offset);
|
||||
if (info->var.transp.length > 0) {
|
||||
u32 mask = (1 << info->var.transp.length) - 1;
|
||||
mask <<= info->var.transp.offset;
|
||||
value |= mask;
|
||||
}
|
||||
palette[regno] = value;
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user