[PATCH] android: libdrm_platform: add liblog shared dependency

Mauro Rossi issor.oruam at gmail.com
Fri Apr 26 22:06:41 UTC 2019


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 at 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 at gmail.com> wrote:
> >
> > On Mon, 18 Mar 2019 at 13:32, Tapani Pälli <tapani.palli at 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 at 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 at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Android-redirect-debug-messages-to-logcat-v2.patch
Type: text/x-patch
Size: 1593 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20190427/5cbb296b/attachment-0001.bin>


More information about the dri-devel mailing list