On Fri, Feb 6, 2009 at 1:33 PM, Matt Keenan <Matt.Keenan at sun.com> wrote:
> Alan Coopersmith wrote:
>> Matt Keenan wrote:
>>>>>        verbose "Checking for Intel Graphics Card Type : "
>>>>>         # List taken from SUNWdrmr/postinstall
>>>>>         # Confirmed list (29/01/09)
>>>>>         #   pci8086,2562 - compiz fails, driver problem
>>>>>         #   pci8086,27a2 - compiz fails, driver problem
>>>>>         #   pci8086,2a42 - compiz runs
>>>>>         intel=`echo $prtconf_pv_output | $NAWK '{               \
>>>> I still think it's a mistake for your script to hardcode a list of
>>>> Intel & ATI chip ids, since you'll have to keep up with new ones as
>>>> they're added.
>>> This is what the driver team recommended to Erwann, and thus this is what I
>>> have implemented. I've contacted the DDU team to determine how the
>>> Device Driver
>>> Utility picks up the video driver, and if this is easy and quick to
>>> implement I
>>> may go down that route.
>>>
>>> Agreed that the list would require maintaining for intel chips at least.
>>
>> Why?  If it's just the list of chipsets the kernel DRM driver supports, then
>> seeing if the kernel driver attached to them should be enough.
>
> OK so what is the best means of determining if the Kernel DRM driver has
> attached ? modinfo ? prtconf ?
>
> what would I look for in the output from either of these specifically ?
>
> prtconf lists all the PCI's and you are suggesting that I really should not
> be looking for specific PCI numbers, if not then do you know what I should be
> looking for ?
>
> modinfo, I am looing for either "nvidia", "i915" or "radeon", is this 
> sufficient
> for determing both Card type on machine and if driver is installed ?
>
> You've also suggested that I not use Xorg.o.log as the interface is not
> stable. Given this is the modinfo check above enough ?
>
> thanks for your help
>
> Matt
>
>>> Do packages install a copy of "postinstall" anywhere on one's system ?
>>
>> IPS packages don't have postinstall scripts at all.   If you were just
>> going with trusting their postinstall script, then you're duplicating
>> the effort the kernel has already done to attach the driver to the
>> given pci ids and can just check if the kernel attached the driver.


The only way to be 100% sure that a (CURRENTLY!) supported
card/chipset is physically present plus to identify the specific model
(which you do not need for your purpose) would be something like
prtconf.

modinfo will of course only tell you driver name and version string.
If iterating over the modinfo output brings a result, you can be sure
that a card supported by "nvidia", "i915" or "radeon" must be present
somewhere, at least in a normal user's scenario, which you are
targeting. The only case where this would not be safe is when a user
has taken modload to load that module. He could do this without having
add_drv ' ed that driver, or with add_drv but without successfully
having attached the device, or even without a supported card around.
However, that user hardly matters to your project, as she would know
what she is doing.
While working on your project also consider mult-head configurations,
where - in the extreme scenario - all supported vendor's cards might
be there.

If you decide to use whatever hardwired list of vendors and card
models, maintain everything in a self-explaining customer-editable .cf
file and mention it in your README.

Reply via email to