From: Alexey Dobriyan <adobriyan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Ben Skeggs <skeggsb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: airlied-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH] nouveau: nv50: fix ->pseudo_palette usage
Date: Sat, 9 Jan 2010 18:05:24 +0200 [thread overview]
Message-ID: <20100109160524.GA4258@x200> (raw)
In-Reply-To: <1262557056.18387.6.camel@nisroch>
On Mon, Jan 04, 2010 at 08:17:36AM +1000, Ben Skeggs wrote:
> On Sun, 2010-01-03 at 11:17 +0200, Alexey Dobriyan wrote:
> > Sometimes struct fb_fillrect::color is color, sometimes palette index.
> This doesn't apply on current git, which already has a similar (though,
> not quite the same) patch applied. We may yet need some additional
> fixes from your patch, I'll look at testing that soon.
Ehh?
They're the same except I haven't changed nv04, because of no hardware.
> > --- 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)
> > 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;
> >
> > if (info->state != FBINFO_STATE_RUNNING)
> > return;
> > @@ -31,7 +32,12 @@ 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);
> > + if (info->fix.visual == FB_VISUAL_TRUECOLOR ||
> > + info->fix.visual == FB_VISUAL_DIRECTCOLOR) {
> > + color = ((uint32_t *)info->pseudo_palette)[rect->color];
> > + } else
> > + color = rect->color;
> > + OUT_RING(chan, color);
> > BEGIN_RING(chan, NvSub2D, 0x0600, 4);
next prev parent reply other threads:[~2010-01-09 16:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-03 9:17 [PATCH] nouveau: nv50: fix ->pseudo_palette usage Alexey Dobriyan
2010-01-03 22:17 ` Ben Skeggs
2010-01-09 16:05 ` Alexey Dobriyan [this message]
2010-01-09 16:52 ` Maarten Maathuis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100109160524.GA4258@x200 \
--to=adobriyan-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=airlied-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=skeggsb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.