Re: [Mesa-dev] [RFC][PATCH 4/5] Android.mk: Add option to use vendor version of mesa
On 07/26/2018 08:06 PM, Rob Herring wrote: On Wed, Jul 25, 2018 at 1:52 PM John Stultz wrote: On Wed, Jul 25, 2018 at 5:42 AM, Emil Velikov wrote: On 25 July 2018 at 00:21, John Stultz wrote: From: Yong Yao This is a forward port of a patch from the AOSP/master branch: https://android.googlesource.com/platform/external/mesa3d/+/b1e5fad1db4c1d51c7ae3a033b100a8429ae5415%5E%21/ Which allows boards to provide their own custom copy of mesa. Thanks for sorting these out John. My understanding was that when a custom project repo is used one handles that in the device manifest. Roughly as: - foo.xml -> contains vast majority of the git repos with associated tags/etc - local.xml -> removes any repo/project from ^^, adds new one Is that no longer the case, or I simply misremember how Android does things? So, I'm not aware of the specific history behind this patch. I think it is quite simple. Intel needed mesa and put it into their device repo(s) rather than updating external/mesa3d/. I would point to the repo, but it seems android-ia is gone... FYI Android-IA was renamed as 'Celadon': https://01.org/projectceladon/ but Mesa branch is still available in the old location: https://github.com/intel/external-mesa And I can't speak for Google, there has been a general push via the Treble efforts to standardize the Android system image, and to push vendors to keep any device specific bits into their own device directory. So there is a strong disincentive to modify projects in AOSP and in order to include things like devboards into AOSP, the push has been to limit any device specific changes to only the device directory git tree. I can't imagine that mesa would ever be part of the system image so why would there be any common repository. Maybe a s/w rendering build, but that may still be in the vendor partition and SwiftShader seems to be preferred anyways. There seems to be little incentive to not have a fork per device. So while one can technically still replace projects with local repos (and this is very useful for development!), I think they do not want folks doing this for shipping devices. We are trying to make sure device support is pushed upstream to fdo, A fork in every device is not encouraging that. I think anyone working on h/w support in mesa is targeting upstream anyways regardless of what happens in AOSP. and then align AOSP's mesa to that, but one could imagine a board that doesn't have support upstream in mesa, and provides its own copy of mesa in the device directory. This patch allows the build to override the default mesa project with the vendor provided mesa. One concrete example here, which unfortunately I've not had time to work on, might be if we try to integrate the revived lima work to support HiKey's mali utgard gpu. That would require a local mesa tree along with the developmental kernel driver. I'm pretty sure lima will be merged to mesa master well before either it works with Android or anyone cares about supporting it in AOSP. Rob ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [RFC][PATCH 4/5] Android.mk: Add option to use vendor version of mesa
On 26 July 2018 at 18:38, John Stultz wrote: > On Thu, Jul 26, 2018 at 6:46 AM, Emil Velikov > wrote: >> On 25 July 2018 at 20:52, John Stultz wrote: >>> On Wed, Jul 25, 2018 at 5:42 AM, Emil Velikov >>> wrote: On 25 July 2018 at 00:21, John Stultz wrote: > From: Yong Yao > > This is a forward port of a patch from the AOSP/master branch: > https://android.googlesource.com/platform/external/mesa3d/+/b1e5fad1db4c1d51c7ae3a033b100a8429ae5415%5E%21/ > > Which allows boards to provide their own custom copy of mesa. > Thanks for sorting these out John. My understanding was that when a custom project repo is used one handles that in the device manifest. Roughly as: - foo.xml -> contains vast majority of the git repos with associated tags/etc - local.xml -> removes any repo/project from ^^, adds new one Is that no longer the case, or I simply misremember how Android does things? >>> >>> So, I'm not aware of the specific history behind this patch. And I >>> can't speak for Google, there has been a general push via the Treble >>> efforts to standardize the Android system image, and to push vendors >>> to keep any device specific bits into their own device directory. So >>> there is a strong disincentive to modify projects in AOSP and in order >>> to include things like devboards into AOSP, the push has been to limit >>> any device specific changes to only the device directory git tree. >>> >>> So while one can technically still replace projects with local repos >>> (and this is very useful for development!), I think they do not want >>> folks doing this for shipping devices. >>> >> Hmm using the word "local" brought some assumptions that were never made. >> AFAICT the remove/add project manifest combo can be used local >> changes/testing as well as for "shipping devices". >> Can it not? >> >>> We are trying to make sure device support is pushed upstream to fdo, >>> and then align AOSP's mesa to that, but one could imagine a board that >>> doesn't have support upstream in mesa, and provides its own copy of >>> mesa in the device directory. This patch allows the build to override >>> the default mesa project with the vendor provided mesa. >>> >> Since the vendor will already need to add the project (git repo etc), >> what is the blocker from removing the existing one beforehand? >> Last I've tried - the repo tool gives you a nice and clear >> warning/error message. >> >> There is one case where this patch is a must. If repo forbids removing >> "core" Android projects via the manifest. > > I'm not saying the repo tool at all forbids removing/replacing entries > in the manifest. Its just a tool. > > I'm saying that if someone is replacing git trees that are part of the > system image in a shipping device, my understanding is they are likely > going to have more problems with treble compliance. There are probably > technical loopholes folks can get through and still do it, but I think > generally its becoming frowned upon. > > Its possible, but I doubt they would chose to enforce this policy via > the repo tool. > > Regardless, I'm not sure why such a trivial change to the Android.mk > that the Android developers found useful is cause for much objection, > but this one seems more trouble then its worth, so I'll drop it. > I'm fairly worried (this and 5/5) a couple of reasons: - there seems to be a better way to handle this - similar one liners have caused breakage in the past - see libdrm 4dfa458979c345ea5eb46749f545d78c09e3f244 I do agree with RobH - vendors should target upstream and resort to fork/custom Mesa only when absolutely needed. That said, I will repeat/rephrase an earlier comment of mine: Hacks could be merged, as long as they're properly documented and there's an outline for a long term solution. That's my personal take - others may disagree. HTH Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [RFC][PATCH 4/5] Android.mk: Add option to use vendor version of mesa
On Thu, Jul 26, 2018 at 6:46 AM, Emil Velikov wrote: > On 25 July 2018 at 20:52, John Stultz wrote: >> On Wed, Jul 25, 2018 at 5:42 AM, Emil Velikov >> wrote: >>> On 25 July 2018 at 00:21, John Stultz wrote: From: Yong Yao This is a forward port of a patch from the AOSP/master branch: https://android.googlesource.com/platform/external/mesa3d/+/b1e5fad1db4c1d51c7ae3a033b100a8429ae5415%5E%21/ Which allows boards to provide their own custom copy of mesa. >>> Thanks for sorting these out John. >>> >>> My understanding was that when a custom project repo is used one >>> handles that in the device manifest. Roughly as: >>> - foo.xml -> contains vast majority of the git repos with associated >>> tags/etc >>> - local.xml -> removes any repo/project from ^^, adds new one >>> >>> Is that no longer the case, or I simply misremember how Android does things? >> >> So, I'm not aware of the specific history behind this patch. And I >> can't speak for Google, there has been a general push via the Treble >> efforts to standardize the Android system image, and to push vendors >> to keep any device specific bits into their own device directory. So >> there is a strong disincentive to modify projects in AOSP and in order >> to include things like devboards into AOSP, the push has been to limit >> any device specific changes to only the device directory git tree. >> >> So while one can technically still replace projects with local repos >> (and this is very useful for development!), I think they do not want >> folks doing this for shipping devices. >> > Hmm using the word "local" brought some assumptions that were never made. > AFAICT the remove/add project manifest combo can be used local > changes/testing as well as for "shipping devices". > Can it not? > >> We are trying to make sure device support is pushed upstream to fdo, >> and then align AOSP's mesa to that, but one could imagine a board that >> doesn't have support upstream in mesa, and provides its own copy of >> mesa in the device directory. This patch allows the build to override >> the default mesa project with the vendor provided mesa. >> > Since the vendor will already need to add the project (git repo etc), > what is the blocker from removing the existing one beforehand? > Last I've tried - the repo tool gives you a nice and clear > warning/error message. > > There is one case where this patch is a must. If repo forbids removing > "core" Android projects via the manifest. I'm not saying the repo tool at all forbids removing/replacing entries in the manifest. Its just a tool. I'm saying that if someone is replacing git trees that are part of the system image in a shipping device, my understanding is they are likely going to have more problems with treble compliance. There are probably technical loopholes folks can get through and still do it, but I think generally its becoming frowned upon. Its possible, but I doubt they would chose to enforce this policy via the repo tool. Regardless, I'm not sure why such a trivial change to the Android.mk that the Android developers found useful is cause for much objection, but this one seems more trouble then its worth, so I'll drop it. thanks -john ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [RFC][PATCH 4/5] Android.mk: Add option to use vendor version of mesa
On Wed, Jul 25, 2018 at 1:52 PM John Stultz wrote: > > On Wed, Jul 25, 2018 at 5:42 AM, Emil Velikov > wrote: > > On 25 July 2018 at 00:21, John Stultz wrote: > >> From: Yong Yao > >> > >> This is a forward port of a patch from the AOSP/master branch: > >> https://android.googlesource.com/platform/external/mesa3d/+/b1e5fad1db4c1d51c7ae3a033b100a8429ae5415%5E%21/ > >> > >> Which allows boards to provide their own custom copy of mesa. > >> > > Thanks for sorting these out John. > > > > My understanding was that when a custom project repo is used one > > handles that in the device manifest. Roughly as: > > - foo.xml -> contains vast majority of the git repos with associated > > tags/etc > > - local.xml -> removes any repo/project from ^^, adds new one > > > > Is that no longer the case, or I simply misremember how Android does things? > > So, I'm not aware of the specific history behind this patch. I think it is quite simple. Intel needed mesa and put it into their device repo(s) rather than updating external/mesa3d/. I would point to the repo, but it seems android-ia is gone... > And I > can't speak for Google, there has been a general push via the Treble > efforts to standardize the Android system image, and to push vendors > to keep any device specific bits into their own device directory. So > there is a strong disincentive to modify projects in AOSP and in order > to include things like devboards into AOSP, the push has been to limit > any device specific changes to only the device directory git tree. I can't imagine that mesa would ever be part of the system image so why would there be any common repository. Maybe a s/w rendering build, but that may still be in the vendor partition and SwiftShader seems to be preferred anyways. There seems to be little incentive to not have a fork per device. > So while one can technically still replace projects with local repos > (and this is very useful for development!), I think they do not want > folks doing this for shipping devices. > > We are trying to make sure device support is pushed upstream to fdo, A fork in every device is not encouraging that. I think anyone working on h/w support in mesa is targeting upstream anyways regardless of what happens in AOSP. > and then align AOSP's mesa to that, but one could imagine a board that > doesn't have support upstream in mesa, and provides its own copy of > mesa in the device directory. This patch allows the build to override > the default mesa project with the vendor provided mesa. > > One concrete example here, which unfortunately I've not had time to > work on, might be if we try to integrate the revived lima work to > support HiKey's mali utgard gpu. That would require a local mesa tree > along with the developmental kernel driver. I'm pretty sure lima will be merged to mesa master well before either it works with Android or anyone cares about supporting it in AOSP. Rob ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [RFC][PATCH 4/5] Android.mk: Add option to use vendor version of mesa
On 25 July 2018 at 20:52, John Stultz wrote: > On Wed, Jul 25, 2018 at 5:42 AM, Emil Velikov > wrote: >> On 25 July 2018 at 00:21, John Stultz wrote: >>> From: Yong Yao >>> >>> This is a forward port of a patch from the AOSP/master branch: >>> https://android.googlesource.com/platform/external/mesa3d/+/b1e5fad1db4c1d51c7ae3a033b100a8429ae5415%5E%21/ >>> >>> Which allows boards to provide their own custom copy of mesa. >>> >> Thanks for sorting these out John. >> >> My understanding was that when a custom project repo is used one >> handles that in the device manifest. Roughly as: >> - foo.xml -> contains vast majority of the git repos with associated >> tags/etc >> - local.xml -> removes any repo/project from ^^, adds new one >> >> Is that no longer the case, or I simply misremember how Android does things? > > So, I'm not aware of the specific history behind this patch. And I > can't speak for Google, there has been a general push via the Treble > efforts to standardize the Android system image, and to push vendors > to keep any device specific bits into their own device directory. So > there is a strong disincentive to modify projects in AOSP and in order > to include things like devboards into AOSP, the push has been to limit > any device specific changes to only the device directory git tree. > > So while one can technically still replace projects with local repos > (and this is very useful for development!), I think they do not want > folks doing this for shipping devices. > Hmm using the word "local" brought some assumptions that were never made. AFAICT the remove/add project manifest combo can be used local changes/testing as well as for "shipping devices". Can it not? > We are trying to make sure device support is pushed upstream to fdo, > and then align AOSP's mesa to that, but one could imagine a board that > doesn't have support upstream in mesa, and provides its own copy of > mesa in the device directory. This patch allows the build to override > the default mesa project with the vendor provided mesa. > Since the vendor will already need to add the project (git repo etc), what is the blocker from removing the existing one beforehand? Last I've tried - the repo tool gives you a nice and clear warning/error message. There is one case where this patch is a must. If repo forbids removing "core" Android projects via the manifest. Can anyone access the bug referenced in the gerrit commit? Guess it could provide some clarity on the topic. Thanks Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [RFC][PATCH 4/5] Android.mk: Add option to use vendor version of mesa
On Wed, Jul 25, 2018 at 6:50 AM, Rob Herring wrote: > On Tue, Jul 24, 2018 at 5:21 PM John Stultz wrote: >> >> From: Yong Yao >> >> This is a forward port of a patch from the AOSP/master branch: >> https://android.googlesource.com/platform/external/mesa3d/+/b1e5fad1db4c1d51c7ae3a033b100a8429ae5415%5E%21/ >> >> Which allows boards to provide their own custom copy of mesa. > > IMO, if AOSP wants/needs to have multiple forks of mesa, then they > should carry this patch. I'd turn this around and ask if there is any sense in having the default mesa in AOSP be anything but (possibly a stable snapshot) of the upstream mesa tree? Obviously, shipping boards/devices will need their own device specific hacks and patches until those go upstream, so this provides a mechanism for that. But if vendors can't easily test upstream mesa (hopefully updated with their refined patches finally merged) with AOSP, that just creates an extra barrier, and dis-incentivises folks from bothering to work with upstream. thanks -john ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [RFC][PATCH 4/5] Android.mk: Add option to use vendor version of mesa
On Wed, Jul 25, 2018 at 5:42 AM, Emil Velikov wrote: > On 25 July 2018 at 00:21, John Stultz wrote: >> From: Yong Yao >> >> This is a forward port of a patch from the AOSP/master branch: >> https://android.googlesource.com/platform/external/mesa3d/+/b1e5fad1db4c1d51c7ae3a033b100a8429ae5415%5E%21/ >> >> Which allows boards to provide their own custom copy of mesa. >> > Thanks for sorting these out John. > > My understanding was that when a custom project repo is used one > handles that in the device manifest. Roughly as: > - foo.xml -> contains vast majority of the git repos with associated tags/etc > - local.xml -> removes any repo/project from ^^, adds new one > > Is that no longer the case, or I simply misremember how Android does things? So, I'm not aware of the specific history behind this patch. And I can't speak for Google, there has been a general push via the Treble efforts to standardize the Android system image, and to push vendors to keep any device specific bits into their own device directory. So there is a strong disincentive to modify projects in AOSP and in order to include things like devboards into AOSP, the push has been to limit any device specific changes to only the device directory git tree. So while one can technically still replace projects with local repos (and this is very useful for development!), I think they do not want folks doing this for shipping devices. We are trying to make sure device support is pushed upstream to fdo, and then align AOSP's mesa to that, but one could imagine a board that doesn't have support upstream in mesa, and provides its own copy of mesa in the device directory. This patch allows the build to override the default mesa project with the vendor provided mesa. One concrete example here, which unfortunately I've not had time to work on, might be if we try to integrate the revived lima work to support HiKey's mali utgard gpu. That would require a local mesa tree along with the developmental kernel driver. thanks -john ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [RFC][PATCH 4/5] Android.mk: Add option to use vendor version of mesa
On Tue, Jul 24, 2018 at 5:21 PM John Stultz wrote: > > From: Yong Yao > > This is a forward port of a patch from the AOSP/master branch: > https://android.googlesource.com/platform/external/mesa3d/+/b1e5fad1db4c1d51c7ae3a033b100a8429ae5415%5E%21/ > > Which allows boards to provide their own custom copy of mesa. IMO, if AOSP wants/needs to have multiple forks of mesa, then they should carry this patch. Rob ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [RFC][PATCH 4/5] Android.mk: Add option to use vendor version of mesa
Emil, Emil Velikov writes: > On 25 July 2018 at 00:21, John Stultz wrote: >> From: Yong Yao >> >> This is a forward port of a patch from the AOSP/master branch: >> https://android.googlesource.com/platform/external/mesa3d/+/b1e5fad1db4c1d51c7ae3a033b100a8429ae5415%5E%21/ >> >> Which allows boards to provide their own custom copy of mesa. >> > Thanks for sorting these out John. > > My understanding was that when a custom project repo is used one > handles that in the device manifest. Roughly as: > - foo.xml -> contains vast majority of the git repos with associated tags/etc > - local.xml -> removes any repo/project from ^^, adds new one > > Is that no longer the case, or I simply misremember how Android does things? > You do remember correctly. :) Generally there is a default.xml which includes projects.xml and remove.xml. Projects.xml contains all the lines and the remove.xml contains the lines to remove those repos for that particular project. Reference: https://github.com/projectceladon/manifest Thank you Regards Harish Krupo ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [RFC][PATCH 4/5] Android.mk: Add option to use vendor version of mesa
On 25 July 2018 at 00:21, John Stultz wrote: > From: Yong Yao > > This is a forward port of a patch from the AOSP/master branch: > https://android.googlesource.com/platform/external/mesa3d/+/b1e5fad1db4c1d51c7ae3a033b100a8429ae5415%5E%21/ > > Which allows boards to provide their own custom copy of mesa. > Thanks for sorting these out John. My understanding was that when a custom project repo is used one handles that in the device manifest. Roughly as: - foo.xml -> contains vast majority of the git repos with associated tags/etc - local.xml -> removes any repo/project from ^^, adds new one Is that no longer the case, or I simply misremember how Android does things? Thanks Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [RFC][PATCH 4/5] Android.mk: Add option to use vendor version of mesa
From: Yong Yao This is a forward port of a patch from the AOSP/master branch: https://android.googlesource.com/platform/external/mesa3d/+/b1e5fad1db4c1d51c7ae3a033b100a8429ae5415%5E%21/ Which allows boards to provide their own custom copy of mesa. Cc: Rob Herring Cc: Alistair Strachan Cc: Marissa Wall Cc: Sumit Semwal Cc: Emil Velikov Cc: Rob Clark Signed-off-by: Harish Krupo Signed-off-by: Yong Yao Signed-off-by: John Stultz --- Android.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Android.mk b/Android.mk index 914854c..494b4b9 100644 --- a/Android.mk +++ b/Android.mk @@ -29,6 +29,7 @@ # The main target is libGLES_mesa. For each classic driver enabled, a DRI # module will also be built. DRI modules will be loaded by libGLES_mesa. +ifneq ($(BOARD_USE_CUSTOMIZED_MESA), true) MESA_TOP := $(call my-dir) MESA_ANDROID_MAJOR_VERSION := $(word 1, $(subst ., , $(PLATFORM_VERSION))) @@ -125,3 +126,5 @@ SUBDIRS := \ INC_DIRS := $(call all-named-subdir-makefiles,$(SUBDIRS)) INC_DIRS += $(call all-named-subdir-makefiles,src/gallium) include $(INC_DIRS) + +endif -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev