Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Dev

Detecting video driver/chipset at runtime

 

 

MythTV dev RSS feed   Index | Next | Previous | View Threaded


olly at roomaroo

Jan 31, 2008, 3:11 PM

Post #1 of 3 (845 views)
Permalink
Detecting video driver/chipset at runtime

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?

Thanks for your help

Olly
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


danielk at cuymedia

Jan 31, 2008, 3:26 PM

Post #2 of 3 (797 views)
Permalink
Re: Detecting video driver/chipset at runtime [In reply to]

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


_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


olly at roomaroo

Feb 2, 2008, 9:20 AM

Post #3 of 3 (762 views)
Permalink
Re: Detecting video driver/chipset at runtime [In reply to]

On Jan 31, 2008 11:26 PM, Daniel Kristjansson <danielk[at]cuymedia.net> wrote:
> 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.)

I briefly thought about scanning the Xorg.0.log - the VIA driver
helpfully logs which chipset it's found. But that's way too ugly to be
a good solution.

How about testing for an environment variable at runtime - e.g.
MYTHTV_CX700_WORKAROUNDS, and using the workarounds if it's found? It
won't be totally transparent for the end user, but it would be easier
for them than patching and rebuilding the software. And it would be
trivial to add to the code.

Olly
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

MythTV dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.