[PATCH:xf86-video-mga] Fix pointer cast warning.

Matthieu Herrb matthieu at herrb.eu
Mon Feb 23 23:51:32 PST 2015


On Tue, Feb 24, 2015 at 08:16:33AM +0100, Mark Kettenis wrote:
> > Date: Mon, 23 Feb 2015 22:55:51 -0800
> > From: Alan Coopersmith <alan.coopersmith at oracle.com>
> > 
> > On 02/23/15 10:36 PM, Mark Kettenis wrote:
> > >>   cast to pointer from integer of different size
> > >>   [-Werror=int-to-pointer-cast]
> > >>
> > >>   Signed-off-by: Thomas Klausner <wiz at NetBSD.org>
> > >>   ---
> > >>    src/mga_exa.c | 2 +-
> > >>    1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > This code makes no sense to me.  exaGetPixmapFirstPixel() returns a pixel
> > > value.  Interpreting that as a pointer to the first pixel must be wrong.
> > >
> > > Note that the actual usage of mgaDownloadFromScreen() is #if 0'ed out.
> > 
> > Perhaps in your copy, but not upstream:
> > 
> > http://cgit.freedesktop.org/xorg/driver/xf86-video-mga/tree/src/mga_exa.c#n896
> 
> He, right.  Mattieu Herrb disabled this locally in OpenBSD's xenocara:
> 
>   revision 1.7
>   date: 2013/06/14 21:21:54;  author: matthieu;  state: Exp;  lines: +2 -0;
>   Disable broken EXA operations for now.
> 
> Breakage was probably introduced with commit
> e9109a0b04695d6971c94abe271dda2dc1a5e886.  Not sure if simply
> reverting that commit is an option.

Hmm no. My commit to disable some EXA operations was done before
Tormold's one. My guess is that EXA support never got finished on mga
since XAA was the default until it was removed from xserver. Then we
started to use EXA but no one actually tested the drivers on actual
hardware.

There are a few others (mach64, cirrus on the top of my head) that
needed similar surgery. I was hoping that someone with EXA expertise
would figure out the proper fixes so that we could re-enable the
accelerated code at some point. But it's clear almost 2 years later
that this is not going to happen, and that only a handful of people
care about this.
-- 
Matthieu Herrb


More information about the xorg-devel mailing list