diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv50_fbcon.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_fbcon.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_fbcon.c b/drivers/gpu/drm/nouveau/nv50_fbcon.c index c966ef834853..cc34356ab0b5 100644 --- a/drivers/gpu/drm/nouveau/nv50_fbcon.c +++ b/drivers/gpu/drm/nouveau/nv50_fbcon.c | |||
@@ -10,7 +10,6 @@ nv50_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect) | |||
10 | struct drm_device *dev = par->dev; | 10 | struct drm_device *dev = par->dev; |
11 | struct drm_nouveau_private *dev_priv = dev->dev_private; | 11 | struct drm_nouveau_private *dev_priv = dev->dev_private; |
12 | struct nouveau_channel *chan = dev_priv->channel; | 12 | struct nouveau_channel *chan = dev_priv->channel; |
13 | uint32_t color = ((uint32_t *) info->pseudo_palette)[rect->color]; | ||
14 | 13 | ||
15 | if (info->state != FBINFO_STATE_RUNNING) | 14 | if (info->state != FBINFO_STATE_RUNNING) |
16 | return; | 15 | return; |
@@ -32,7 +31,11 @@ nv50_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect) | |||
32 | OUT_RING(chan, 1); | 31 | OUT_RING(chan, 1); |
33 | } | 32 | } |
34 | BEGIN_RING(chan, NvSub2D, 0x0588, 1); | 33 | BEGIN_RING(chan, NvSub2D, 0x0588, 1); |
35 | OUT_RING(chan, color); | 34 | if (info->fix.visual == FB_VISUAL_TRUECOLOR || |
35 | info->fix.visual == FB_VISUAL_DIRECTCOLOR) | ||
36 | OUT_RING(chan, ((uint32_t *)info->pseudo_palette)[rect->color]); | ||
37 | else | ||
38 | OUT_RING(chan, rect->color); | ||
36 | BEGIN_RING(chan, NvSub2D, 0x0600, 4); | 39 | BEGIN_RING(chan, NvSub2D, 0x0600, 4); |
37 | OUT_RING(chan, rect->dx); | 40 | OUT_RING(chan, rect->dx); |
38 | OUT_RING(chan, rect->dy); | 41 | OUT_RING(chan, rect->dy); |