diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2009-12-21 17:00:41 -0500 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-01-10 18:06:33 -0500 |
commit | 3033f14d6538e0e7c3c53d3ed1ff6cec28260b98 (patch) | |
tree | c3a73c64eb4f3af9bb58f99fa6c487b53d34ef08 /drivers/gpu/drm/nouveau/nv50_fbcon.c | |
parent | 75c722d7ea70b791d179ec900e7c88bd6d5fd71e (diff) |
drm/nv50: fix fillrect color
struct fb_fillrect->color is not a color, but index into pseudo_palette
array
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv50_fbcon.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_fbcon.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_fbcon.c b/drivers/gpu/drm/nouveau/nv50_fbcon.c index 6bcc6d39e9b..c966ef83485 100644 --- a/drivers/gpu/drm/nouveau/nv50_fbcon.c +++ b/drivers/gpu/drm/nouveau/nv50_fbcon.c | |||
@@ -10,6 +10,7 @@ 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]; | ||
13 | 14 | ||
14 | if (info->state != FBINFO_STATE_RUNNING) | 15 | if (info->state != FBINFO_STATE_RUNNING) |
15 | return; | 16 | return; |
@@ -31,7 +32,7 @@ nv50_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect) | |||
31 | OUT_RING(chan, 1); | 32 | OUT_RING(chan, 1); |
32 | } | 33 | } |
33 | BEGIN_RING(chan, NvSub2D, 0x0588, 1); | 34 | BEGIN_RING(chan, NvSub2D, 0x0588, 1); |
34 | OUT_RING(chan, rect->color); | 35 | OUT_RING(chan, color); |
35 | BEGIN_RING(chan, NvSub2D, 0x0600, 4); | 36 | BEGIN_RING(chan, NvSub2D, 0x0600, 4); |
36 | OUT_RING(chan, rect->dx); | 37 | OUT_RING(chan, rect->dx); |
37 | OUT_RING(chan, rect->dy); | 38 | OUT_RING(chan, rect->dy); |