Re: BTTV Driver under 2.2.18preX bug

From: Mark Cooke (mpc@star.sr.bham.ac.uk)
Date: Sun Sep 24 2000 - 13:18:48 EST


On Sun, 24 Sep 2000, Alan Cox wrote:

> Im waiting for someone to either explain why the changes should have caused
> the problem and to fix them.
>
> Right now I dont see what is going on so Im not changing anything until I
> understand what is up

Hi Alan,

Summary: outdated vidmem override causes problems because of a change
to bttv_open to call find_vga correctly the first time the device is
openned.

Details: (written as I rambled through the problem)

I've looked at the diff between 2.2.17 and 2.2.18pre9 wrt bttv.c, and
the only thing that looks possibly a cause is that the fix to
bttv_open to actually call find_vga when the device is openned is
exposing a bug / problem with the video memory base selection with my
graphics card. (Geforce 256)

*checks some more* Okay, found a problem with my installation here -
I have upgraded graphics cards from a TNT/2 to the Geforce and not
changed the vidmem override setting. *sigh*

The change in pre9 must expose this somehow - in a way that 17 final
didn't. Ie, actually calling find_vga puts a non-zero value into the
vidadr member of the win struct, and this enables various ioctls with
what was an incorrect override address - hence getting blank windows
and crashes.

Putting the right value into vidmem has fixed the problem here. I'm
just test compiling with a patch adding the Creative Labs Geforce 256
to the vidbases table in bttv.c, which will at least fix the logged
message from bttv that it can't find the graphics card, and obviate
the need for me to specify the vidmem manually...(though it doesn't
help for owners of other video cards).

bttv: PCI display adapter: <3>bttv: Unknown video memory base address.

01:00.0 VGA compatible controller: nVidia Corporation: Unknown device
0100 (rev 10) (prog-if 00 [VGA])
        Subsystem: Creative Labs: Unknown device 102d
        Flags: bus master, 66Mhz, medium devsel, latency 248, IRQ 10
        Memory at e0000000 (32-bit, non-prefetchable)
        Memory at d8000000 (32-bit, prefetchable)
        Capabilities: [60] Power Management version 1
        Capabilities: [44] AGP version 2.0

01:00.0 Class 0300: 10de:0100 (rev 10)
        Subsystem: 1102:102d
        Flags: bus master, 66Mhz, medium devsel, latency 248, IRQ 10
        Memory at e0000000 (32-bit, non-prefetchable)
        Memory at d8000000 (32-bit, prefetchable)
        Capabilities: [60] Power Management version 1
        Capabilities: [44] AGP version 2.0

The d8000000 address is the video ram. I'm assuming that the vendor
id is 0x10de, and the device id 0x0100, and making a guess that
because the memory is the 2nd listed, I need PCI_BASE_ADDRESS_1 in the
table too.

I've CC'd Jens so he can add the entries to pci.h in a form he
prefers.

Best regards,

Mark

-- 
+-------------------------------------------------------------------------+
Mark Cooke                  The views expressed above are mine and are not
Systems Programmer          necessarily representative of university policy
University Of Birmingham    URL: http://www.sr.bham.ac.uk/~mpc/
+-------------------------------------------------------------------------+



- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Sep 30 2000 - 21:00:12 EST