[Xorg-driver-geode] Xv PutImage crash

Cui, Hunk Hunk.Cui at amd.com
Fri Aug 13 01:21:43 PDT 2010


Hi, Daniel,
	
> -----Original Message-----
> >> It seems to me that the calculation of "size" (and hence
> >> total_dwords/dword_count) should consider the pitch of the input
> >> image, rather than the BPP set by gp_set_bpp(). This solves the crash:
> >>
> >>    /* CALCULATE THE SIZE OF ONE LINE */
> >>    size = pitch + indent;
> 
> Fixed it. What I missed above was setting the bpp to 8 in this path,
> which causes the calculation to become correct *and* for 8bpp to be
> correctly communicated to the hw.
> 
> The set_bpp call is valid. We're BLTing an image from system memory to video
> memory. We aren't displaying it on the screen; the screen output BPP is
> irrelevant. As we're copying without transforming the data in any way, the BLT
> output BPP needs to be the same as the input image.
> 
> Therefore the bug is that LXCopyFromSys currently expects 16bpp input data,
> but
> is called with 8bpp planes in the LXCopyPlanar path. This patch fixes it by
> deriving the bpp from the input parameters.
> 
> https://bugs.freedesktop.org/attachment.cgi?id=37578

	I have added your patches into driver. Also I can reproduce the crash before add the driver. As you said the bug is focus on 16bpp input data, I have some doubt to ask you. 
	Now it can only output 8bpp, doesn't output 16bpp after calculate the ((srcPitch / w) << 3), so make me doubt about the rationality, why you said it is called with 8bpp in the LXCopyPlanar path? Our geode driver can also do the 16bpp data.
	Looking forward to your reply. :)

Thanks,
Hunk Cui    



More information about the Xorg-driver-geode mailing list