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

2011-08-05 Thread Chia-I Wu
On Fri, Aug 5, 2011 at 12:27 PM, Chad Versace c...@chad-versace.us wrote:
 On 08/04/2011 11:25 AM, Chia-I Wu wrote:
 Hi Chad,

 On Thu, Aug 4, 2011 at 6:47 PM, Chad Versace c...@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.
I forgot to mention that we need to do 1), 2), ..., 5) only when we
target for integrating into the vanilla Android tree.  When we target
for integration with Android-x86, these tasks are either done or
worked around.
 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.
We will be basically doing everything from scratch, in smaller steps.
In that case, I see no reason not to do this based on what is already
there.  I did plan to upstream my changes.  So cleaning it up should
not be a nightmare.

Are there missing commits in your branch?  I tried to build it, but it
is almost no-op because 

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

2011-08-05 Thread Chad Versace
On 08/04/2011 11:42 PM, Chia-I Wu wrote:
 On Fri, Aug 5, 2011 at 12:27 PM, Chad Versace c...@chad-versace.us wrote:
 On 08/04/2011 11:25 AM, Chia-I Wu wrote:
 Hi Chad,

 On Thu, Aug 4, 2011 at 6:47 PM, Chad Versace c...@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.

 I forgot to mention that we need to do 1), 2), ..., 5) only when we
 target for integrating into the vanilla Android tree.  When we target
 for integration with Android-x86, these tasks are either done or
 worked around.

 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.
 We will be basically doing everything from scratch, in smaller steps.
 In that case, I see no reason not to do this based on what is already
 there.  I did plan to upstream my changes.  So cleaning it up should
 not be a nightmare.
 
 Are there missing commits 

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

2011-08-04 Thread Chad Versace
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

Chad Versace (15):
  mesa: Add toplevel Android.mk
  glapi: Build libmesa_glapi on Android
  mesa/sources.mak: Convert all variables to be simply-expanded
  mesa/sources.mak: Cleanup include paths for Android
  mesa/sources.mak: Change handling of lex and yacc files for Android
  main: Remove problematic #include on Android
  main: Add -o option to es_generator.py
  mesa: Build libmesa_main for Android
  dri/Makefile.defines: Remove non-existent dir from include paths
  dri/Makefile.defines: Convert all variables to be simply-expanded
  dri/Makefile.defines: Only add -Iserver to includes if the dir exists
  dri/Makefile.defines: Cleanup filepaths for Android
  i965: New file sources.mk
  i965: Include sources.mk in Makefile
  i965: Build libi965_dri on Android

 Android.mk|   68 +++
 android/mesa_local_vars.mk|   32 +
 src/Android.mk|1 +
 src/mapi/Android.mk   |1 +
 src/mapi/shared-glapi/Android.mk  |   95 ++
 src/mesa/Android.mk   |   63 +
 src/mesa/drivers/Android.mk   |1 +
 src/mesa/drivers/dri/Android.mk   |   33 +
 src/mesa/drivers/dri/Makefile.defines |   61 ++---
 src/mesa/drivers/dri/Makefile.targets |5 ++
 src/mesa/drivers/dri/i965/Android.mk  |   61 +
 src/mesa/drivers/dri/i965/Makefile|  119 +
 src/mesa/drivers/dri/i965/sources.mk  |  115 +++
 src/mesa/main/compiler.h  |2 +-
 src/mesa/main/es_generator.py |   10 +++-
 src/mesa/sources.mak  |   87 ++--
 16 files changed, 576 insertions(+), 178 deletions(-)
 create mode 100644 Android.mk
 create mode 100644 android/mesa_local_vars.mk
 create mode 100644 src/Android.mk
 create mode 100644 src/mapi/Android.mk
 create mode 100644 src/mapi/shared-glapi/Android.mk
 create mode 100644 src/mesa/Android.mk
 create mode 100644 src/mesa/drivers/Android.mk
 create mode 100644 src/mesa/drivers/dri/Android.mk
 create mode 100644 src/mesa/drivers/dri/i965/Android.mk
 create mode 100644 src/mesa/drivers/dri/i965/sources.mk

-- 
1.7.6

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2011-08-04 Thread Chia-I Wu
Hi Chad,

On Thu, Aug 4, 2011 at 6:47 PM, Chad Versace c...@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.

We can either spend several months discussing 3) with the Android team
before landing Android support to Mesa.  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.

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

 Chad Versace (15):
  mesa: Add toplevel Android.mk
  glapi: Build libmesa_glapi on Android
  mesa/sources.mak: Convert all variables to be simply-expanded
  mesa/sources.mak: Cleanup include paths for Android
  mesa/sources.mak: Change handling of lex and yacc files for Android
  main: Remove problematic #include on Android
  main: Add -o option to es_generator.py
  mesa: Build libmesa_main for Android
  dri/Makefile.defines: Remove non-existent dir from include paths
  dri/Makefile.defines: Convert all variables to be simply-expanded
  dri/Makefile.defines: Only add -Iserver to includes if the dir exists
  dri/Makefile.defines: Cleanup filepaths for Android
  i965: New file sources.mk
  i965: Include sources.mk in Makefile
  i965: Build libi965_dri on Android

  Android.mk                            |   68 +++
  android/mesa_local_vars.mk            |   32 +
  src/Android.mk                        |    1 +
  src/mapi/Android.mk                   |    1 +
  src/mapi/shared-glapi/Android.mk      |   95 ++
  src/mesa/Android.mk                   |   63 +
  src/mesa/drivers/Android.mk           |    1 +
  src/mesa/drivers/dri/Android.mk       |   33 +
  src/mesa/drivers/dri/Makefile.defines |   61 ++---
  src/mesa/drivers/dri/Makefile.targets |    5 ++
  src/mesa/drivers/dri/i965/Android.mk  |   61 +
  src/mesa/drivers/dri/i965/Makefile    |  119 
 +
  src/mesa/drivers/dri/i965/sources.mk  |  115 +++
  src/mesa/main/compiler.h              |    2 +-
  src/mesa/main/es_generator.py         |   10 +++-
  src/mesa/sources.mak     

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

2011-08-04 Thread Chad Versace
On 08/04/2011 11:25 AM, Chia-I Wu wrote:
 Hi Chad,
 
 On Thu, Aug 4, 2011 at 6:47 PM, Chad Versace c...@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
c...@chad-versace.us



signature.asc
Description: OpenPGP digital signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev