diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2009-12-21 17:00:41 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-01-10 23:41:07 -0500 |
commit | e55ca7e68efc7c2d320cd9975ebc5e0fd27debf0 (patch) | |
tree | b5109ae1be6742c4d308f9fe675b5a54d72e4ff9 /drivers/gpu | |
parent | fbe36a7a069267b82b7b82a66d79a4406cfa90b2 (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')
-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 6bcc6d39e9b0..c966ef834853 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); |