Skip to content

Commit

Permalink
drm/nv50: fix fillrect color
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Marcin Slusarz authored and Ben Skeggs committed Jan 10, 2010
1 parent 75c722d commit 3033f14
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/nouveau/nv50_fbcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ nv50_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
struct drm_device *dev = par->dev;
struct drm_nouveau_private *dev_priv = dev->dev_private;
struct nouveau_channel *chan = dev_priv->channel;
uint32_t color = ((uint32_t *) info->pseudo_palette)[rect->color];

if (info->state != FBINFO_STATE_RUNNING)
return;
Expand All @@ -31,7 +32,7 @@ nv50_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
OUT_RING(chan, 1);
}
BEGIN_RING(chan, NvSub2D, 0x0588, 1);
OUT_RING(chan, rect->color);
OUT_RING(chan, color);
BEGIN_RING(chan, NvSub2D, 0x0600, 4);
OUT_RING(chan, rect->dx);
OUT_RING(chan, rect->dy);
Expand Down

0 comments on commit 3033f14

Please sign in to comment.