[Mesa-dev] Android: Fix vc4 build since XML changes.

Submitted by Rob Herring on July 11, 2017, 3:26 a.m.

Details

Message ID CAL_JsqKrnJpQHWNVhgVQnZAb8xPcsWJn3nuoQSiHa-eQ+YFdZA@mail.gmail.com
State New
Headers show
Series "Android: Fix vc4 build since XML changes." ( rev: 2 ) in Mesa

Not browsing as part of any series.

Commit Message

Rob Herring July 11, 2017, 3:26 a.m.
On Wed, Jul 5, 2017 at 1:19 PM, Eric Anholt <eric@anholt.net> wrote:
> For the automake build, -Isrc/ is implied from the gallium cflags, while
> Android gallium driver builds don't get that by default.  I think it'll be
> better for vc4 to have broadcom includes appear as "#include
> <broadcom/subdir/whatever.h>" to make it more clear where to look in the
> tree than "#include <subdir/whatever.h>" does.
> ---
>
> Rob: The patch *had* changed from what I submitted -- I replaced
> "intel" with "broadcom".  I wonder if maybe when you tested, you'd
> just dropped it, like this patch does.

Sorry, just getting around to testing this.

> I still wish we had a public docker image we could build Android Mesa
> from.  I looked at your scripts, but without access to an image, I'm
> not looking to build one from scratch.

I'll bug John Stultz about that. I know he is using docker for his build env.

>
>  src/broadcom/Android.genxml.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/broadcom/Android.genxml.mk b/src/broadcom/Android.genxml.mk
> index df44b2ec0b79..dfd00a93fbcf 100644
> --- a/src/broadcom/Android.genxml.mk
> +++ b/src/broadcom/Android.genxml.mk
> @@ -51,7 +51,7 @@ $(intermediates)/cle/v3d_packet_v21_pack.h: $(LOCAL_PATH)/cle/v3d_packet_v21.xml
>         $(call header-gen)
>
>  LOCAL_EXPORT_C_INCLUDE_DIRS := \
> -       $(MESA_TOP)/src/broadcom \
> +       $(MESA_TOP)/src \

This doesn't fix things because we build out of tree. Here's the fixes
I need. I haven't checked if how aligned this is to automake files,
but ideally we'd keep things similar to some extent (e.g. same include
paths). I'll make a proper patch if you are fine with these changes.

Patch hide | download patch | download mbox

diff --git a/src/broadcom/Android.genxml.mk b/src/broadcom/Android.genxml.mk
index dfd00a93fbcf..a504326135c5 100644
--- a/src/broadcom/Android.genxml.mk
+++ b/src/broadcom/Android.genxml.mk
@@ -37,7 +37,7 @@  $(intermediates)/dummy.c:
        $(hide) touch $@

 # This is the list of auto-generated files headers
-LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/,
$(BROADCOM_GENXML_GENERATED_FILES))
+LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/broadcom/,
$(BROADCOM_GENXML_GENERATED_FILES))

 define header-gen
        @mkdir -p $(dir $@)
@@ -45,13 +45,13 @@  define header-gen
        $(hide) $(PRIVATE_SCRIPT) $(PRIVATE_SCRIPT_FLAGS) $(PRIVATE_XML) > $@
 endef

-$(intermediates)/cle/v3d_packet_v21_pack.h: PRIVATE_SCRIPT :=
$(MESA_PYTHON2) $(LOCAL_PATH)/cle/gen_pack_header.py
-$(intermediates)/cle/v3d_packet_v21_pack.h: PRIVATE_XML :=
$(LOCAL_PATH)/cle/v3d_packet_v21.xml
-$(intermediates)/cle/v3d_packet_v21_pack.h:
$(LOCAL_PATH)/cle/v3d_packet_v21.xml
$(LOCAL_PATH)/cle/gen_pack_header.py
+$(intermediates)/broadcom/cle/v3d_packet_v21_pack.h: PRIVATE_SCRIPT
:= $(MESA_PYTHON2) $(LOCAL_PATH)/cle/gen_pack_header.py
+$(intermediates)/broadcom/cle/v3d_packet_v21_pack.h: PRIVATE_XML :=
$(LOCAL_PATH)/cle/v3d_packet_v21.xml
+$(intermediates)/broadcom/cle/v3d_packet_v21_pack.h:
$(LOCAL_PATH)/cle/v3d_packet_v21.xml
$(LOCAL_PATH)/cle/gen_pack_header.py
        $(call header-gen)

 LOCAL_EXPORT_C_INCLUDE_DIRS := \
-       $(MESA_TOP)/src \
+       $(MESA_TOP)/src/broadcom/cle \
        $(intermediates)

 include $(MESA_COMMON_MK)
diff --git a/src/gallium/drivers/vc4/vc4_cl_dump.c
b/src/gallium/drivers/vc4/vc4_cl_dump.c
index cbe35b0208e7..b14cf387d1e4 100644
--- a/src/gallium/drivers/vc4/vc4_cl_dump.c
+++ b/src/gallium/drivers/vc4/vc4_cl_dump.c
@@ -25,7 +25,7 @@ 
 #include "util/u_prim.h"
 #include "util/macros.h"
 #include "vc4_cl_dump.h"
-#include "vc4_packet.h"
+#include "kernel/vc4_packet.h"

 #define __gen_user_data void
 #define __gen_address_type uint32_t

Comments

Rob Herring <robh@kernel.org> writes:

> On Wed, Jul 5, 2017 at 1:19 PM, Eric Anholt <eric@anholt.net> wrote:
>> diff --git a/src/broadcom/Android.genxml.mk b/src/broadcom/Android.genxml.mk
>> index df44b2ec0b79..dfd00a93fbcf 100644
>> --- a/src/broadcom/Android.genxml.mk
>> +++ b/src/broadcom/Android.genxml.mk
>> @@ -51,7 +51,7 @@ $(intermediates)/cle/v3d_packet_v21_pack.h: $(LOCAL_PATH)/cle/v3d_packet_v21.xml
>>         $(call header-gen)
>>
>>  LOCAL_EXPORT_C_INCLUDE_DIRS := \
>> -       $(MESA_TOP)/src/broadcom \
>> +       $(MESA_TOP)/src \
>
> This doesn't fix things because we build out of tree. Here's the fixes
> I need. I haven't checked if how aligned this is to automake files,
> but ideally we'd keep things similar to some extent (e.g. same include
> paths). I'll make a proper patch if you are fine with these changes.

This is all fine with me.  Feel free to slap a commit message on it and
push with my ack.  :)