public inbox for dri-devel@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Lucas De Marchi <lucas.demarchi@intel.com>
To: Chih-Wei Huang <cwhuang@android-x86.org>
Cc: Eric Engestrom <eric.engestrom@intel.com>,
	Emil Velikov <emil.velikov@collabora.com>,
	ML dri-devel <dri-devel@lists.freedesktop.org>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH libdrm] intel: annotate the intel genx helpers as private
Date: Wed, 19 Sep 2018 16:18:50 -0700	[thread overview]
Message-ID: <20180919231850.GA14729@ldmartin-desk.jf.intel.com> (raw)
In-Reply-To: <CAKc24n1PR9vKz_jOZE5SzbX95zxR7FFg8Anva=mDhkrHfGBwvA@mail.gmail.com>

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@intel.com>:
> > +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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-09-19 23:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-11 21:22 [PATCH libdrm] intel: annotate the intel genx helpers as private Rodrigo Vivi
2018-09-12 10:44 ` Eric Engestrom
2018-09-12 15:50   ` Rodrigo Vivi
2018-09-12 16:03     ` Rodrigo Vivi
2018-09-13  7:19       ` Chih-Wei Huang
2018-09-13  8:45         ` Eric Engestrom
2018-09-13 17:43           ` Rodrigo Vivi
2018-09-13 18:25             ` Eric Engestrom
2018-09-13 18:23         ` Lucas De Marchi
2018-09-13 18:27           ` Chris Wilson
2018-09-19  7:47           ` Chih-Wei Huang
2018-09-19 23:18             ` Lucas De Marchi [this message]
2018-09-21  7:32               ` Chih-Wei Huang
  -- strict thread matches above, loose matches on Subject: below --
2018-09-06 15:14 Emil Velikov
2018-09-06 17:38 ` Chris Wilson
2018-09-06 17:51   ` Lucas De Marchi
2018-09-06 17:59     ` Chris Wilson
2018-09-06 19:45       ` Lucas De Marchi
2018-09-06 17:46 ` Lucas De Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180919231850.GA14729@ldmartin-desk.jf.intel.com \
    --to=lucas.demarchi@intel.com \
    --cc=cwhuang@android-x86.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.velikov@collabora.com \
    --cc=eric.engestrom@intel.com \
    --cc=rodrigo.vivi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox