Commit e55ca7e6 authored by Marcin Slusarz's avatar Marcin Slusarz Committed by Dave Airlie

drm/nv50: fix fillrect color

struct fb_fillrect->color is not a color, but index into pseudo_palette
array
Signed-off-by: default avatarMarcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent fbe36a7a
...@@ -10,6 +10,7 @@ nv50_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect) ...@@ -10,6 +10,7 @@ nv50_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
struct drm_device *dev = par->dev; struct drm_device *dev = par->dev;
struct drm_nouveau_private *dev_priv = dev->dev_private; struct drm_nouveau_private *dev_priv = dev->dev_private;
struct nouveau_channel *chan = dev_priv->channel; struct nouveau_channel *chan = dev_priv->channel;
uint32_t color = ((uint32_t *) info->pseudo_palette)[rect->color];
if (info->state != FBINFO_STATE_RUNNING) if (info->state != FBINFO_STATE_RUNNING)
return; return;
...@@ -31,7 +32,7 @@ nv50_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect) ...@@ -31,7 +32,7 @@ nv50_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
OUT_RING(chan, 1); OUT_RING(chan, 1);
} }
BEGIN_RING(chan, NvSub2D, 0x0588, 1); BEGIN_RING(chan, NvSub2D, 0x0588, 1);
OUT_RING(chan, rect->color); OUT_RING(chan, color);
BEGIN_RING(chan, NvSub2D, 0x0600, 4); BEGIN_RING(chan, NvSub2D, 0x0600, 4);
OUT_RING(chan, rect->dx); OUT_RING(chan, rect->dx);
OUT_RING(chan, rect->dy); OUT_RING(chan, rect->dy);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment