diff mbox

[libdrm,v2,2/2] android: amdgpu: fix build break

Message ID 1501143652-3066-2-git-send-email-cwhuang@linux.org.tw (mailing list archive)
State New, archived
Headers show

Commit Message

Chih-Wei Huang July 27, 2017, 8:20 a.m. UTC
Define two macros to avoid building errors.

Fixes: 7e6bf88cac (amdgpu: move asic id table to a separate file)

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
---
 amdgpu/Android.mk | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Chih-Wei Huang Aug. 17, 2017, 3:31 a.m. UTC | #1
Ping. Is there any other concern to merge the fix?

2017-07-27 16:20 GMT+08:00 Chih-Wei Huang <cwhuang@android-x86.org>:
> Define two macros to avoid building errors.
>
> Fixes: 7e6bf88cac (amdgpu: move asic id table to a separate file)
>
> Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
> ---
>  amdgpu/Android.mk | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/amdgpu/Android.mk b/amdgpu/Android.mk
> index bf0611b..88d3765 100644
> --- a/amdgpu/Android.mk
> +++ b/amdgpu/Android.mk
> @@ -10,5 +10,11 @@ LOCAL_SHARED_LIBRARIES := libdrm
>
>  LOCAL_SRC_FILES := $(LIBDRM_AMDGPU_FILES)
>
> +LOCAL_CFLAGS := \
> +       -DAMDGPU_ASIC_ID_TABLE=\"/system/etc/hwdata/amdgpu.ids\" \
> +       -DAMDGPU_ASIC_ID_TABLE_NUM_ENTRIES=$(shell egrep -ci '^[0-9a-f]{4},.*[0-9a-f]+,' $(LIBDRM_TOP)/data/amdgpu.ids)
> +
> +LOCAL_REQUIRED_MODULES := amdgpu.ids
> +
>  include $(LIBDRM_COMMON_MK)
>  include $(BUILD_SHARED_LIBRARY)
> --
Emil Velikov Aug. 21, 2017, 12:18 p.m. UTC | #2
On 17 August 2017 at 04:31, Chih-Wei Huang <cwhuang@android-x86.org> wrote:
> Ping. Is there any other concern to merge the fix?
>
My earlier suggestion was to use the respective Android build system
variable, instead of hardcoding the actual path.
Merged v2 of the series, although I reserve my right of "I told you
so" as this comes to bite :-)

Thanks
Emil
Chih-Wei Huang Aug. 23, 2017, 9:03 a.m. UTC | #3
2017-08-21 20:18 GMT+08:00 Emil Velikov <emil.l.velikov@gmail.com>:
> On 17 August 2017 at 04:31, Chih-Wei Huang <cwhuang@android-x86.org> wrote:
>> Ping. Is there any other concern to merge the fix?
>>
> My earlier suggestion was to use the respective Android build system
> variable, instead of hardcoding the actual path.

Oh. Sorry I didn't really get your point.
But IMO that's not possible.
TARGET_OUT_ETC is not a valid path in the target device.
Unless you want to see a more complex rule like
/($notdir $(TARGET_OUT_ETC))/hwdata/amdgpu.ids ...

> Merged v2 of the series, although I reserve my right of "I told you
> so" as this comes to bite :-)
diff mbox

Patch

diff --git a/amdgpu/Android.mk b/amdgpu/Android.mk
index bf0611b..88d3765 100644
--- a/amdgpu/Android.mk
+++ b/amdgpu/Android.mk
@@ -10,5 +10,11 @@  LOCAL_SHARED_LIBRARIES := libdrm
 
 LOCAL_SRC_FILES := $(LIBDRM_AMDGPU_FILES)
 
+LOCAL_CFLAGS := \
+	-DAMDGPU_ASIC_ID_TABLE=\"/system/etc/hwdata/amdgpu.ids\" \
+	-DAMDGPU_ASIC_ID_TABLE_NUM_ENTRIES=$(shell egrep -ci '^[0-9a-f]{4},.*[0-9a-f]+,' $(LIBDRM_TOP)/data/amdgpu.ids)
+
+LOCAL_REQUIRED_MODULES := amdgpu.ids
+
 include $(LIBDRM_COMMON_MK)
 include $(BUILD_SHARED_LIBRARY)