All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] android: libdrm_platform: add liblog shared dependency
@ 2019-03-17 20:50 Mauro Rossi
  2019-03-17 20:54 ` Mauro Rossi
  2019-03-18 11:40 ` Tapani Pälli
  0 siblings, 2 replies; 15+ messages in thread
From: Mauro Rossi @ 2019-03-17 20:50 UTC (permalink / raw)
  To: dri-devel; +Cc: robert.foss, Mauro Rossi

Fixes the following building error:

FAILED: $(OUT)/obj/SHARED_LIBRARIES/libdrm_platform_intermediates/LINKED/libdrm_platform.so
...
external/libdrm/xf86drm.c:146: error: undefined reference to '__android_log_vprint'
clang.real: error: linker command failed with exit code 1 (use -v to see invocation)

Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
---
 Android.mk | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Android.mk b/Android.mk
index f2c78bc1..f832b24e 100644
--- a/Android.mk
+++ b/Android.mk
@@ -61,6 +61,9 @@ LOCAL_EXPORT_C_INCLUDE_DIRS := \
        $(LOCAL_PATH) \
        $(LOCAL_PATH)/include/drm
 
+LOCAL_SHARED_LIBRARIES := \
+	liblog
+
 LOCAL_C_INCLUDES := \
        $(LOCAL_PATH)/include/drm
 
-- 
2.19.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH] android: libdrm_platform: add liblog shared dependency
  2019-03-17 20:50 [PATCH] android: libdrm_platform: add liblog shared dependency Mauro Rossi
@ 2019-03-17 20:54 ` Mauro Rossi
  2019-03-18  8:09   ` Robert Foss
  2019-03-18 11:40 ` Tapani Pälli
  1 sibling, 1 reply; 15+ messages in thread
From: Mauro Rossi @ 2019-03-17 20:54 UTC (permalink / raw)
  To: ML dri-devel; +Cc: Robert Foss

Hi,
I used the option --subject-prefix="PATCH libdrm"
but it did not go as expected.

Anyway, the patch is for Android build of mesa/drm
Mauro

On Sun, Mar 17, 2019 at 9:50 PM Mauro Rossi <issor.oruam@gmail.com> wrote:
>
> Fixes the following building error:
>
> FAILED: $(OUT)/obj/SHARED_LIBRARIES/libdrm_platform_intermediates/LINKED/libdrm_platform.so
> ...
> external/libdrm/xf86drm.c:146: error: undefined reference to '__android_log_vprint'
> clang.real: error: linker command failed with exit code 1 (use -v to see invocation)
>
> Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
> ---
>  Android.mk | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/Android.mk b/Android.mk
> index f2c78bc1..f832b24e 100644
> --- a/Android.mk
> +++ b/Android.mk
> @@ -61,6 +61,9 @@ LOCAL_EXPORT_C_INCLUDE_DIRS := \
>         $(LOCAL_PATH) \
>         $(LOCAL_PATH)/include/drm
>
> +LOCAL_SHARED_LIBRARIES := \
> +       liblog
> +
>  LOCAL_C_INCLUDES := \
>         $(LOCAL_PATH)/include/drm
>
> --
> 2.19.1
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] android: libdrm_platform: add liblog shared dependency
  2019-03-17 20:54 ` Mauro Rossi
@ 2019-03-18  8:09   ` Robert Foss
  2019-03-18  8:21     ` Robert Foss
  0 siblings, 1 reply; 15+ messages in thread
From: Robert Foss @ 2019-03-18  8:09 UTC (permalink / raw)
  To: Mauro Rossi, ML dri-devel

This is probably a good idea!


Reviewed-by: Robert Foss <robert.foss@collabora.com>

On 3/17/19 9:54 PM, Mauro Rossi wrote:
> Hi,
> I used the option --subject-prefix="PATCH libdrm"
> but it did not go as expected.
> 
> Anyway, the patch is for Android build of mesa/drm
> Mauro
> 
> On Sun, Mar 17, 2019 at 9:50 PM Mauro Rossi <issor.oruam@gmail.com> wrote:
>>
>> Fixes the following building error:
>>
>> FAILED: $(OUT)/obj/SHARED_LIBRARIES/libdrm_platform_intermediates/LINKED/libdrm_platform.so
>> ...
>> external/libdrm/xf86drm.c:146: error: undefined reference to '__android_log_vprint'
>> clang.real: error: linker command failed with exit code 1 (use -v to see invocation)
>>
>> Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
>> ---
>>   Android.mk | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/Android.mk b/Android.mk
>> index f2c78bc1..f832b24e 100644
>> --- a/Android.mk
>> +++ b/Android.mk
>> @@ -61,6 +61,9 @@ LOCAL_EXPORT_C_INCLUDE_DIRS := \
>>          $(LOCAL_PATH) \
>>          $(LOCAL_PATH)/include/drm
>>
>> +LOCAL_SHARED_LIBRARIES := \
>> +       liblog
>> +
>>   LOCAL_C_INCLUDES := \
>>          $(LOCAL_PATH)/include/drm
>>
>> --
>> 2.19.1
>>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] android: libdrm_platform: add liblog shared dependency
  2019-03-18  8:09   ` Robert Foss
@ 2019-03-18  8:21     ` Robert Foss
  2019-03-18  8:38       ` Mauro Rossi
  0 siblings, 1 reply; 15+ messages in thread
From: Robert Foss @ 2019-03-18  8:21 UTC (permalink / raw)
  To: Mauro Rossi, ML dri-devel

On a second note, this does not apply on libdrm/master due
to:

LOCAL_SHARED_LIBRARIES := \
	libcutils

My thinking is that libcutils probably can be replaced with liblog,
but I'm not 100% sure.


Rob.

On 3/18/19 9:09 AM, Robert Foss wrote:
> This is probably a good idea!
> 
> 
> Reviewed-by: Robert Foss <robert.foss@collabora.com>
> 
> On 3/17/19 9:54 PM, Mauro Rossi wrote:
>> Hi,
>> I used the option --subject-prefix="PATCH libdrm"
>> but it did not go as expected.
>>
>> Anyway, the patch is for Android build of mesa/drm
>> Mauro
>>
>> On Sun, Mar 17, 2019 at 9:50 PM Mauro Rossi <issor.oruam@gmail.com> wrote:
>>>
>>> Fixes the following building error:
>>>
>>> FAILED: 
>>> $(OUT)/obj/SHARED_LIBRARIES/libdrm_platform_intermediates/LINKED/libdrm_platform.so 
>>>
>>> ...
>>> external/libdrm/xf86drm.c:146: error: undefined reference to 
>>> '__android_log_vprint'
>>> clang.real: error: linker command failed with exit code 1 (use -v to see 
>>> invocation)
>>>
>>> Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
>>> ---
>>>   Android.mk | 3 +++
>>>   1 file changed, 3 insertions(+)
>>>
>>> diff --git a/Android.mk b/Android.mk
>>> index f2c78bc1..f832b24e 100644
>>> --- a/Android.mk
>>> +++ b/Android.mk
>>> @@ -61,6 +61,9 @@ LOCAL_EXPORT_C_INCLUDE_DIRS := \
>>>          $(LOCAL_PATH) \
>>>          $(LOCAL_PATH)/include/drm
>>>
>>> +LOCAL_SHARED_LIBRARIES := \
>>> +       liblog
>>> +
>>>   LOCAL_C_INCLUDES := \
>>>          $(LOCAL_PATH)/include/drm
>>>
>>> -- 
>>> 2.19.1
>>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] android: libdrm_platform: add liblog shared dependency
  2019-03-18  8:21     ` Robert Foss
@ 2019-03-18  8:38       ` Mauro Rossi
  2019-03-18  9:58         ` Robert Foss
  0 siblings, 1 reply; 15+ messages in thread
From: Mauro Rossi @ 2019-03-18  8:38 UTC (permalink / raw)
  To: Robert Foss; +Cc: ML dri-devel

Hi Robert,

On Mon, Mar 18, 2019 at 9:21 AM Robert Foss <robert.foss@collabora.com> wrote:
>
> On a second note, this does not apply on libdrm/master due
> to:
>
> LOCAL_SHARED_LIBRARIES := \
>         libcutils

Sorry, we have an additional Google patch, not present in libdrm/master
that adds libdrm_platform module, but it is for a specific Google issue. [1]

However with libdrm module we have both liblog and libcutils shared dependencies

[1] http://git.osdn.net/view?p=android-x86/external-libdrm.git;a=commit;h=8ccbfeab9fb2bddf4585339a0bcbea2f1e3ffa1e

Mauro

>
> My thinking is that libcutils probably can be replaced with liblog,
> but I'm not 100% sure.
>
>
> Rob.
>
> On 3/18/19 9:09 AM, Robert Foss wrote:
> > This is probably a good idea!
> >
> >
> > Reviewed-by: Robert Foss <robert.foss@collabora.com>
> >
> > On 3/17/19 9:54 PM, Mauro Rossi wrote:
> >> Hi,
> >> I used the option --subject-prefix="PATCH libdrm"
> >> but it did not go as expected.
> >>
> >> Anyway, the patch is for Android build of mesa/drm
> >> Mauro
> >>
> >> On Sun, Mar 17, 2019 at 9:50 PM Mauro Rossi <issor.oruam@gmail.com> wrote:
> >>>
> >>> Fixes the following building error:
> >>>
> >>> FAILED:
> >>> $(OUT)/obj/SHARED_LIBRARIES/libdrm_platform_intermediates/LINKED/libdrm_platform.so
> >>>
> >>> ...
> >>> external/libdrm/xf86drm.c:146: error: undefined reference to
> >>> '__android_log_vprint'
> >>> clang.real: error: linker command failed with exit code 1 (use -v to see
> >>> invocation)
> >>>
> >>> Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
> >>> ---
> >>>   Android.mk | 3 +++
> >>>   1 file changed, 3 insertions(+)
> >>>
> >>> diff --git a/Android.mk b/Android.mk
> >>> index f2c78bc1..f832b24e 100644
> >>> --- a/Android.mk
> >>> +++ b/Android.mk
> >>> @@ -61,6 +61,9 @@ LOCAL_EXPORT_C_INCLUDE_DIRS := \
> >>>          $(LOCAL_PATH) \
> >>>          $(LOCAL_PATH)/include/drm
> >>>
> >>> +LOCAL_SHARED_LIBRARIES := \
> >>> +       liblog
> >>> +
> >>>   LOCAL_C_INCLUDES := \
> >>>          $(LOCAL_PATH)/include/drm
> >>>
> >>> --
> >>> 2.19.1
> >>>
> >> _______________________________________________
> >> dri-devel mailing list
> >> dri-devel@lists.freedesktop.org
> >> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> >>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] android: libdrm_platform: add liblog shared dependency
  2019-03-18  8:38       ` Mauro Rossi
@ 2019-03-18  9:58         ` Robert Foss
  2019-03-18 13:11           ` Mauro Rossi
  0 siblings, 1 reply; 15+ messages in thread
From: Robert Foss @ 2019-03-18  9:58 UTC (permalink / raw)
  To: Mauro Rossi; +Cc: ML dri-devel

Hey Mauro,

On 3/18/19 9:38 AM, Mauro Rossi wrote:
> Hi Robert,
> 
> On Mon, Mar 18, 2019 at 9:21 AM Robert Foss <robert.foss@collabora.com> wrote:
>>
>> On a second note, this does not apply on libdrm/master due
>> to:
>>
>> LOCAL_SHARED_LIBRARIES := \
>>          libcutils
> 
> Sorry, we have an additional Google patch, not present in libdrm/master
> that adds libdrm_platform module, but it is for a specific Google issue. [1]
> 
> However with libdrm module we have both liblog and libcutils shared dependencies
> 
> [1] http://git.osdn.net/view?p=android-x86/external-libdrm.git;a=commit;h=8ccbfeab9fb2bddf4585339a0bcbea2f1e3ffa1e

Do you know if [1] causes incompatibility issues with earlier android verions?
If not I would suggest upstreaming it too.

> 
> Mauro
> 
>>
>> My thinking is that libcutils probably can be replaced with liblog,
>> but I'm not 100% sure.
>>
>>
>> Rob.
>>
>> On 3/18/19 9:09 AM, Robert Foss wrote:
>>> This is probably a good idea!
>>>
>>>
>>> Reviewed-by: Robert Foss <robert.foss@collabora.com>
>>>
>>> On 3/17/19 9:54 PM, Mauro Rossi wrote:
>>>> Hi,
>>>> I used the option --subject-prefix="PATCH libdrm"
>>>> but it did not go as expected.
>>>>
>>>> Anyway, the patch is for Android build of mesa/drm
>>>> Mauro
>>>>
>>>> On Sun, Mar 17, 2019 at 9:50 PM Mauro Rossi <issor.oruam@gmail.com> wrote:
>>>>>
>>>>> Fixes the following building error:
>>>>>
>>>>> FAILED:
>>>>> $(OUT)/obj/SHARED_LIBRARIES/libdrm_platform_intermediates/LINKED/libdrm_platform.so
>>>>>
>>>>> ...
>>>>> external/libdrm/xf86drm.c:146: error: undefined reference to
>>>>> '__android_log_vprint'
>>>>> clang.real: error: linker command failed with exit code 1 (use -v to see
>>>>> invocation)
>>>>>
>>>>> Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
>>>>> ---
>>>>>    Android.mk | 3 +++
>>>>>    1 file changed, 3 insertions(+)
>>>>>
>>>>> diff --git a/Android.mk b/Android.mk
>>>>> index f2c78bc1..f832b24e 100644
>>>>> --- a/Android.mk
>>>>> +++ b/Android.mk
>>>>> @@ -61,6 +61,9 @@ LOCAL_EXPORT_C_INCLUDE_DIRS := \
>>>>>           $(LOCAL_PATH) \
>>>>>           $(LOCAL_PATH)/include/drm
>>>>>
>>>>> +LOCAL_SHARED_LIBRARIES := \
>>>>> +       liblog
>>>>> +
>>>>>    LOCAL_C_INCLUDES := \
>>>>>           $(LOCAL_PATH)/include/drm
>>>>>
>>>>> --
>>>>> 2.19.1
>>>>>
>>>> _______________________________________________
>>>> dri-devel mailing list
>>>> dri-devel@lists.freedesktop.org
>>>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>>>>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] android: libdrm_platform: add liblog shared dependency
  2019-03-17 20:50 [PATCH] android: libdrm_platform: add liblog shared dependency Mauro Rossi
  2019-03-17 20:54 ` Mauro Rossi
@ 2019-03-18 11:40 ` Tapani Pälli
  1 sibling, 0 replies; 15+ messages in thread
From: Tapani Pälli @ 2019-03-18 11:40 UTC (permalink / raw)
  To: Mauro Rossi, dri-devel; +Cc: robert.foss

It seems like there is no usage of __android_log_vprint in upstream 
libdrm. Perhaps this was against libdrm with some android specific 
changes on top?

On 3/17/19 10:50 PM, Mauro Rossi wrote:
> Fixes the following building error:
> 
> FAILED: $(OUT)/obj/SHARED_LIBRARIES/libdrm_platform_intermediates/LINKED/libdrm_platform.so
> ...
> external/libdrm/xf86drm.c:146: error: undefined reference to '__android_log_vprint'
> clang.real: error: linker command failed with exit code 1 (use -v to see invocation)
> 
> Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
> ---
>   Android.mk | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/Android.mk b/Android.mk
> index f2c78bc1..f832b24e 100644
> --- a/Android.mk
> +++ b/Android.mk
> @@ -61,6 +61,9 @@ LOCAL_EXPORT_C_INCLUDE_DIRS := \
>          $(LOCAL_PATH) \
>          $(LOCAL_PATH)/include/drm
>   
> +LOCAL_SHARED_LIBRARIES := \
> +	liblog
> +
>   LOCAL_C_INCLUDES := \
>          $(LOCAL_PATH)/include/drm
>   
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] android: libdrm_platform: add liblog shared dependency
  2019-03-18  9:58         ` Robert Foss
@ 2019-03-18 13:11           ` Mauro Rossi
  2019-03-18 13:25             ` Robert Foss
  0 siblings, 1 reply; 15+ messages in thread
From: Mauro Rossi @ 2019-03-18 13:11 UTC (permalink / raw)
  To: Robert Foss, Tapani Pälli; +Cc: ML dri-devel

Hi,

On Mon, Mar 18, 2019 at 10:58 AM Robert Foss <robert.foss@collabora.com> wrote:
>
> Hey Mauro,
>
> On 3/18/19 9:38 AM, Mauro Rossi wrote:
> > Hi Robert,
> >
> > On Mon, Mar 18, 2019 at 9:21 AM Robert Foss <robert.foss@collabora.com> wrote:
> >>
> >> On a second note, this does not apply on libdrm/master due
> >> to:
> >>
> >> LOCAL_SHARED_LIBRARIES := \
> >>          libcutils
> >
> > Sorry, we have an additional Google patch, not present in libdrm/master
> > that adds libdrm_platform module, but it is for a specific Google issue. [1]
> >
> > However with libdrm module we have both liblog and libcutils shared dependencies
> >
> > [1] http://git.osdn.net/view?p=android-x86/external-libdrm.git;a=commit;h=8ccbfeab9fb2bddf4585339a0bcbea2f1e3ffa1e
>
> Do you know if [1] causes incompatibility issues with earlier android verions?
> If not I would suggest upstreaming it too.

I used those patches to build with nougat-x86 and there was no issue.

To be precise I did a double rookie mistake, because __android_log_vprint
not used in upstream libdrm and libdrm_platform not used either.

Now starting from my mistakes, let's see if there is anything useful
to libdrm project

In our builds Chih-Wei Huang said that libdrm_platform is not used,
meaning not added to packages list,
however with oreo-x86 the build error appeared and the liblog dependency.

 __android_log_vprint is used with __ANDROID__ braces
in a special patch [2] by Chih-Wei Huang which adds capability to print logs
in logcat

If it's not too invasive in libdrm, it could be useful.
Cheers
Mauro

[2] http://git.osdn.net/view?p=android-x86/external-libdrm.git;a=commitdiff;h=bcee43063ffd52a8677029c9ae6f4203563460f4;hp=81d7264033db4946a00003bf1ee82eb6c21260f9

>
> >
> > Mauro
> >
> >>
> >> My thinking is that libcutils probably can be replaced with liblog,
> >> but I'm not 100% sure.
> >>
> >>
> >> Rob.
> >>
> >> On 3/18/19 9:09 AM, Robert Foss wrote:
> >>> This is probably a good idea!
> >>>
> >>>
> >>> Reviewed-by: Robert Foss <robert.foss@collabora.com>
> >>>
> >>> On 3/17/19 9:54 PM, Mauro Rossi wrote:
> >>>> Hi,
> >>>> I used the option --subject-prefix="PATCH libdrm"
> >>>> but it did not go as expected.
> >>>>
> >>>> Anyway, the patch is for Android build of mesa/drm
> >>>> Mauro
> >>>>
> >>>> On Sun, Mar 17, 2019 at 9:50 PM Mauro Rossi <issor.oruam@gmail.com> wrote:
> >>>>>
> >>>>> Fixes the following building error:
> >>>>>
> >>>>> FAILED:
> >>>>> $(OUT)/obj/SHARED_LIBRARIES/libdrm_platform_intermediates/LINKED/libdrm_platform.so
> >>>>>
> >>>>> ...
> >>>>> external/libdrm/xf86drm.c:146: error: undefined reference to
> >>>>> '__android_log_vprint'
> >>>>> clang.real: error: linker command failed with exit code 1 (use -v to see
> >>>>> invocation)
> >>>>>
> >>>>> Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
> >>>>> ---
> >>>>>    Android.mk | 3 +++
> >>>>>    1 file changed, 3 insertions(+)
> >>>>>
> >>>>> diff --git a/Android.mk b/Android.mk
> >>>>> index f2c78bc1..f832b24e 100644
> >>>>> --- a/Android.mk
> >>>>> +++ b/Android.mk
> >>>>> @@ -61,6 +61,9 @@ LOCAL_EXPORT_C_INCLUDE_DIRS := \
> >>>>>           $(LOCAL_PATH) \
> >>>>>           $(LOCAL_PATH)/include/drm
> >>>>>
> >>>>> +LOCAL_SHARED_LIBRARIES := \
> >>>>> +       liblog
> >>>>> +
> >>>>>    LOCAL_C_INCLUDES := \
> >>>>>           $(LOCAL_PATH)/include/drm
> >>>>>
> >>>>> --
> >>>>> 2.19.1
> >>>>>
> >>>> _______________________________________________
> >>>> dri-devel mailing list
> >>>> dri-devel@lists.freedesktop.org
> >>>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> >>>>
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel
> >
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] android: libdrm_platform: add liblog shared dependency
  2019-03-18 13:11           ` Mauro Rossi
@ 2019-03-18 13:25             ` Robert Foss
  2019-03-18 13:32               ` Tapani Pälli
  0 siblings, 1 reply; 15+ messages in thread
From: Robert Foss @ 2019-03-18 13:25 UTC (permalink / raw)
  To: Mauro Rossi, Tapani Pälli; +Cc: ML dri-devel

Hey,

On 3/18/19 2:11 PM, Mauro Rossi wrote:
> Hi,
> 
> On Mon, Mar 18, 2019 at 10:58 AM Robert Foss <robert.foss@collabora.com> wrote:
>>
>> Hey Mauro,
>>
>> On 3/18/19 9:38 AM, Mauro Rossi wrote:
>>> Hi Robert,
>>>
>>> On Mon, Mar 18, 2019 at 9:21 AM Robert Foss <robert.foss@collabora.com> wrote:
>>>>
>>>> On a second note, this does not apply on libdrm/master due
>>>> to:
>>>>
>>>> LOCAL_SHARED_LIBRARIES := \
>>>>           libcutils
>>>
>>> Sorry, we have an additional Google patch, not present in libdrm/master
>>> that adds libdrm_platform module, but it is for a specific Google issue. [1]
>>>
>>> However with libdrm module we have both liblog and libcutils shared dependencies
>>>
>>> [1] http://git.osdn.net/view?p=android-x86/external-libdrm.git;a=commit;h=8ccbfeab9fb2bddf4585339a0bcbea2f1e3ffa1e
>>
>> Do you know if [1] causes incompatibility issues with earlier android verions?
>> If not I would suggest upstreaming it too.
> 
> I used those patches to build with nougat-x86 and there was no issue.
> 
> To be precise I did a double rookie mistake, because __android_log_vprint
> not used in upstream libdrm and libdrm_platform not used either.
> 
> Now starting from my mistakes, let's see if there is anything useful
> to libdrm project
> 
> In our builds Chih-Wei Huang said that libdrm_platform is not used,
> meaning not added to packages list,
> however with oreo-x86 the build error appeared and the liblog dependency.
> 
>   __android_log_vprint is used with __ANDROID__ braces
> in a special patch [2] by Chih-Wei Huang which adds capability to print logs
> in logcat
> 
> If it's not too invasive in libdrm, it could be useful.
> Cheers
> Mauro
> 
> [2] http://git.osdn.net/view?p=android-x86/external-libdrm.git;a=commitdiff;h=bcee43063ffd52a8677029c9ae6f4203563460f4;hp=81d7264033db4946a00003bf1ee82eb6c21260f9

[2] Seems like a good idea to me.
Logcat really is the only intended path for logging on Android, and redirecting 
our logs there does make sense to me.

But, I'm not sure about I like the way [2] disregards log-levels in drmMsg().


Rob.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] android: libdrm_platform: add liblog shared dependency
  2019-03-18 13:25             ` Robert Foss
@ 2019-03-18 13:32               ` Tapani Pälli
  2019-04-17 17:49                 ` Emil Velikov
  2019-04-22  9:39                 ` Mauro Rossi
  0 siblings, 2 replies; 15+ messages in thread
From: Tapani Pälli @ 2019-03-18 13:32 UTC (permalink / raw)
  To: Robert Foss, Mauro Rossi; +Cc: ML dri-devel



On 3/18/19 3:25 PM, Robert Foss wrote:
> Hey,
> 
> On 3/18/19 2:11 PM, Mauro Rossi wrote:
>> Hi,
>>
>> On Mon, Mar 18, 2019 at 10:58 AM Robert Foss 
>> <robert.foss@collabora.com> wrote:
>>>
>>> Hey Mauro,
>>>
>>> On 3/18/19 9:38 AM, Mauro Rossi wrote:
>>>> Hi Robert,
>>>>
>>>> On Mon, Mar 18, 2019 at 9:21 AM Robert Foss 
>>>> <robert.foss@collabora.com> wrote:
>>>>>
>>>>> On a second note, this does not apply on libdrm/master due
>>>>> to:
>>>>>
>>>>> LOCAL_SHARED_LIBRARIES := \
>>>>>           libcutils
>>>>
>>>> Sorry, we have an additional Google patch, not present in libdrm/master
>>>> that adds libdrm_platform module, but it is for a specific Google 
>>>> issue. [1]
>>>>
>>>> However with libdrm module we have both liblog and libcutils shared 
>>>> dependencies
>>>>
>>>> [1] 
>>>> http://git.osdn.net/view?p=android-x86/external-libdrm.git;a=commit;h=8ccbfeab9fb2bddf4585339a0bcbea2f1e3ffa1e 
>>>>
>>>
>>> Do you know if [1] causes incompatibility issues with earlier android 
>>> verions?
>>> If not I would suggest upstreaming it too.
>>
>> I used those patches to build with nougat-x86 and there was no issue.
>>
>> To be precise I did a double rookie mistake, because __android_log_vprint
>> not used in upstream libdrm and libdrm_platform not used either.
>>
>> Now starting from my mistakes, let's see if there is anything useful
>> to libdrm project
>>
>> In our builds Chih-Wei Huang said that libdrm_platform is not used,
>> meaning not added to packages list,
>> however with oreo-x86 the build error appeared and the liblog dependency.
>>
>>   __android_log_vprint is used with __ANDROID__ braces
>> in a special patch [2] by Chih-Wei Huang which adds capability to 
>> print logs
>> in logcat
>>
>> If it's not too invasive in libdrm, it could be useful.
>> Cheers
>> Mauro
>>
>> [2] 
>> http://git.osdn.net/view?p=android-x86/external-libdrm.git;a=commitdiff;h=bcee43063ffd52a8677029c9ae6f4203563460f4;hp=81d7264033db4946a00003bf1ee82eb6c21260f9 
>>
> 
> [2] Seems like a good idea to me.
> Logcat really is the only intended path for logging on Android, and 
> redirecting our logs there does make sense to me.
> 
> But, I'm not sure about I like the way [2] disregards log-levels in 
> drmMsg().
> 

Yeah, I think it's a good idea. I see that in mesa we include 
"android/log.h", not "log/log.h", will need to make sure we get that 
correctly, maybe older versions did "log/log.h"?

// Tapani
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] android: libdrm_platform: add liblog shared dependency
  2019-03-18 13:32               ` Tapani Pälli
@ 2019-04-17 17:49                 ` Emil Velikov
  2019-04-22  9:46                   ` Mauro Rossi
  2019-04-22  9:39                 ` Mauro Rossi
  1 sibling, 1 reply; 15+ messages in thread
From: Emil Velikov @ 2019-04-17 17:49 UTC (permalink / raw)
  To: Tapani Pälli; +Cc: Robert Foss, Mauro Rossi, ML dri-devel

On Mon, 18 Mar 2019 at 13:32, Tapani Pälli <tapani.palli@intel.com> wrote:
> On 3/18/19 3:25 PM, Robert Foss wrote:
> > Hey,
> >
> > On 3/18/19 2:11 PM, Mauro Rossi wrote:
> >> Hi,
> >>
> >> On Mon, Mar 18, 2019 at 10:58 AM Robert Foss
> >> <robert.foss@collabora.com> wrote:
> >>>
> >>> Hey Mauro,
> >>>
> >>> On 3/18/19 9:38 AM, Mauro Rossi wrote:
> >>>> Hi Robert,
> >>>>
> >>>> On Mon, Mar 18, 2019 at 9:21 AM Robert Foss
> >>>> <robert.foss@collabora.com> wrote:
> >>>>>
> >>>>> On a second note, this does not apply on libdrm/master due
> >>>>> to:
> >>>>>
> >>>>> LOCAL_SHARED_LIBRARIES := \
> >>>>>           libcutils
> >>>>
> >>>> Sorry, we have an additional Google patch, not present in libdrm/master
> >>>> that adds libdrm_platform module, but it is for a specific Google
> >>>> issue. [1]
> >>>>
> >>>> However with libdrm module we have both liblog and libcutils shared
> >>>> dependencies
> >>>>
> >>>> [1]
> >>>> http://git.osdn.net/view?p=android-x86/external-libdrm.git;a=commit;h=8ccbfeab9fb2bddf4585339a0bcbea2f1e3ffa1e
> >>>>
> >>>
> >>> Do you know if [1] causes incompatibility issues with earlier android
> >>> verions?
> >>> If not I would suggest upstreaming it too.
> >>
> >> I used those patches to build with nougat-x86 and there was no issue.
> >>
> >> To be precise I did a double rookie mistake, because __android_log_vprint
> >> not used in upstream libdrm and libdrm_platform not used either.
> >>
> >> Now starting from my mistakes, let's see if there is anything useful
> >> to libdrm project
> >>
> >> In our builds Chih-Wei Huang said that libdrm_platform is not used,
> >> meaning not added to packages list,
> >> however with oreo-x86 the build error appeared and the liblog dependency.
> >>
> >>   __android_log_vprint is used with __ANDROID__ braces
> >> in a special patch [2] by Chih-Wei Huang which adds capability to
> >> print logs
> >> in logcat
> >>
> >> If it's not too invasive in libdrm, it could be useful.
> >> Cheers
> >> Mauro
> >>
> >> [2]
> >> http://git.osdn.net/view?p=android-x86/external-libdrm.git;a=commitdiff;h=bcee43063ffd52a8677029c9ae6f4203563460f4;hp=81d7264033db4946a00003bf1ee82eb6c21260f9
> >>
> >
> > [2] Seems like a good idea to me.
> > Logcat really is the only intended path for logging on Android, and
> > redirecting our logs there does make sense to me.
> >
> > But, I'm not sure about I like the way [2] disregards log-levels in
> > drmMsg().
> >
>
> Yeah, I think it's a good idea. I see that in mesa we include
> "android/log.h", not "log/log.h", will need to make sure we get that
> correctly, maybe older versions did "log/log.h"?
>
I would also be in favour of adding logcat support to libdrm.

Mauro, please respin when you have the time.

Thanks
Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] android: libdrm_platform: add liblog shared dependency
  2019-03-18 13:32               ` Tapani Pälli
  2019-04-17 17:49                 ` Emil Velikov
@ 2019-04-22  9:39                 ` Mauro Rossi
  1 sibling, 0 replies; 15+ messages in thread
From: Mauro Rossi @ 2019-04-22  9:39 UTC (permalink / raw)
  To: Tapani Pälli, Chih-Wei Huang, Emil Velikov; +Cc: Robert Foss, ML dri-devel

Hi,

I can try replacing <log/log.h> with <android/log.h>,
but I would like to get confirmation from Chih-Wei, the original author of [1]

Mauro

[1] http://git.osdn.net/view?p=android-x86/external-libdrm.git;a=commit;h=9d2a4cc3a16b5b464fda0a0c321dd1f5acadaa33


On Mon, Mar 18, 2019 at 2:32 PM Tapani Pälli <tapani.palli@intel.com> wrote:
>
>
>
> On 3/18/19 3:25 PM, Robert Foss wrote:
> > Hey,
> >
> > On 3/18/19 2:11 PM, Mauro Rossi wrote:
> >> Hi,
> >>
> >> On Mon, Mar 18, 2019 at 10:58 AM Robert Foss
> >> <robert.foss@collabora.com> wrote:
> >>>
> >>> Hey Mauro,
> >>>
> >>> On 3/18/19 9:38 AM, Mauro Rossi wrote:
> >>>> Hi Robert,
> >>>>
> >>>> On Mon, Mar 18, 2019 at 9:21 AM Robert Foss
> >>>> <robert.foss@collabora.com> wrote:
> >>>>>
> >>>>> On a second note, this does not apply on libdrm/master due
> >>>>> to:
> >>>>>
> >>>>> LOCAL_SHARED_LIBRARIES := \
> >>>>>           libcutils
> >>>>
> >>>> Sorry, we have an additional Google patch, not present in libdrm/master
> >>>> that adds libdrm_platform module, but it is for a specific Google
> >>>> issue. [1]
> >>>>
> >>>> However with libdrm module we have both liblog and libcutils shared
> >>>> dependencies
> >>>>
> >>>> [1]
> >>>> http://git.osdn.net/view?p=android-x86/external-libdrm.git;a=commit;h=8ccbfeab9fb2bddf4585339a0bcbea2f1e3ffa1e
> >>>>
> >>>
> >>> Do you know if [1] causes incompatibility issues with earlier android
> >>> verions?
> >>> If not I would suggest upstreaming it too.
> >>
> >> I used those patches to build with nougat-x86 and there was no issue.
> >>
> >> To be precise I did a double rookie mistake, because __android_log_vprint
> >> not used in upstream libdrm and libdrm_platform not used either.
> >>
> >> Now starting from my mistakes, let's see if there is anything useful
> >> to libdrm project
> >>
> >> In our builds Chih-Wei Huang said that libdrm_platform is not used,
> >> meaning not added to packages list,
> >> however with oreo-x86 the build error appeared and the liblog dependency.
> >>
> >>   __android_log_vprint is used with __ANDROID__ braces
> >> in a special patch [2] by Chih-Wei Huang which adds capability to
> >> print logs
> >> in logcat
> >>
> >> If it's not too invasive in libdrm, it could be useful.
> >> Cheers
> >> Mauro
> >>
> >> [2]
> >> http://git.osdn.net/view?p=android-x86/external-libdrm.git;a=commitdiff;h=bcee43063ffd52a8677029c9ae6f4203563460f4;hp=81d7264033db4946a00003bf1ee82eb6c21260f9
> >>
> >
> > [2] Seems like a good idea to me.
> > Logcat really is the only intended path for logging on Android, and
> > redirecting our logs there does make sense to me.
> >
> > But, I'm not sure about I like the way [2] disregards log-levels in
> > drmMsg().
> >
>
> Yeah, I think it's a good idea. I see that in mesa we include
> "android/log.h", not "log/log.h", will need to make sure we get that
> correctly, maybe older versions did "log/log.h"?
>
> // Tapani
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] android: libdrm_platform: add liblog shared dependency
  2019-04-17 17:49                 ` Emil Velikov
@ 2019-04-22  9:46                   ` Mauro Rossi
  2019-04-26 22:06                     ` Mauro Rossi
  0 siblings, 1 reply; 15+ messages in thread
From: Mauro Rossi @ 2019-04-22  9:46 UTC (permalink / raw)
  To: Emil Velikov; +Cc: Robert Foss, ML dri-devel

Hi Emil, Chih-Wei,

what about the series of latest three patches we have in oreo-x86 branch?

[oreo-x86 branch]
http://git.osdn.net/view?p=android-x86/external-libdrm.git;a=history;f=Android.mk;h=f832b24e99007c75ce3a8d9a3ece34d4e475e957;hb=refs/heads/oreo-x86

My doubt is about the one "android: make libdrm*.so available to the
vendor partition",
should we keep it (and send to mesa/drm) so that we will simply have
our x86 branches aligned to mesa/drm,
or should we skip it in both cases?

Once this is assessed I will either send the series of 3 or just the
android logging one.
Mauro

Mauro

On Wed, Apr 17, 2019 at 7:50 PM Emil Velikov <emil.l.velikov@gmail.com> wrote:
>
> On Mon, 18 Mar 2019 at 13:32, Tapani Pälli <tapani.palli@intel.com> wrote:
> > On 3/18/19 3:25 PM, Robert Foss wrote:
> > > Hey,
> > >
> > > On 3/18/19 2:11 PM, Mauro Rossi wrote:
> > >> Hi,
> > >>
> > >> On Mon, Mar 18, 2019 at 10:58 AM Robert Foss
> > >> <robert.foss@collabora.com> wrote:
> > >>>
> > >>> Hey Mauro,
> > >>>
> > >>> On 3/18/19 9:38 AM, Mauro Rossi wrote:
> > >>>> Hi Robert,
> > >>>>
> > >>>> On Mon, Mar 18, 2019 at 9:21 AM Robert Foss
> > >>>> <robert.foss@collabora.com> wrote:
> > >>>>>
> > >>>>> On a second note, this does not apply on libdrm/master due
> > >>>>> to:
> > >>>>>
> > >>>>> LOCAL_SHARED_LIBRARIES := \
> > >>>>>           libcutils
> > >>>>
> > >>>> Sorry, we have an additional Google patch, not present in libdrm/master
> > >>>> that adds libdrm_platform module, but it is for a specific Google
> > >>>> issue. [1]
> > >>>>
> > >>>> However with libdrm module we have both liblog and libcutils shared
> > >>>> dependencies
> > >>>>
> > >>>> [1]
> > >>>> http://git.osdn.net/view?p=android-x86/external-libdrm.git;a=commit;h=8ccbfeab9fb2bddf4585339a0bcbea2f1e3ffa1e
> > >>>>
> > >>>
> > >>> Do you know if [1] causes incompatibility issues with earlier android
> > >>> verions?
> > >>> If not I would suggest upstreaming it too.
> > >>
> > >> I used those patches to build with nougat-x86 and there was no issue.
> > >>
> > >> To be precise I did a double rookie mistake, because __android_log_vprint
> > >> not used in upstream libdrm and libdrm_platform not used either.
> > >>
> > >> Now starting from my mistakes, let's see if there is anything useful
> > >> to libdrm project
> > >>
> > >> In our builds Chih-Wei Huang said that libdrm_platform is not used,
> > >> meaning not added to packages list,
> > >> however with oreo-x86 the build error appeared and the liblog dependency.
> > >>
> > >>   __android_log_vprint is used with __ANDROID__ braces
> > >> in a special patch [2] by Chih-Wei Huang which adds capability to
> > >> print logs
> > >> in logcat
> > >>
> > >> If it's not too invasive in libdrm, it could be useful.
> > >> Cheers
> > >> Mauro
> > >>
> > >> [2]
> > >> http://git.osdn.net/view?p=android-x86/external-libdrm.git;a=commitdiff;h=bcee43063ffd52a8677029c9ae6f4203563460f4;hp=81d7264033db4946a00003bf1ee82eb6c21260f9
> > >>
> > >
> > > [2] Seems like a good idea to me.
> > > Logcat really is the only intended path for logging on Android, and
> > > redirecting our logs there does make sense to me.
> > >
> > > But, I'm not sure about I like the way [2] disregards log-levels in
> > > drmMsg().
> > >
> >
> > Yeah, I think it's a good idea. I see that in mesa we include
> > "android/log.h", not "log/log.h", will need to make sure we get that
> > correctly, maybe older versions did "log/log.h"?
> >
> I would also be in favour of adding logcat support to libdrm.
>
> Mauro, please respin when you have the time.
>
> Thanks
> Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] android: libdrm_platform: add liblog shared dependency
  2019-04-22  9:46                   ` Mauro Rossi
@ 2019-04-26 22:06                     ` Mauro Rossi
  2019-06-24  5:56                       ` Chih-Wei Huang
  0 siblings, 1 reply; 15+ messages in thread
From: Mauro Rossi @ 2019-04-26 22:06 UTC (permalink / raw)
  To: Emil Velikov; +Cc: Robert Foss, ML dri-devel

[-- Attachment #1: Type: text/plain, Size: 4069 bytes --]

Here is patch using include <android/log.h>
which should suffice for the purpose.
Cheers

Mauro

On Mon, Apr 22, 2019 at 11:46 AM Mauro Rossi <issor.oruam@gmail.com> wrote:
>
> Hi Emil, Chih-Wei,
>
> what about the series of latest three patches we have in oreo-x86 branch?
>
> [oreo-x86 branch]
> http://git.osdn.net/view?p=android-x86/external-libdrm.git;a=history;f=Android.mk;h=f832b24e99007c75ce3a8d9a3ece34d4e475e957;hb=refs/heads/oreo-x86
>
> My doubt is about the one "android: make libdrm*.so available to the
> vendor partition",
> should we keep it (and send to mesa/drm) so that we will simply have
> our x86 branches aligned to mesa/drm,
> or should we skip it in both cases?
>
> Once this is assessed I will either send the series of 3 or just the
> android logging one.
> Mauro
>
> Mauro
>
> On Wed, Apr 17, 2019 at 7:50 PM Emil Velikov <emil.l.velikov@gmail.com> wrote:
> >
> > On Mon, 18 Mar 2019 at 13:32, Tapani Pälli <tapani.palli@intel.com> wrote:
> > > On 3/18/19 3:25 PM, Robert Foss wrote:
> > > > Hey,
> > > >
> > > > On 3/18/19 2:11 PM, Mauro Rossi wrote:
> > > >> Hi,
> > > >>
> > > >> On Mon, Mar 18, 2019 at 10:58 AM Robert Foss
> > > >> <robert.foss@collabora.com> wrote:
> > > >>>
> > > >>> Hey Mauro,
> > > >>>
> > > >>> On 3/18/19 9:38 AM, Mauro Rossi wrote:
> > > >>>> Hi Robert,
> > > >>>>
> > > >>>> On Mon, Mar 18, 2019 at 9:21 AM Robert Foss
> > > >>>> <robert.foss@collabora.com> wrote:
> > > >>>>>
> > > >>>>> On a second note, this does not apply on libdrm/master due
> > > >>>>> to:
> > > >>>>>
> > > >>>>> LOCAL_SHARED_LIBRARIES := \
> > > >>>>>           libcutils
> > > >>>>
> > > >>>> Sorry, we have an additional Google patch, not present in libdrm/master
> > > >>>> that adds libdrm_platform module, but it is for a specific Google
> > > >>>> issue. [1]
> > > >>>>
> > > >>>> However with libdrm module we have both liblog and libcutils shared
> > > >>>> dependencies
> > > >>>>
> > > >>>> [1]
> > > >>>> http://git.osdn.net/view?p=android-x86/external-libdrm.git;a=commit;h=8ccbfeab9fb2bddf4585339a0bcbea2f1e3ffa1e
> > > >>>>
> > > >>>
> > > >>> Do you know if [1] causes incompatibility issues with earlier android
> > > >>> verions?
> > > >>> If not I would suggest upstreaming it too.
> > > >>
> > > >> I used those patches to build with nougat-x86 and there was no issue.
> > > >>
> > > >> To be precise I did a double rookie mistake, because __android_log_vprint
> > > >> not used in upstream libdrm and libdrm_platform not used either.
> > > >>
> > > >> Now starting from my mistakes, let's see if there is anything useful
> > > >> to libdrm project
> > > >>
> > > >> In our builds Chih-Wei Huang said that libdrm_platform is not used,
> > > >> meaning not added to packages list,
> > > >> however with oreo-x86 the build error appeared and the liblog dependency.
> > > >>
> > > >>   __android_log_vprint is used with __ANDROID__ braces
> > > >> in a special patch [2] by Chih-Wei Huang which adds capability to
> > > >> print logs
> > > >> in logcat
> > > >>
> > > >> If it's not too invasive in libdrm, it could be useful.
> > > >> Cheers
> > > >> Mauro
> > > >>
> > > >> [2]
> > > >> http://git.osdn.net/view?p=android-x86/external-libdrm.git;a=commitdiff;h=bcee43063ffd52a8677029c9ae6f4203563460f4;hp=81d7264033db4946a00003bf1ee82eb6c21260f9
> > > >>
> > > >
> > > > [2] Seems like a good idea to me.
> > > > Logcat really is the only intended path for logging on Android, and
> > > > redirecting our logs there does make sense to me.
> > > >
> > > > But, I'm not sure about I like the way [2] disregards log-levels in
> > > > drmMsg().
> > > >
> > >
> > > Yeah, I think it's a good idea. I see that in mesa we include
> > > "android/log.h", not "log/log.h", will need to make sure we get that
> > > correctly, maybe older versions did "log/log.h"?
> > >
> > I would also be in favour of adding logcat support to libdrm.
> >
> > Mauro, please respin when you have the time.
> >
> > Thanks
> > Emil

[-- Attachment #2: 0001-Android-redirect-debug-messages-to-logcat-v2.patch --]
[-- Type: text/x-patch, Size: 1593 bytes --]

From d8841affdf5ba969945dae50508dc813f057f147 Mon Sep 17 00:00:00 2001
From: Chih-Wei Huang <cwhuang@linux.org.tw>
Date: Fri, 11 Jan 2019 17:19:39 +0800
Subject: [PATCH] Android: redirect debug messages to logcat (v2)

(v1) original version using include <log/log.h>

(v2) include <android/log.h>
---
 Android.mk |  1 +
 xf86drm.c  | 10 ++++++++++
 2 files changed, 11 insertions(+)

diff --git a/Android.mk b/Android.mk
index df0275ec..f2c78bc1 100644
--- a/Android.mk
+++ b/Android.mk
@@ -97,6 +97,7 @@ LOCAL_EXPORT_C_INCLUDE_DIRS := \
 	$(LOCAL_PATH)/android
 
 LOCAL_SHARED_LIBRARIES := \
+	liblog \
 	libcutils
 
 LOCAL_C_INCLUDES := \
diff --git a/xf86drm.c b/xf86drm.c
index fe822cad..a7ba855c 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -71,6 +71,10 @@
 
 #include "util_math.h"
 
+#ifdef __ANDROID__
+#include <android/log.h>
+#endif
+
 #ifdef __OpenBSD__
 #define DRM_PRIMARY_MINOR_NAME  "drm"
 #define DRM_CONTROL_MINOR_NAME  "drmC"
@@ -140,16 +144,22 @@ drm_public void drmSetServerInfo(drmServerInfoPtr info)
 static int DRM_PRINTFLIKE(1, 0)
 drmDebugPrint(const char *format, va_list ap)
 {
+#ifdef __ANDROID__
+    return __android_log_vprint(ANDROID_LOG_DEBUG, "libdrm", format, ap);
+#else
     return vfprintf(stderr, format, ap);
+#endif
 }
 
 drm_public void
 drmMsg(const char *format, ...)
 {
     va_list ap;
+#ifndef __ANDROID__
     const char *env;
     if (((env = getenv("LIBGL_DEBUG")) && strstr(env, "verbose")) ||
         (drm_server_info && drm_server_info->debug_print))
+#endif
     {
         va_start(ap, format);
         if (drm_server_info) {
-- 
2.20.1


[-- Attachment #3: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH] android: libdrm_platform: add liblog shared dependency
  2019-04-26 22:06                     ` Mauro Rossi
@ 2019-06-24  5:56                       ` Chih-Wei Huang
  0 siblings, 0 replies; 15+ messages in thread
From: Chih-Wei Huang @ 2019-06-24  5:56 UTC (permalink / raw)
  To: Mauro Rossi; +Cc: Robert Foss, Emil Velikov, ML dri-devel

Sorry for the late reply since I didn't notice it.
(I rarely read the ML)

The patch of Jiyong Park is the one he submitted to the ML before.
https://patchwork.kernel.org/patch/9864539/
https://patchwork.kernel.org/patch/10109599/

I'm not sure why it's not merged. Maybe just forgotten.

The 2nd and 3rd patch (mine and Mauro's) could be combined
into one before submission, I think.


Mauro Rossi <issor.oruam@gmail.com> 於 2019年4月27日 週六 上午6:06寫道:
>
> Here is patch using include <android/log.h>
> which should suffice for the purpose.
> Cheers
>
> Mauro
>
> On Mon, Apr 22, 2019 at 11:46 AM Mauro Rossi <issor.oruam@gmail.com> wrote:
> >
> > Hi Emil, Chih-Wei,
> >
> > what about the series of latest three patches we have in oreo-x86 branch?
> >
> > [oreo-x86 branch]
> > http://git.osdn.net/view?p=android-x86/external-libdrm.git;a=history;f=Android.mk;h=f832b24e99007c75ce3a8d9a3ece34d4e475e957;hb=refs/heads/oreo-x86
> >
> > My doubt is about the one "android: make libdrm*.so available to the
> > vendor partition",
> > should we keep it (and send to mesa/drm) so that we will simply have
> > our x86 branches aligned to mesa/drm,
> > or should we skip it in both cases?
> >
> > Once this is assessed I will either send the series of 3 or just the
> > android logging one.
> > Mauro
> >
> > Mauro
> >
> > On Wed, Apr 17, 2019 at 7:50 PM Emil Velikov <emil.l.velikov@gmail.com> wrote:
> > >
> > > On Mon, 18 Mar 2019 at 13:32, Tapani Pälli <tapani.palli@intel.com> wrote:
> > > > On 3/18/19 3:25 PM, Robert Foss wrote:
> > > > > Hey,
> > > > >
> > > > > On 3/18/19 2:11 PM, Mauro Rossi wrote:
> > > > >> Hi,
> > > > >>
> > > > >> On Mon, Mar 18, 2019 at 10:58 AM Robert Foss
> > > > >> <robert.foss@collabora.com> wrote:
> > > > >>>
> > > > >>> Hey Mauro,
> > > > >>>
> > > > >>> On 3/18/19 9:38 AM, Mauro Rossi wrote:
> > > > >>>> Hi Robert,
> > > > >>>>
> > > > >>>> On Mon, Mar 18, 2019 at 9:21 AM Robert Foss
> > > > >>>> <robert.foss@collabora.com> wrote:
> > > > >>>>>
> > > > >>>>> On a second note, this does not apply on libdrm/master due
> > > > >>>>> to:
> > > > >>>>>
> > > > >>>>> LOCAL_SHARED_LIBRARIES := \
> > > > >>>>>           libcutils
> > > > >>>>
> > > > >>>> Sorry, we have an additional Google patch, not present in libdrm/master
> > > > >>>> that adds libdrm_platform module, but it is for a specific Google
> > > > >>>> issue. [1]
> > > > >>>>
> > > > >>>> However with libdrm module we have both liblog and libcutils shared
> > > > >>>> dependencies
> > > > >>>>
> > > > >>>> [1]
> > > > >>>> http://git.osdn.net/view?p=android-x86/external-libdrm.git;a=commit;h=8ccbfeab9fb2bddf4585339a0bcbea2f1e3ffa1e
> > > > >>>>
> > > > >>>
> > > > >>> Do you know if [1] causes incompatibility issues with earlier android
> > > > >>> verions?
> > > > >>> If not I would suggest upstreaming it too.
> > > > >>
> > > > >> I used those patches to build with nougat-x86 and there was no issue.
> > > > >>
> > > > >> To be precise I did a double rookie mistake, because __android_log_vprint
> > > > >> not used in upstream libdrm and libdrm_platform not used either.
> > > > >>
> > > > >> Now starting from my mistakes, let's see if there is anything useful
> > > > >> to libdrm project
> > > > >>
> > > > >> In our builds Chih-Wei Huang said that libdrm_platform is not used,
> > > > >> meaning not added to packages list,
> > > > >> however with oreo-x86 the build error appeared and the liblog dependency.
> > > > >>
> > > > >>   __android_log_vprint is used with __ANDROID__ braces
> > > > >> in a special patch [2] by Chih-Wei Huang which adds capability to
> > > > >> print logs
> > > > >> in logcat
> > > > >>
> > > > >> If it's not too invasive in libdrm, it could be useful.
> > > > >> Cheers
> > > > >> Mauro
> > > > >>
> > > > >> [2]
> > > > >> http://git.osdn.net/view?p=android-x86/external-libdrm.git;a=commitdiff;h=bcee43063ffd52a8677029c9ae6f4203563460f4;hp=81d7264033db4946a00003bf1ee82eb6c21260f9
> > > > >>
> > > > >
> > > > > [2] Seems like a good idea to me.
> > > > > Logcat really is the only intended path for logging on Android, and
> > > > > redirecting our logs there does make sense to me.
> > > > >
> > > > > But, I'm not sure about I like the way [2] disregards log-levels in
> > > > > drmMsg().
> > > > >
> > > >
> > > > Yeah, I think it's a good idea. I see that in mesa we include
> > > > "android/log.h", not "log/log.h", will need to make sure we get that
> > > > correctly, maybe older versions did "log/log.h"?
> > > >
> > > I would also be in favour of adding logcat support to libdrm.
> > >
> > > Mauro, please respin when you have the time.



--
Chih-Wei
Android-x86 project
http://www.android-x86.org
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2019-06-24  5:56 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-17 20:50 [PATCH] android: libdrm_platform: add liblog shared dependency Mauro Rossi
2019-03-17 20:54 ` Mauro Rossi
2019-03-18  8:09   ` Robert Foss
2019-03-18  8:21     ` Robert Foss
2019-03-18  8:38       ` Mauro Rossi
2019-03-18  9:58         ` Robert Foss
2019-03-18 13:11           ` Mauro Rossi
2019-03-18 13:25             ` Robert Foss
2019-03-18 13:32               ` Tapani Pälli
2019-04-17 17:49                 ` Emil Velikov
2019-04-22  9:46                   ` Mauro Rossi
2019-04-26 22:06                     ` Mauro Rossi
2019-06-24  5:56                       ` Chih-Wei Huang
2019-04-22  9:39                 ` Mauro Rossi
2019-03-18 11:40 ` Tapani Pälli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.