Skip to content
Snippets Groups Projects

Add support for non-Mesa ARM platforms (mali, pvr)

Merged David Riley requested to merge davidriley/virglrenderer:arm64-virtio-gpu into master
1 unresolved thread

Some existing assumptions don't necessarily hold true for non-Mesa ARM platforms so loosen them.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
201 201 d->egl_display = eglGetDisplay((EGLNativeDisplayType)d->gbm_dev);
202 202 }
203 203
204 /* Fallback to using the default display. */
205 if (!d->egl_display) {
206 d->egl_display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
207 }
208
  • When the caller passes in the fd, I guess we have to use the fd (I am not really familiar with the code). We should fail when fd is non-negative.

    Also, when EGL_DEFAULT_DISPLAY is used, we can close d->gbm_dev and d->fd.

  • The function works like this currently

    if (surfaceless) must_use_surfaceless_platform;
    else if (fd >= 0) must_use_gbm_platform;
    else if (egl_rendernode_open() >= 0) must_use_gbm_platform;
    else fail;

    It is totally unclear how fd and surfaceless should be interpreted, regarding the precedence and if fallback is allowed. Can you also clarify how the two parameters work and interact, in the code or in the commit message, after this change?

  • Author Developer

    Done.

  • Please register or sign in to reply
  • David Riley added 1 commit

    added 1 commit

    • 240cbb9a - egl: Fall back to using default display and clean up fd ownership.

    Compare with previous version

  • Thanks. Reviewed-by: Chia-I Wu <olvaffe@gmail.com>

    Unless an explicit fd is passed in, virgl_egl_init should be able to pick whatever platform it likes, and surfaceless is probably the top choice. I find it strange that the function needs a bool to enable surfaceless, but that is a different commit.

  • @davidriley could you add the R-b tags, and enable the CI so I can merge this via the merge-when-ci-passes button?

  • David Riley added 3 commits

    added 3 commits

    • c5d65dfb - egl: Change config attributes to GLES 2.0 instead of 1.0/1.1.
    • 1fd3cd5c - egl: Do not require EGL_MESA_drm_image || EGL_MESA_image_dma_buf_export.
    • 040b5a07 - egl: Fall back to using default display and clean up fd ownership.

    Compare with previous version

  • Author Developer

    Done, thank you!

  • It seems like you didn't enable the CI yet (on your fork).

    Edited by Gert Wollny
  • Author Developer

    My settings show it as enabled: 05AumVcdDQb

    Is there some other setting or branch-specific setting I need enabled?

  • Maybe to trigger the pipeline one would have to do another push, did you enable it after pushing the updated commits or before?

  • Gert Wollny added 4 commits

    added 4 commits

    • 96c359b5 - 1 commit from branch virgl:master
    • a082ef0f - egl: Change config attributes to GLES 2.0 instead of 1.0/1.1.
    • 926479ab - egl: Do not require EGL_MESA_drm_image || EGL_MESA_image_dma_buf_export.
    • af23ed8c - egl: Fall back to using default display and clean up fd ownership.

    Compare with previous version

  • merged

  • Well, I merged it in the hope that the changes don't do something unexpected

  • Author Developer

    I pushed the updated commits, and then did the settings change.

    Fingers crossed!

  • Please register or sign in to reply
    Loading