Re: [PATCH libdrm] intel: annotate the intel genx helpers as private

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 19, 2018 at 03:47:48PM +0800, Chih-Wei Huang wrote:
> 2018-09-14 2:23 GMT+08:00 Lucas De Marchi <lucas.demarchi@xxxxxxxxx>:
> > +Chris
> >>
> >> That's because drm_gralloc use the IS_GEN9 macro
> >> (and other IS_GEN{n} macros) directly.
> >>
> >> Since IS_GEN{n} are public APIs, I don't see
> >
> >
> > IS_GEN() is *not* public API and should not be. It's an internal macro.
> >
> > DESTDIR=/tmp/inst ninja -C build install
> > grep -r IS_GEN /tmp/inst/
> > Binary file /tmp/inst/usr/local/lib64/libdrm_intel.so.1.0.0 matches
> >
> >   [  same thing when using autotools ]
> >
> > Grepping https://android.googlesource.com/platform/external/drm_gralloc/ I
> > see IS_GEN* is being used, but I don't see where it's getting it from,
> > unless it's using private headers... Let's see by grepping it:
> >
> > $ git grep intel_chipset
> > gralloc_drm_intel.c:#include "intel_chipset.h" /* for platform detection
> > macros */
> >
> > oh. You're a using a private header :(. How many places and libraries will
> > we need to update to support different platforms? This is crazy.
> > AFAICS it only uses that to get the max_stride for each platform... this
> > info should be coming from somewhere else. Chris, any idea here?
> 
> Hmm... There is no private declaration in this header.

???

> Why is it private?

All headers are private unless they are exported/installed. Android does
things a little differently by incorporating libdrm inside this drm_gralloc.

> 
> If so, what is the correct way to get the gen of Intel's GPU?
> Or the userspace should not know it?

libdrm *is* userspace. Better question: why do you need to know the gen? Can
this be decided in another way by using a properly exported function from
libdrm?

If you only want to hack it to work again, just link with the static library
since you are already incorporating the library, as Chris suggested. If you
want to do it right you may need to look into your library to see why it
is doing that.

Lucas De Marchi

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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux