aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Clark <rob@ti.com>2011-02-16 02:45:51 +0000
committerDave Airlie <airlied@redhat.com>2011-02-23 11:09:13 +1000
commit9da12b6aeb8bde8cc3aecba12b0ec1114d6dcfea (patch)
treebc4050f4033eaa4b43c44c22e04f68504644a212
parenta250b9fdc53a286d32e22f21170382a46b3a3ef5 (diff)
downloadkernel_samsung_espresso10-9da12b6aeb8bde8cc3aecba12b0ec1114d6dcfea.tar.gz
kernel_samsung_espresso10-9da12b6aeb8bde8cc3aecba12b0ec1114d6dcfea.tar.bz2
kernel_samsung_espresso10-9da12b6aeb8bde8cc3aecba12b0ec1114d6dcfea.zip
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>
-rw-r--r--drivers/gpu/drm/drm_fb_helper.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 6977a1ce9d9..d421f9d58d4 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -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;
}