<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2017-04-28 21:38 GMT+02:00 Rob Herring <span dir="ltr"><<a href="mailto:robh@kernel.org" target="_blank">robh@kernel.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Fri, Apr 28, 2017 at 10:58 AM, Mauro Rossi <<a href="mailto:issor.oruam@gmail.com">issor.oruam@gmail.com</a>> wrote:<br>
> 2017-04-28 14:23 GMT+02:00 Rob Herring <<a href="mailto:robh@kernel.org">robh@kernel.org</a>>:<br>
>> On Thu, Apr 27, 2017 at 9:50 PM, Chih-Wei Huang <<a href="mailto:cwhuang@android-x86.org">cwhuang@android-x86.org</a>> wrote:<br>
>>> A typo in the subject?<br>
>>> (s/building/build/)<br>
>><br>
>> It's a bit misleading as originally I wrote it such that a blank<br>
>> BOARD_GPU_DRIVERS would enable all drivers, then changed it to "all".<br>
>> So it's not really a default anymore.<br>
>><br>
>>> 2017-04-28 3:43 GMT+08:00 Rob Herring <<a href="mailto:robh@kernel.org">robh@kernel.org</a>>:<br>
>>>> If BOARD_GPU_DRIVERS is empty, build all the drivers. This doesn't<br>
>>>> enable building mesa as that is controlled by including libGLES_mesa in<br>
>>>> the product.<br>
>>>><br>
>>>> Signed-off-by: Rob Herring <<a href="mailto:robh@kernel.org">robh@kernel.org</a>><br>
>>>> ---<br>
>>>> Android.mk | 8 ++++++++<br>
>>>> 1 file changed, 8 insertions(+)<br>
>>>><br>
>>>> diff --git a/Android.mk b/Android.mk<br>
>>>> index 9f481ee7e109..76858c1616bc 100644<br>
>>>> --- a/Android.mk<br>
>>>> +++ b/Android.mk<br>
>>>> @@ -1,3 +1,4 @@<br>
>>>> +<br>
>>>> # Mesa 3-D graphics library<br>
>>>> #<br>
>>>> # Copyright (C) 2010-2011 Chia-I Wu <<a href="mailto:olvaffe@gmail.com">olvaffe@gmail.com</a>><br>
>>>> @@ -53,8 +54,15 @@ gallium_drivers := \<br>
>>>> vc4.HAVE_GALLIUM_VC4 \<br>
>>>> virgl.HAVE_GALLIUM_VIRGL<br>
>>>><br>
>>>> +$(warning $(BOARD_GPU_DRIVERS))<br>
>>>> +<br>
>>>> +ifeq ($(BOARD_GPU_DRIVERS),all)<br>
>>>> +MESA_BUILD_CLASSIC := $(filter HAVE_%, $(subst ., , $(classic_drivers)))<br>
>>>> +MESA_BUILD_GALLIUM := $(filter HAVE_%, $(subst ., , $(gallium_drivers)))<br>
>>>> +else<br>
>>>> MESA_BUILD_CLASSIC := $(strip $(foreach d, $(BOARD_GPU_DRIVERS), $(patsubst $(d).%,%, $(filter $(d).%, $(classic_drivers)))))<br>
>>>> MESA_BUILD_GALLIUM := $(strip $(foreach d, $(BOARD_GPU_DRIVERS), $(patsubst $(d).%,%, $(filter $(d).%, $(gallium_drivers)))))<br>
>>>> +endif<br>
>>>> $(foreach d, $(MESA_BUILD_CLASSIC) $(MESA_BUILD_GALLIUM), $(eval $(d) := true))<br>
>>>><br>
>>>> # host and target must be the same arch to generate matypes.h<br>
>>>> --<br>
>>><br>
>>> Aren't some drivers for arm or x86 only?<br>
>><br>
>> In practice, yes. But they should build on all architectures so folks<br>
>> can easily build test. If the arm only ones required an arm compiler<br>
>> for example, then none of the x86 folks would build them and check<br>
>> that their changes don't break any drivers.<br>
>><br>
>>> Is it really possible to build all drivers?<br>
>><br>
>> Yes. That is what my CI job does.<br>
>><br>
>> Rob<br>
><br>
> Is it possible to leave a $(warning ) in case someone specifies a<br>
> new/wrong driver in BOARD_GPU_DRIVERS?<br>
<br>
</div></div>Okay. It wasn't immediately<br>
<span class=""><br>
> In case I wanted to use mesa 17.2 to build swrast only, considering<br>
> that radeonsi/radeon require LLVM 3.8.0, how can I do that if mesa<br>
> builds everything?<br>
<br>
</span>BOARD_GPU_DRIVERS=swrast<br>
<span class=""><br>
> Why should we completely loose the possibility to control the list of<br>
> drivers in android, which is basically a one driver case (swrast) for<br>
> some android-x86 boards or when we could live with intel drivers like<br>
> in an Atom tablet?<br>
<br>
</span>You haven't. The existing way to list drivers is unchanged externally.<br>
<span class="HOEnZb"><font color="#888888"><br>
Rob<br>
</font></span></blockquote></div><br></div><div class="gmail_extra">Thanks and sorry I had completely misunderstood the commit message</div><div class="gmail_extra">Mauro</div></div>