aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/video/sunxvr500.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/video/sunxvr500.c b/drivers/video/sunxvr500.c
index 08880a62bfa..71bf3f1f00b 100644
--- a/drivers/video/sunxvr500.c
+++ b/drivers/video/sunxvr500.c
@@ -50,7 +50,7 @@ struct e3d_info {
50 u32 fb8_0_off; 50 u32 fb8_0_off;
51 u32 fb8_1_off; 51 u32 fb8_1_off;
52 52
53 u32 pseudo_palette[256]; 53 u32 pseudo_palette[16];
54}; 54};
55 55
56static int __devinit e3d_get_props(struct e3d_info *ep) 56static int __devinit e3d_get_props(struct e3d_info *ep)
@@ -126,7 +126,9 @@ static int e3d_setcolreg(unsigned regno,
126 blue_8 = blue >> 8; 126 blue_8 = blue >> 8;
127 127
128 value = (blue_8 << 24) | (green_8 << 16) | (red_8 << 8); 128 value = (blue_8 << 24) | (green_8 << 16) | (red_8 << 8);
129 ((u32 *)info->pseudo_palette)[regno] = value; 129
130 if (info->fix.visual == FB_VISUAL_TRUECOLOR && regno < 16)
131 ((u32 *)info->pseudo_palette)[regno] = value;
130 132
131 133
132 red_10 = red >> 6; 134 red_10 = red >> 6;