[mythtv] Detecting video driver/chipset at runtime

Daniel Kristjansson danielk at cuymedia.net
Thu Jan 31 23:26:48 UTC 2008


On Thu, 2008-01-31 at 23:11 +0000, Oliver Maunder wrote:
> Hi
> 
> I've got a couple of tweaks that work around bugs in the official VIA
> graphics drivers to enable mythfrontend to run on VIA CX700M2 based
> boards (EPIA EX10000EG and EX15000EG).
> The tweaks involve not testing for DRM vsync, because that will lock
> the whole machine up, and not using I420 playback, cos it doesn't work
> properly.
> 
> I'm trying to find a way to include these changes in the codebase
> which won't be detrimental to users of other systems (i.e. every
> mythtv user apart from about 3 of us). Ideally I'd do this by
> detecting the graphics driver at runtime. I'd probably also need to
> detect the chipset used to, since there seem to be plenty of users of
> older VIA systems who don't have any problems.
> 
> I haven't been able to find any X calls that will do what I want,
> which is fair enough since X should be abstracting all those details.
> The closest I've managed to get is in
> VideoOutputXv::GrabSuitableXvPort, which gets the adapter name. On my
> system, this is XV_SWOV. Googling this name, it looks like this might
> be unique to VIA, but it's definitely not unique to the CX700M2
> chipset.
> 
> Has anyone got any idea how I can do this? Is there anywhere else in
> the code where this sort of workaround is used? Or am I coming at it
> from the wrong angle?

The only thing we check for driver oddities is the adapter name.

I've considered doing something like lspci does to get the actual
video hardware info. This won't tell you which video hardware
is being used for the particular display you are targeting, but
I don't know how one might get that from the X11 server. (i.e.
there may be two or more video adapters, say the built in one
and the one + the AGP one you are really using + the PCI one you
stuck in for a debug console; only one of them is for the current
display.)

-- Daniel




More information about the mythtv-dev mailing list