[Xorg-driver-geode] Xv PutImage crash

Daniel Drake dsd at laptop.org
Wed Aug 4 19:46:18 PDT 2010


On 2 August 2010 16:48, Daniel Drake <dsd at laptop.org> wrote:
> On 2 August 2010 15:06, Daniel Drake <dsd at laptop.org> wrote:
>> 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;
>
> It gets weirder. After applying this fix, the crash goes away and my
> test video works fine.
> (http://proxy-48.dailymotion.com/video/791/905/21509197%3aogg_theora_vorbis%3a255.ogg?auth=1280796338-6f471aa2c1113efb638177362c0625cf&cache=0)
>
> But a low-resolution video (160x120) now hangs the machine before the
> first frame is even displayed.
> The 2 LXCopyFromSys calls complete fine, but it then hangs
> indefinitely in gp_wait_until_idle (called from LXDisplayVideo from
> LXPutImage).

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

Daniel


More information about the Xorg-driver-geode mailing list