Re: [Mesa-dev] [PATCH 0/3] egl/android: Remove dependencies on specific grallocs
Hey, On 2018-05-25 17:38, Rob Herring wrote: On Fri, May 25, 2018 at 9:25 AM, Tomasz Figa wrote: On Fri, May 25, 2018 at 10:59 PM Rob Herring wrote: On Fri, May 25, 2018 at 4:15 AM, Robert Foss wrote: On 2018-05-25 10:38, Tomasz Figa wrote: On Fri, May 25, 2018 at 5:33 PM Robert Foss wrote: Hey, On 2018-05-25 02:17, Rob Herring wrote: On Thu, May 24, 2018 at 6:23 AM, Robert Foss < robert.f...@collabora.com> wrote: Hey, I don't think I've received any feedback on this version yet. If anyone has some time to spare, it would be nice to get it merged. Just to be clear about the libdrm branch linked in the cover letter, it is not required. Only for virgl platforms which happens to be what I tested on. virgl will still fallback to using the first render node without those libdrm changes, right? If not, I don't think we should apply until we're not breaking a platform... No it will not fall back. I agree that holding off makes more sense. What's the reason of this problems? Is it because of drmGetDevices()? Since we don't really use it for anything other than getting the list of render nodes in the system, maybe we could just iterate over any /dev/renderD* nodes explicitly and avoid introducing new problems? That's exactly the problem, and yes we could 100% solve by iterating over /dev/renderD* nodes. I originally assumed we wouldn't want to do that, but rather use the libdrm interfaces. But for the next spin I could avoid using libdrm, should I? I don't have an opinion on libdrm really, but I do think we should fallback to the 1st (only) render node rather than just fail. We do, even with libdrm. AFAICT, the problem with virgl seems to be that drmGetDevices() doesn't include devices on virtio bus in the results, which means that there likely wouldn't be any render node returned. Okay. I still don't get why we search by bus in the first place. Who cares what bus the gpu sits on. Now I have an opinion. We should just iterate over render nodes matching by name or use the first node if we don't have a set name. For v3 I implemented a version with drmGetDevices2 replaced with iteration over the /dev/dri/renderD* nodes. That still means doing all of the other filtering, however. Rob. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 0/3] egl/android: Remove dependencies on specific grallocs
On Sat, May 26, 2018 at 12:38 AM Rob Herring wrote: > On Fri, May 25, 2018 at 9:25 AM, Tomasz Figa wrote: > > On Fri, May 25, 2018 at 10:59 PM Rob Herring wrote: > > > >> On Fri, May 25, 2018 at 4:15 AM, Robert Foss > wrote: > >> > > >> > > >> > On 2018-05-25 10:38, Tomasz Figa wrote: > >> >> > >> >> On Fri, May 25, 2018 at 5:33 PM Robert Foss < robert.f...@collabora.com> > >> >> wrote: > >> >> > >> >>> Hey, > >> >> > >> >> > >> >>> On 2018-05-25 02:17, Rob Herring wrote: > >> > >> On Thu, May 24, 2018 at 6:23 AM, Robert Foss < > > robert.f...@collabora.com> > >> >> > >> >> wrote: > >> > > >> > Hey, > >> > > >> > I don't think I've received any feedback on this version yet. > >> > If anyone has some time to spare, it would be nice to get it merged. > >> > > >> > Just to be clear about the libdrm branch linked in the cover letter, > >> > it is not required. Only for virgl platforms which happens to be > > what > >> > I tested on. > >> > >> > >> virgl will still fallback to using the first render node without > > those > >> libdrm changes, right? If not, I don't think we should apply until > >> we're not breaking a platform... > >> >> > >> >> > >> >>> No it will not fall back. I agree that holding off makes more sense. > >> >> > >> >> > >> >> What's the reason of this problems? Is it because of drmGetDevices()? > >> >> Since > >> >> we don't really use it for anything other than getting the list of > > render > >> >> nodes in the system, maybe we could just iterate over any /dev/renderD* > >> >> nodes explicitly and avoid introducing new problems? > >> > > >> > > >> > That's exactly the problem, and yes we could 100% solve by iterating > > over > >> > /dev/renderD* nodes. I originally assumed we wouldn't want to do that, > > but > >> > rather use the libdrm interfaces. > >> > > >> > But for the next spin I could avoid using libdrm, should I? > > > >> I don't have an opinion on libdrm really, but I do think we should > >> fallback to the 1st (only) render node rather than just fail. > > > > We do, even with libdrm. > > > > AFAICT, the problem with virgl seems to be that drmGetDevices() doesn't > > include devices on virtio bus in the results, which means that there likely > > wouldn't be any render node returned. > Okay. I still don't get why we search by bus in the first place. Who > cares what bus the gpu sits on. We don't search by bus. drmGetDevices() iterates over DRI nodes, queries them and discards those of which bus type it fails to recognize. I have no idea why it does so, though. > Now I have an opinion. We should just iterate over render nodes > matching by name or use the first node if we don't have a set name. Yeah, I suggested that too in my previous reply. It doesn't look like libdrm has any sane helper that could help us. Best regards, Tomasz ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 0/3] egl/android: Remove dependencies on specific grallocs
On Fri, May 25, 2018 at 9:25 AM, Tomasz Figa wrote: > On Fri, May 25, 2018 at 10:59 PM Rob Herring wrote: > >> On Fri, May 25, 2018 at 4:15 AM, Robert Foss > wrote: >> > >> > >> > On 2018-05-25 10:38, Tomasz Figa wrote: >> >> >> >> On Fri, May 25, 2018 at 5:33 PM Robert Foss >> >> wrote: >> >> >> >>> Hey, >> >> >> >> >> >>> On 2018-05-25 02:17, Rob Herring wrote: >> >> On Thu, May 24, 2018 at 6:23 AM, Robert Foss < > robert.f...@collabora.com> >> >> >> >> wrote: >> > >> > Hey, >> > >> > I don't think I've received any feedback on this version yet. >> > If anyone has some time to spare, it would be nice to get it merged. >> > >> > Just to be clear about the libdrm branch linked in the cover letter, >> > it is not required. Only for virgl platforms which happens to be > what >> > I tested on. >> >> >> virgl will still fallback to using the first render node without > those >> libdrm changes, right? If not, I don't think we should apply until >> we're not breaking a platform... >> >> >> >> >> >>> No it will not fall back. I agree that holding off makes more sense. >> >> >> >> >> >> What's the reason of this problems? Is it because of drmGetDevices()? >> >> Since >> >> we don't really use it for anything other than getting the list of > render >> >> nodes in the system, maybe we could just iterate over any /dev/renderD* >> >> nodes explicitly and avoid introducing new problems? >> > >> > >> > That's exactly the problem, and yes we could 100% solve by iterating > over >> > /dev/renderD* nodes. I originally assumed we wouldn't want to do that, > but >> > rather use the libdrm interfaces. >> > >> > But for the next spin I could avoid using libdrm, should I? > >> I don't have an opinion on libdrm really, but I do think we should >> fallback to the 1st (only) render node rather than just fail. > > We do, even with libdrm. > > AFAICT, the problem with virgl seems to be that drmGetDevices() doesn't > include devices on virtio bus in the results, which means that there likely > wouldn't be any render node returned. Okay. I still don't get why we search by bus in the first place. Who cares what bus the gpu sits on. Now I have an opinion. We should just iterate over render nodes matching by name or use the first node if we don't have a set name. Rob ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 0/3] egl/android: Remove dependencies on specific grallocs
On Fri, May 25, 2018 at 10:59 PM Rob Herring wrote: > On Fri, May 25, 2018 at 4:15 AM, Robert Foss wrote: > > > > > > On 2018-05-25 10:38, Tomasz Figa wrote: > >> > >> On Fri, May 25, 2018 at 5:33 PM Robert Foss > >> wrote: > >> > >>> Hey, > >> > >> > >>> On 2018-05-25 02:17, Rob Herring wrote: > > On Thu, May 24, 2018 at 6:23 AM, Robert Foss < robert.f...@collabora.com> > >> > >> wrote: > > > > Hey, > > > > I don't think I've received any feedback on this version yet. > > If anyone has some time to spare, it would be nice to get it merged. > > > > Just to be clear about the libdrm branch linked in the cover letter, > > it is not required. Only for virgl platforms which happens to be what > > I tested on. > > > virgl will still fallback to using the first render node without those > libdrm changes, right? If not, I don't think we should apply until > we're not breaking a platform... > >> > >> > >>> No it will not fall back. I agree that holding off makes more sense. > >> > >> > >> What's the reason of this problems? Is it because of drmGetDevices()? > >> Since > >> we don't really use it for anything other than getting the list of render > >> nodes in the system, maybe we could just iterate over any /dev/renderD* > >> nodes explicitly and avoid introducing new problems? > > > > > > That's exactly the problem, and yes we could 100% solve by iterating over > > /dev/renderD* nodes. I originally assumed we wouldn't want to do that, but > > rather use the libdrm interfaces. > > > > But for the next spin I could avoid using libdrm, should I? > I don't have an opinion on libdrm really, but I do think we should > fallback to the 1st (only) render node rather than just fail. We do, even with libdrm. AFAICT, the problem with virgl seems to be that drmGetDevices() doesn't include devices on virtio bus in the results, which means that there likely wouldn't be any render node returned. Best regards, Tomasz ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 0/3] egl/android: Remove dependencies on specific grallocs
On Fri, May 25, 2018 at 4:15 AM, Robert Foss wrote: > > > On 2018-05-25 10:38, Tomasz Figa wrote: >> >> On Fri, May 25, 2018 at 5:33 PM Robert Foss >> wrote: >> >>> Hey, >> >> >>> On 2018-05-25 02:17, Rob Herring wrote: On Thu, May 24, 2018 at 6:23 AM, Robert Foss >> >> wrote: > > Hey, > > I don't think I've received any feedback on this version yet. > If anyone has some time to spare, it would be nice to get it merged. > > Just to be clear about the libdrm branch linked in the cover letter, > it is not required. Only for virgl platforms which happens to be what > I tested on. virgl will still fallback to using the first render node without those libdrm changes, right? If not, I don't think we should apply until we're not breaking a platform... >> >> >>> No it will not fall back. I agree that holding off makes more sense. >> >> >> What's the reason of this problems? Is it because of drmGetDevices()? >> Since >> we don't really use it for anything other than getting the list of render >> nodes in the system, maybe we could just iterate over any /dev/renderD* >> nodes explicitly and avoid introducing new problems? > > > That's exactly the problem, and yes we could 100% solve by iterating over > /dev/renderD* nodes. I originally assumed we wouldn't want to do that, but > rather use the libdrm interfaces. > > But for the next spin I could avoid using libdrm, should I? I don't have an opinion on libdrm really, but I do think we should fallback to the 1st (only) render node rather than just fail. Rob ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 0/3] egl/android: Remove dependencies on specific grallocs
On 2018-05-25 10:38, Tomasz Figa wrote: On Fri, May 25, 2018 at 5:33 PM Robert Foss wrote: Hey, On 2018-05-25 02:17, Rob Herring wrote: On Thu, May 24, 2018 at 6:23 AM, Robert Foss wrote: Hey, I don't think I've received any feedback on this version yet. If anyone has some time to spare, it would be nice to get it merged. Just to be clear about the libdrm branch linked in the cover letter, it is not required. Only for virgl platforms which happens to be what I tested on. virgl will still fallback to using the first render node without those libdrm changes, right? If not, I don't think we should apply until we're not breaking a platform... No it will not fall back. I agree that holding off makes more sense. What's the reason of this problems? Is it because of drmGetDevices()? Since we don't really use it for anything other than getting the list of render nodes in the system, maybe we could just iterate over any /dev/renderD* nodes explicitly and avoid introducing new problems? That's exactly the problem, and yes we could 100% solve by iterating over /dev/renderD* nodes. I originally assumed we wouldn't want to do that, but rather use the libdrm interfaces. But for the next spin I could avoid using libdrm, should I? Rob. Best regards, Tomasz ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 0/3] egl/android: Remove dependencies on specific grallocs
On Fri, May 25, 2018 at 5:33 PM Robert Foss wrote: > Hey, > On 2018-05-25 02:17, Rob Herring wrote: > > On Thu, May 24, 2018 at 6:23 AM, Robert Foss wrote: > >> Hey, > >> > >> I don't think I've received any feedback on this version yet. > >> If anyone has some time to spare, it would be nice to get it merged. > >> > >> Just to be clear about the libdrm branch linked in the cover letter, > >> it is not required. Only for virgl platforms which happens to be what > >> I tested on. > > > > virgl will still fallback to using the first render node without those > > libdrm changes, right? If not, I don't think we should apply until > > we're not breaking a platform... > No it will not fall back. I agree that holding off makes more sense. What's the reason of this problems? Is it because of drmGetDevices()? Since we don't really use it for anything other than getting the list of render nodes in the system, maybe we could just iterate over any /dev/renderD* nodes explicitly and avoid introducing new problems? Best regards, Tomasz ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 0/3] egl/android: Remove dependencies on specific grallocs
Hey, On 2018-05-25 02:17, Rob Herring wrote: On Thu, May 24, 2018 at 6:23 AM, Robert Foss wrote: Hey, I don't think I've received any feedback on this version yet. If anyone has some time to spare, it would be nice to get it merged. Just to be clear about the libdrm branch linked in the cover letter, it is not required. Only for virgl platforms which happens to be what I tested on. virgl will still fallback to using the first render node without those libdrm changes, right? If not, I don't think we should apply until we're not breaking a platform... No it will not fall back. I agree that holding off makes more sense. Emil Velikov had some objections to the approach in the libdrm branch, and started a new branch from scratch with the same goals. It isn't yet fully functional, but I'm working with him to have it sent out as soon as possible. Rob. Rob Rob. On 2018-05-11 15:47, Robert Foss wrote: This series replaces the dependency on GRALLOC_MODULE_PERFORM_GET_DRM_FD with DRM node probing and disables the support for drm_gralloc. The series has been tested on Qemu+AOSP, where a virtio gpu was successfully probed for and opened. This however required adding support in libdrm for virtio gpus, and virtio buses. An initial patch for this can be found here: https://gitlab.collabora.com/robertfoss/libdrm/tree/virtio_rfc Changes since v1: - Added fix for build issue - Do not rely on libdrm for probing - Distinguish between errors and when no drm devices are found Changes since RFC: - Rebased work on the libdrm patch [2]. - Included patch from Rob Herring disabling drm_gralloc/flink support by default. - Added device handler driver probing. Rob Herring (1): egl/android: #ifdef out flink name support Robert Foss (2): gallium/util: Fix build error due to cast to different size egl/android: Add DRM node probing and filtering src/egl/Android.mk| 6 +- src/egl/drivers/dri2/egl_dri2.h | 2 - src/egl/drivers/dri2/platform_android.c | 206 ++ .../auxiliary/util/u_debug_stack_android.cpp | 4 +- 4 files changed, 174 insertions(+), 44 deletions(-) ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 0/3] egl/android: Remove dependencies on specific grallocs
Hi Rob, On Thu, May 24, 2018 at 8:23 PM Robert Foss wrote: > Hey, > I don't think I've received any feedback on this version yet. > If anyone has some time to spare, it would be nice to get it merged. Really sorry for taking so long to review. Posted my comments just now. Best regards, Tomasz > Just to be clear about the libdrm branch linked in the cover letter, > it is not required. Only for virgl platforms which happens to be what > I tested on. > Rob. > On 2018-05-11 15:47, Robert Foss wrote: > > This series replaces the dependency on > > GRALLOC_MODULE_PERFORM_GET_DRM_FD with DRM node > > probing and disables the support for drm_gralloc. > > > > The series has been tested on Qemu+AOSP, where a > > virtio gpu was successfully probed for and > > opened. > > > > This however required adding support in libdrm > > for virtio gpus, and virtio buses. An initial > > patch for this can be found here: > > > > https://gitlab.collabora.com/robertfoss/libdrm/tree/virtio_rfc > > > > Changes since v1: > > - Added fix for build issue > > - Do not rely on libdrm for probing > > - Distinguish between errors and when no drm devices are found > > > > Changes since RFC: > > - Rebased work on the libdrm patch [2]. > > - Included patch from Rob Herring disabling drm_gralloc/flink > > support by default. > > - Added device handler driver probing. > > > > > > Rob Herring (1): > >egl/android: #ifdef out flink name support > > > > Robert Foss (2): > >gallium/util: Fix build error due to cast to different size > >egl/android: Add DRM node probing and filtering > > > > src/egl/Android.mk| 6 +- > > src/egl/drivers/dri2/egl_dri2.h | 2 - > > src/egl/drivers/dri2/platform_android.c | 206 ++ > > .../auxiliary/util/u_debug_stack_android.cpp | 4 +- > > 4 files changed, 174 insertions(+), 44 deletions(-) > > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 0/3] egl/android: Remove dependencies on specific grallocs
On Thu, May 24, 2018 at 6:23 AM, Robert Foss wrote: > Hey, > > I don't think I've received any feedback on this version yet. > If anyone has some time to spare, it would be nice to get it merged. > > Just to be clear about the libdrm branch linked in the cover letter, > it is not required. Only for virgl platforms which happens to be what > I tested on. virgl will still fallback to using the first render node without those libdrm changes, right? If not, I don't think we should apply until we're not breaking a platform... Rob > > Rob. > > On 2018-05-11 15:47, Robert Foss wrote: >> >> This series replaces the dependency on >> GRALLOC_MODULE_PERFORM_GET_DRM_FD with DRM node >> probing and disables the support for drm_gralloc. >> >> The series has been tested on Qemu+AOSP, where a >> virtio gpu was successfully probed for and >> opened. >> >> This however required adding support in libdrm >> for virtio gpus, and virtio buses. An initial >> patch for this can be found here: >> >> https://gitlab.collabora.com/robertfoss/libdrm/tree/virtio_rfc >> >> Changes since v1: >> - Added fix for build issue >> - Do not rely on libdrm for probing >> - Distinguish between errors and when no drm devices are found >> >> Changes since RFC: >> - Rebased work on the libdrm patch [2]. >> - Included patch from Rob Herring disabling drm_gralloc/flink >> support by default. >> - Added device handler driver probing. >> >> >> Rob Herring (1): >>egl/android: #ifdef out flink name support >> >> Robert Foss (2): >>gallium/util: Fix build error due to cast to different size >>egl/android: Add DRM node probing and filtering >> >> src/egl/Android.mk| 6 +- >> src/egl/drivers/dri2/egl_dri2.h | 2 - >> src/egl/drivers/dri2/platform_android.c | 206 ++ >> .../auxiliary/util/u_debug_stack_android.cpp | 4 +- >> 4 files changed, 174 insertions(+), 44 deletions(-) >> > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 0/3] egl/android: Remove dependencies on specific grallocs
Hey, I don't think I've received any feedback on this version yet. If anyone has some time to spare, it would be nice to get it merged. Just to be clear about the libdrm branch linked in the cover letter, it is not required. Only for virgl platforms which happens to be what I tested on. Rob. On 2018-05-11 15:47, Robert Foss wrote: This series replaces the dependency on GRALLOC_MODULE_PERFORM_GET_DRM_FD with DRM node probing and disables the support for drm_gralloc. The series has been tested on Qemu+AOSP, where a virtio gpu was successfully probed for and opened. This however required adding support in libdrm for virtio gpus, and virtio buses. An initial patch for this can be found here: https://gitlab.collabora.com/robertfoss/libdrm/tree/virtio_rfc Changes since v1: - Added fix for build issue - Do not rely on libdrm for probing - Distinguish between errors and when no drm devices are found Changes since RFC: - Rebased work on the libdrm patch [2]. - Included patch from Rob Herring disabling drm_gralloc/flink support by default. - Added device handler driver probing. Rob Herring (1): egl/android: #ifdef out flink name support Robert Foss (2): gallium/util: Fix build error due to cast to different size egl/android: Add DRM node probing and filtering src/egl/Android.mk| 6 +- src/egl/drivers/dri2/egl_dri2.h | 2 - src/egl/drivers/dri2/platform_android.c | 206 ++ .../auxiliary/util/u_debug_stack_android.cpp | 4 +- 4 files changed, 174 insertions(+), 44 deletions(-) ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 0/3] egl/android: Remove dependencies on specific grallocs
Hey, After today I'll be out of the office until the 23rd, So if this series looks ok, I won't be able to re-spin it with more tags. So feel free to just push it if possible. Rob. On 2018-05-11 15:47, Robert Foss wrote: This series replaces the dependency on GRALLOC_MODULE_PERFORM_GET_DRM_FD with DRM node probing and disables the support for drm_gralloc. The series has been tested on Qemu+AOSP, where a virtio gpu was successfully probed for and opened. This however required adding support in libdrm for virtio gpus, and virtio buses. An initial patch for this can be found here: https://gitlab.collabora.com/robertfoss/libdrm/tree/virtio_rfc Changes since v1: - Added fix for build issue - Do not rely on libdrm for probing - Distinguish between errors and when no drm devices are found Changes since RFC: - Rebased work on the libdrm patch [2]. - Included patch from Rob Herring disabling drm_gralloc/flink support by default. - Added device handler driver probing. Rob Herring (1): egl/android: #ifdef out flink name support Robert Foss (2): gallium/util: Fix build error due to cast to different size egl/android: Add DRM node probing and filtering src/egl/Android.mk| 6 +- src/egl/drivers/dri2/egl_dri2.h | 2 - src/egl/drivers/dri2/platform_android.c | 206 ++ .../auxiliary/util/u_debug_stack_android.cpp | 4 +- 4 files changed, 174 insertions(+), 44 deletions(-) ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev