[Mesa-dev] [PATCH 00/15] i965, mesa, glapi: Build libi965_dri on Android

Chad Versace chad at chad-versace.us
Thu Aug 4 20:27:41 PDT 2011

On 08/04/2011 11:25 AM, Chia-I Wu wrote:
> Hi Chad,
> On Thu, Aug 4, 2011 at 6:47 PM, Chad Versace <chad at chad-versace.us> wrote:
>> This is the first step in porting i965 to Android, initially to Gingerbread.
>> Android is ubiquituous now, and the platform's importance can't be denied. The
>> Intel drivers really should support it.
>> The series first builds libglapi, then libmesa, and then libi965_dri.
>> lib965_dri doens't work yet; it doesn't even link to libdrm. This is just the
>> initial work to get it to build.
>> I'm aware that this may be controversial, so I've attempted to integrate the
>> Android makefiles as non-disruptively as possible.
>>  - The Android makefiles attempt to duplicate as little as possible from the
>>    existing makefiles. In one case, this dictated that some Makefile code be
>>    extracted into a shared makefile.
>>  - I've avoided modifying the existsing makefiles except when absolutely
>>    necessary. When a modification or cleanup was necessary, I have attempted
>>    to keep the changes minimal and do them incrementally.
>>  - The locations of the Android makefiles mirror those of the existing
>>    makefiles.
>> The series does not break the Linux i965 build. I doubt it breaks other
>> drivers' builds, but I haven't tested it. If you want me to check that it
>> doesn't break your build, just let me know the autoconf options.
>> The series lives on my android-gingerbread-i965 branch. If you'd like to try
>> the Android build yourself, you should pull from my personal Android manifest
>> [1], which closely mirrors android-x86, and set `BOARD_USES_I965 := true` in
>> buildspeck.mk.
>> [1] repo init -u git://anongit.freedesktop.git/~chadversary/android.manifeset.git -b gingerbread-i965
> Thanks for bringing this up and working on it.  Before commenting on
> the changes to Mesa, I'd like to talk a little bit about the external
> dependencies.
> To have a working build of Mesa for the Android Gingerbread source
> tree, these external changes are needed
>  1) modify Android's init (pid 1) to create DRI device nodes under /dev
>  2) make off_t 64-bit so that mmap() a GEM object works
>  3) figure out how to authenticate a DRM fd
>  4) add libdrm to Android source tree
>  5) add drm_gralloc (the DDX driver, sort of) to Android source tree
> There may be more that I cannot recall now.
> Of these changes, only 3), 4), and 5) affect how Mesa is built.
> It is safe to assume 4) and 5) are already there, as we have
> good relationship with those projects.  But how to solve 3) is still
> an open question.

Luckily, some key people who can help us with 3 belong to my team: the author of
Wayland, and the authors of Intel's DRM module, i915.ko. I will probe them when
we reach that bridge.

> We can either spend several months discussing 3) with the Android team
> before landing Android support to Mesa. 

I have been given a timeframe to complete this, and though I cannot discuss the
details, several months is unacceptable. The Mesa port needs to be completed
before yesterday.

> Or we can assume it is
> solved, land the Android support for Mesa probably over the next few
> weeks, and initiate the discussion with the Android team with
> something concrete.  Now that we are at this, my preference is the
> latter.

Yes. We should take the latter approach.

> Back to your changes.  I am fine with landing your version and is
> willing to help review them, proivided your work won't stop after
> i915/i965 is supported.  Otherwise, I prefer to prepare my version[1]
> for upstreaming, which can build all actively maintained drivers
> including Gallium ones.  It would also be really great you can help,
> and suppose the list is fine with yet another build system for Mesa.
> [1] http://cgit.freedesktop.org/~olv/mesa/log/?h=android-gingerbread-7.11

You have done a lot of work on the Mesa port, and I want to acknowledge your
expertise there. Please don't interpret my submission of this series as a
dismissal of that work. My intent in submitting my own patches was just to start
the process of getting Android support upstream, incrementally, in a public,
code-reviewed forum.

Other drivers, of course, should also be supported. I do not want to place any
obstacle in way of that goal. At each step of the review process, we should
check with each other that the approach taken is compatible with both Gallium
and non-Gallium drivers.

My work won't stop once i965 support is completed. I will continue to maintain
Android i965 for the forseeable future. I expect that we will be collaborating
on this for a long time.

Chad Versace
chad at chad-versace.us

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110804/1d5665e8/attachment.pgp>

More information about the mesa-dev mailing list