v4l-conf returns bogus values using DGA
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
xawtv (Ubuntu) |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: xawtv
I'm using Ubuntu 9.10, v4l-conf is 3.95.dfsg.
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_
{
#ifdef HAVE_LIBXXF86DGA
[...]
XF86DGAGetV
[...]
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
This bug is fixed upstream in kernel 2.6.34-rc7. From the changelog:
commit 84a1d9c83e3e139 91b958c897b6e9d 6a5e4ce76d
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