Re: [Mesa-dev] [RFC] add a config file for dri loader to choose a different dri driver

2018-08-02 Thread Marek Olšák
On my machine, the global drirc resides in /usr/etc/. I guess it's in
a different place for each person. :)

Marek

On Tue, Jul 31, 2018 at 2:08 PM, Adam Jackson  wrote:
> On Tue, 2018-07-31 at 08:03 +, Yu, Qiang wrote:
>> Seems the mesa driconf infrastructure is just what I need:
>> https://dri.freedesktop.org/wiki/ConfigurationInfrastructure/
>>
>> So I can reference the loader_get_dri_config_device_id implementation
>> for adding loader driver override functionality in /etc/drirc:
>> 
>>   
>> 
>>   
>> 
>>
>> Thoughts?
>
> If you're going to go down this route, please also teach Mesa to look
> for drirc (or drirc.d) under /usr/share first, then /etc. /etc really
> is for per-machine configuration, Mesa and driver defaults properly
> belong in /usr/share.
>
> - ajax
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [RFC] add a config file for dri loader to choose a different dri driver

2018-08-01 Thread Emil Velikov
On 31 July 2018 at 14:35, Michel Dänzer  wrote:
> On 2018-07-31 10:03 AM, Yu, Qiang wrote:
>>
>> Seems the mesa driconf infrastructure is just what I need:
>> https://dri.freedesktop.org/wiki/ConfigurationInfrastructure/
>>
>> So I can reference the loader_get_dri_config_device_id implementation
>> for adding loader driver override functionality in /etc/drirc:
>> 
>>   
>> 
>>   
>> 
>>
>> Thoughts?
>
> Using the driconf infrastructure is definitely better than creating a
> new mechanism. It'll even allow configuring the driver per application. :)
>
> Grepping for device_id in src/util/xmlpool/t_options.h and
> src/loader/loader.c might be useful.
>
> Here's an example of how I imagine general and per-application driver
> configuration could work:
>
> 
>  
>
>   
>   
>
>   
>   
>
>   
>
>  
> 
>
Good suggestion Michel, I love it. I'm a fan of the full names -
kernel_driver/dri_driver.
There's plenty of inconsistencies in Mesa when using the shorthand "driver".

Thanks
Emil
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [RFC] add a config file for dri loader to choose a different dri driver

2018-07-31 Thread Yu, Qiang
So you mean like the xorg way (priority low -> high):
/usr/share/drirc.d/xxx.conf /etc/drirc.d/xxx.conf /etc/drirc ~/.drirc

OK, I'll add this for the ease of driver config.

Regards,
Qiang


From: Adam Jackson 
Sent: Wednesday, August 1, 2018 2:08:54 AM
To: Yu, Qiang; mesa-dev@lists.freedesktop.org
Cc: Emil Velikov
Subject: Re: [Mesa-dev] [RFC] add a config file for dri loader to choose a 
different dri driver

On Tue, 2018-07-31 at 08:03 +, Yu, Qiang wrote:
> Seems the mesa driconf infrastructure is just what I need:
> https://dri.freedesktop.org/wiki/ConfigurationInfrastructure/
>
> So I can reference the loader_get_dri_config_device_id implementation
> for adding loader driver override functionality in /etc/drirc:
> 
>   
> 
>   
> 
>
> Thoughts?

If you're going to go down this route, please also teach Mesa to look
for drirc (or drirc.d) under /usr/share first, then /etc. /etc really
is for per-machine configuration, Mesa and driver defaults properly
belong in /usr/share.

- ajax
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [RFC] add a config file for dri loader to choose a different dri driver

2018-07-31 Thread Yu, Qiang
Good idea. But adding a new device attribute seems over-kill, how
about just use the driver attribute and prefix a "k:" for kernel driver
like this:  ?

Regards,
Qiang


From: Michel Dänzer 
Sent: Tuesday, July 31, 2018 9:35:09 PM
To: Yu, Qiang
Cc: mesa-dev@lists.freedesktop.org; Emil Velikov
Subject: Re: [Mesa-dev] [RFC] add a config file for dri loader to choose a 
different dri driver

On 2018-07-31 10:03 AM, Yu, Qiang wrote:
>
> Seems the mesa driconf infrastructure is just what I need:
> https://dri.freedesktop.org/wiki/ConfigurationInfrastructure/
>
> So I can reference the loader_get_dri_config_device_id implementation
> for adding loader driver override functionality in /etc/drirc:
> 
>   
> 
>   
> 
>
> Thoughts?

Using the driconf infrastructure is definitely better than creating a
new mechanism. It'll even allow configuring the driver per application. :)

Grepping for device_id in src/util/xmlpool/t_options.h and
src/loader/loader.c might be useful.

Here's an example of how I imagine general and per-application driver
configuration could work:


 

  
  

  
  
   
  

 



--
Earthling Michel Dänzer   |   http://www.amd.com
Libre software enthusiast | Mesa and X developer
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [RFC] add a config file for dri loader to choose a different dri driver

2018-07-31 Thread Adam Jackson
On Tue, 2018-07-31 at 08:03 +, Yu, Qiang wrote:
> Seems the mesa driconf infrastructure is just what I need:
> https://dri.freedesktop.org/wiki/ConfigurationInfrastructure/
> 
> So I can reference the loader_get_dri_config_device_id implementation
> for adding loader driver override functionality in /etc/drirc:
> 
>   
> 
>   
> 
> 
> Thoughts?

If you're going to go down this route, please also teach Mesa to look
for drirc (or drirc.d) under /usr/share first, then /etc. /etc really
is for per-machine configuration, Mesa and driver defaults properly
belong in /usr/share.

- ajax
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [RFC] add a config file for dri loader to choose a different dri driver

2018-07-31 Thread Michel Dänzer
On 2018-07-31 10:03 AM, Yu, Qiang wrote:
> 
> Seems the mesa driconf infrastructure is just what I need:
> https://dri.freedesktop.org/wiki/ConfigurationInfrastructure/
> 
> So I can reference the loader_get_dri_config_device_id implementation
> for adding loader driver override functionality in /etc/drirc:
> 
>   
> 
>   
> 
> 
> Thoughts?

Using the driconf infrastructure is definitely better than creating a
new mechanism. It'll even allow configuring the driver per application. :)

Grepping for device_id in src/util/xmlpool/t_options.h and
src/loader/loader.c might be useful.

Here's an example of how I imagine general and per-application driver
configuration could work:


 

  
  

  
  
   
  

 



-- 
Earthling Michel Dänzer   |   http://www.amd.com
Libre software enthusiast | Mesa and X developer
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [RFC] add a config file for dri loader to choose a different dri driver

2018-07-31 Thread Yu, Qiang

Seems the mesa driconf infrastructure is just what I need:
https://dri.freedesktop.org/wiki/ConfigurationInfrastructure/

So I can reference the loader_get_dri_config_device_id implementation
for adding loader driver override functionality in /etc/drirc:

  

  


Thoughts?

Thanks,
Qiang


From: mesa-dev  on behalf of Yu, Qiang 

Sent: Tuesday, July 31, 2018 9:51:09 AM
To: mesa-dev@lists.freedesktop.org
Cc: Emil Velikov
Subject: [Mesa-dev] [RFC] add a config file for dri loader to choose a 
different dri driver

Hi guys,

As previously talked in:
https://lists.freedesktop.org/archives/mesa-dev/2017-April/152055.html

amdgpu-pro driver has interest to adopt the DRI interface to be compatable
with the mesa libgbm. But using MESA_LOADER_DRIVER_OVERRIDE
is not a good way to config OS GFX stack globally, so I'd like to introduce
a /etc/driconf.d/xxx.conf config file to select/overwrite the dri driver like 
this:
:

i.e amdgpu-pro case /etc/driconf.d/amdgpu.conf
amdgpu:amdgpu

Any feedback on this?

Thanks,
Qiang
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [RFC] add a config file for dri loader to choose a different dri driver

2018-07-30 Thread Yu, Qiang
Hi guys,

As previously talked in:
https://lists.freedesktop.org/archives/mesa-dev/2017-April/152055.html

amdgpu-pro driver has interest to adopt the DRI interface to be compatable
with the mesa libgbm. But using MESA_LOADER_DRIVER_OVERRIDE
is not a good way to config OS GFX stack globally, so I'd like to introduce
a /etc/driconf.d/xxx.conf config file to select/overwrite the dri driver like 
this:
:

i.e amdgpu-pro case /etc/driconf.d/amdgpu.conf
amdgpu:amdgpu

Any feedback on this?

Thanks,
Qiang
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev