v4l-conf returns bogus values using DGA

Bug #499734 reported by Michael Hunold on 2009-12-23
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xawtv (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: xawtv

I'm using Ubuntu 9.10, v4l-conf is 3.95.dfsg.1-8.1ubuntu1.

v4l-conf: using X11 display :0.0
dga: version 2.0
mode: 1280x1024, depth=24, bpp=32, bpl=28, base=unknown
can't open /dev/video0: No such file or directory

The output of bpl (= bytes per line) is totally bogus, it should be 5120 instead.
This confuses my Video4Linux2 driver and makes overlay video non-working.

I recompiled the package from source and could trace the problem down to
displayinfo_dga() in console/v4l-conf.c.

static void
displayinfo_dga(Display *dpy, struct DISPLAYINFO *d)
{
#ifdef HAVE_LIBXXF86DGA
[...]
    XF86DGAGetVideoLL(dpy,XDefaultScreen(dpy),(void*)&base,&width,&foo,&bar);
[...]
    d->bpl = width * d->bpp/8;
[...]

"width" is returned to be 7 and d->bpp is 32, so d->bpl will be calculated as 28.

If I just put #if 0 around this function, v4l-conf will behave correctly, because displayinfo_x11()
function correctly identifies bpl as 5120, but unfortunately will be outvoted by displayinfo_dga().

So I guess there is a problem with DGA support for my graphics card. It's an on-board
"AMD 780G Gigabyte GA-MA78GM UDH2" mainboard.

01:05.0 VGA compatible controller: ATI Technologies Inc Radeon HD 3200 Graphics
 Subsystem: Giga-byte Technology Device d000
 Flags: bus master, fast devsel, latency 0, IRQ 18
 Memory at d0000000 (32-bit, prefetchable) [size=256M]
 I/O ports at ee00 [size=256]
 Memory at fdfe0000 (32-bit, non-prefetchable) [size=64K]
 Memory at fde00000 (32-bit, non-prefetchable) [size=1M]
 Capabilities: <access denied>
 Kernel modules: radeon

madbiologist (me-again) wrote :

This bug is fixed upstream in kernel 2.6.34-rc7. From the changelog:

commit 84a1d9c83e3e13991b958c897b6e9d6a5e4ce76d
Author: Michael Hunold
Date: Sat Mar 13 11:45:46 2010 -0300

    V4L/DVB: saa7146: fix up bytesperline if it is an impossible value

    xawtv using DGA on a Radeon graphics card provides bogus
    values to S_FBUF, which will then screw up overlay video:

    https://bugs.launchpad.net/ubuntu/+source/xawtv/+bug/499734

    This fixes the bytesperline value if it is off completely.

    Signed-off-by: Michael Hunold
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

Changed in xawtv (Ubuntu):
status: New → Fix Committed
JC Hulce (soaringsky) wrote :

This bug has been marked as Fix Committed for over a year. If the fix has made it into Ubuntu, please mark this bug as Fix Released. If the fix has been released upstream, but not Ubuntu, create a new bug asking for the new version and tag it with upgrade-software-version. If this bug has not been fixed anywhere, change the status back to Confirmed.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers