1. 12 Nov, 2018 1 commit
  2. 01 Nov, 2018 1 commit
  3. 03 Oct, 2018 1 commit
  4. 20 Sep, 2018 1 commit
    • Emil Velikov's avatar
      egl/android: rework device probing · b8b3517a
      Emil Velikov authored
      Unlike the other platforms, here we aim do guess if the device that we
      somewhat arbitrarily picked, is supported or not.
      In particular: when a vendor is _not_ requested we loop through all
      devices, picking the first one which can create a DRI screen.
      When a vendor is requested - we use that and do _not_ fall-back to any
      other device.
      The former seems a bit fiddly, but considering EGL_EXT_explicit_device and
      EGL_MESA_query_renderer are MIA, this is the best we can do for the
      With those (proposed) extensions userspace will be able to create a
      separate EGL display for each device, query device details and make the
      conscious decision which one to use.
       - update droid_open_device_drm_gralloc()
       - set the dri2_dpy->fd before using it
       - return a EGLBoolean for droid_{probe,open}_device*
       - do not warn on droid_load_driver failure (Tomasz)
       - plug mem leak on dri2_create_screen failure (Tomasz)
       - fixup function name typo (Tomasz, Rob)
       - add forward declaration for droid_load_driver()
      Fixes the HAVE_DRM_GRALLOC build (Mauro)
       - split dup() assignment and check in separate lines (Tomasz, Eric)
       - make droid_load_driver() static (Tomasz)
       - drop unused prop_set variable (Tomasz)
       - rebase
       - fwd declarationi should be for droid_probe_device()
      Cc: Robert Foss <robert.foss@collabora.com>
      Cc: Tomasz Figa <tfiga@chromium.org>
      Cc: Mauro Rossi <issor.oruam@gmail.com>
      Signed-off-by: default avatarEmil Velikov <emil.velikov@collabora.com>
      Reviewed-by: default avatarTomasz Figa <tfiga@chromium.org>
      Tested-by: default avatarTomasz Figa <tfiga@chromium.org>
      Tested-by: default avatarTapani Pälli <tapani.palli@intel.com>
  5. 13 Sep, 2018 1 commit
  6. 02 Sep, 2018 1 commit
  7. 24 Aug, 2018 5 commits
  8. 21 Aug, 2018 1 commit
    • Chad Versace's avatar
      egl/android: Implement EGL_KHR_mutable_render_buffer · ed7c6946
      Chad Versace authored
      Specifically, implement the extension DRI_MutableRenderBufferLoader.
      However, the loader enables EGL_KHR_mutable_render_buffer only if the
      DRI driver implements its half of the extension,
        - No change in dEQP-EGL.functional.* on Fedora 27, Wayland, Skylake
          GT2.  Used deqp at tag android-p-preview-5.
        - No change in dEQP-EGL.functional.*, ran on Android on Chrome OS,
          Kabylake GT2.
        - Manually inspected Android apps on same Chrome OS device.
      Reviewed-by: default avatarTapani Pälli <tapani.palli@intel.com>
  9. 15 Aug, 2018 1 commit
    • Mauro Rossi's avatar
      egl/android: fix regression in drm_gralloc path (v2) · 73b342c7
      Mauro Rossi authored
      This patch fixes a regression in mesa 18.2 and mesa-dev branches
      for HAVE_DRM_GRALLOC code path which is causing black screen on Android
      and prevents boot due to SIGSEGV MAPERR crash related to unproper handling
      of drm_gralloc drm FD in new droid_open_device() path.
      Problem is due to c7bb8213 ("egl/android: Add DRM node probing and filtering")
      To avoid the crash the former existing working droid_open_device() is restored,
      renamed droid_open_device_drm_gralloc() and kept within HAVE_DRM_GRALLOC braces.
      Tested with mesa-dev and mesa 18.2 branch and oreo-x86 bootanimation
      and Androdi GUI booting is fixed with i965, nouveau, radeon.
      The changes are compatible with gbm_gralloc, I've tested build with hwc too.
      (v2) remove indentation from HAVE_DRM_GRALLOC pre-processor directive
      NOTE: Definition of enum{} for GRALLOC_MODULE_PERFORM_GET_DRM_FD
      is not necessary and it's actually causing a redefinition building error,
      because in HAVE_DRM_GRALLOC path gralloc_drm.h is already exported
      by libgralloc_drm which is currently still a dependency.
      Fixes: c7bb8213 ("egl/android: Add DRM node probing and filtering")
      Cc: "18.2" <mesa-stable@lists.freedesktop.org>
      Signed-off-by: default avatarMauro Rossi <issor.oruam@gmail.com>
  10. 25 Jun, 2018 2 commits
  11. 04 May, 2018 1 commit
  12. 16 Mar, 2018 1 commit
    • Wu, Zhongmin's avatar
      egl/android: Implement the eglSwapinterval for Android. · 5fc21c60
      Wu, Zhongmin authored
      Implement the eglSwapinterval for Android platform to
      enable the async mode for some GFX benchmarks such as
      Daimler C217, CityBench.
      Results of the dEQP-EGL.*swap_interval tests
       Test run totals:
         Passed:        7/7 (100.0%)
         Failed:        0/7 (0.0%)
         Not supported: 0/7 (0.0%)
         Warnings:      0/7 (0.0%)
      Signed-off-by: default avatarZhongmin Wu <zhongmin.wu@intel.com>
      Reviewed-by: default avatarEric Engestrom <eric@engestrom.ch>
      Reviewed-by: default avatarEmil Velikov <emil.velikov@collabora.com>
      Reviewed-by: default avatarTomasz Figa <tfiga@chromium.org>
      [Emil Velikov: polish inline comment, add dEQP stats, s/dpy/disp/]
      Signed-off-by: default avatarEmil Velikov <emil.velikov@collabora.com>
  13. 04 Jan, 2018 1 commit
  14. 27 Dec, 2017 2 commits
  15. 14 Dec, 2017 1 commit
  16. 13 Dec, 2017 1 commit
  17. 08 Nov, 2017 1 commit
  18. 27 Sep, 2017 1 commit
    • Tomasz Figa's avatar
      egl/dri2: Implement swapInterval fallback in a conformant way (v2) · 23a09b4f
      Tomasz Figa authored
      dri2_fallback_swap_interval() currently used to stub out swap interval
      support in Android backend does nothing besides returning EGL_FALSE.
      This causes at least one known application (Android Snapchat) to fail
      due to an unexpected error and my loose interpretation of the EGL 1.5
      specification justifies it. Relevant quote below:
          The function
              EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint interval);
          specifies the minimum number of video frame periods per buffer swap
          for the draw surface of the current context, for the current rendering
          API. [...]
          The parameter interval specifies the minimum number of video frames
          that are displayed before a buffer swap will occur. The interval
          specified by the function applies to the draw surface bound to the
          context that is current on the calling thread. [...] interval is
          silently clamped to minimum and maximum implementation dependent
          values before being stored; these values are defined by EGLConfig
          The default swap interval is 1.
      Even though it does not specify the exact behavior if the platform does
      not support changing the swap interval, the default assumed state is the
      swap interval of 1, which I interpret as a value that eglSwapInterval()
      should succeed if called with, even if there is no ability to change the
      interval (but there is no change requested). Moreover, since the
      behavior is defined to clamp the requested value to minimum and maximum
      and at least the default value of 1 must be present in the range, the
      implementation might be expected to have a valid range, which in case of
      the feature being unsupported, would correspond to {1} and any request
      might be expected to be clamped to this value.
      Fix this by defaulting dri2_dpy's min_swap_interval, max_swap_interval
      and default_swap_interval to 1 in dri2_setup_screen() and let platforms,
      which support this functionality set their own values after this
      function returns. Thanks to patches merged earlier, we can also remove
      the dri2_fallback_swap_interval() completely, as with a singular range
      it would not be called anyway.
      v2: Remove dri2_fallback_swap_interval() completely thanks to higher
          layer already clamping the requested interval and not calling the
          driver layer if the clamped value is the same as current.
      Signed-off-by: default avatarTomasz Figa <tfiga@chromium.org>
      Reviewed-by: default avatarEmil Velikov <emil.velikov@collabora.com>
      Reviewed-by: default avatarChad Versace <chadversary@chromium.org>
      Reviewed-by: default avatarTapani Pälli <tapani.palli@intel.com>
  19. 19 Sep, 2017 2 commits
  20. 30 Aug, 2017 2 commits
    • Mark Janes's avatar
      Revert "egl: Allow creation of per surface out fence" · 8c9df0da
      Mark Janes authored
      This reverts commit 13c23b19.
      Mesa CI was brought down by this commit, with:
      mesa/drivers/dri/i965/brw_sync.c:491: brw_dri_create_fence_fd:
      Assertion `brw->screen->has_exec_fence' failed.
    • Zhongmin Wu's avatar
      egl: Allow creation of per surface out fence · 13c23b19
      Zhongmin Wu authored
      Add plumbing to allow creation of per display surface out fence.
      Currently enabled only on android, since the system expects a valid
      fd in ANativeWindow::{queue,cancel}Buffer. We pass a fd of -1 with
      which native applications such as flatland fail. The patch enables
      explicit sync on android and fixes one of the functional issue for
      apps or buffer consumers which depend upon fence and its timestamp.
      v2: a) Also implement the fence in cancelBuffer.
          b) The last sync fence is stored in drawable object
             rather than brw context.
          c) format clear.
      v3: a) Save the last fence fd in DRI Context object.
          b) Return the last fence if the batch buffer is empty and
             nothing to be flushed when _intel_batchbuffer_flush_fence
          c) Add the new interface in vbtl to set the retrieve fence
      v3.1 a) close fd in the new vbtl interface on none Android platform
      v4: a) The last fence is saved in brw context.
          b) The retrieve fd is for all the platform but not just Android
          c) Add a uniform dri2 interface to initialize the surface.
      v4.1: a) make some changes of variable name.
            b) the patch is broken into two patches.
      v4.2: a) Add a deinit interface for surface to clear the out fence
      v5: a) Add enable_out_fence to init, platform sets it true or
          b) Change get fd to update fd and check for fence
          c) Commit description updated
      v6: a) Heading and commit description updated
          b) enable_out_fence is set only if fence is supported
          c) Review comments on function names
          d) Test with standalone patch, resolves the bug
      v6.1: Check for old display fence reverted
      v6.2: enable_out_fence initialized to false by default,
            dri2_surf_update_fence_fd updated, deinit changed to fini
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101655Signed-off-by: default avatarZhongmin Wu <zhongmin.wu@intel.com>
      Signed-off-by: default avatarYogesh Marathe <yogesh.marathe@intel.com>
      Reviewed-by: default avatarEmil Velikov <emil.velikov@collabora.com>
      Reviewed-by: default avatarTomasz Figa <tfiga@chromium.org>
  21. 25 Aug, 2017 1 commit
  22. 24 Aug, 2017 1 commit
  23. 22 Aug, 2017 1 commit
    • Gwan-gyeong Mun's avatar
      egl: deduplicate allocations of local buffer over each platform backend (v2) · 640b6e60
      Gwan-gyeong Mun authored
      platform_drm, platform_wayland and platform_android have similiar local buffer
      allocation routines. For deduplicating, it unifies dri2_egl_surface's
      local buffer allocation routines. And it polishes inconsistent indentations.
      Note that as dri2_wl_get_buffers_with_format() have not make a __DRI_BUFFER_BACK_LEFT
      attachment buffer for local_buffers, new helper function, dri2_egl_surface_free_local_buffers(),
      will drop the __DRI_BUFFER_BACK_LEFT check.
      So if other platforms use new helper functions, we have to ensure not to make
      __DRI_BUFFER_BACK_LEFT attachment buffer for local_buffers.
      v2: Fixes from Emil's review:
         a) Make local_buffers variable, dri2_egl_surface_alloc_local_buffer() and
            dri2_egl_surface_free_local_buffers() unconditionally.
         b) Preserve the original codeflow for error_path and normal_path.
         c) Add note on commit messages for dropping of __DRI_BUFFER_BACK_LEFT check.
         c) Rollback the unrelated whitespace changes.
         d) Add a missing blank line.
      Signed-off-by: default avatarMun Gwan-gyeong <elongbug@gmail.com>
      Reviewed-by: default avatarEmil Velikov <emil.velikov@collabora.com>
      Reviewed-by: default avatarEric Engestrom <eric.engestrom@imgtec.com>
      Reviewed-by: default avatarTomasz Figa <tfiga@chromium.org>
  24. 10 Aug, 2017 1 commit
  25. 31 Jul, 2017 2 commits
  26. 19 Jul, 2017 1 commit
  27. 05 Jul, 2017 1 commit
  28. 26 Jun, 2017 2 commits
  29. 22 Jun, 2017 2 commits
    • Chad Versace's avatar
      egl: Rename 'count' in ${platform}_add_configs_for_visuals (v2) · ffbf50b1
      Chad Versace authored
      Rename 'count' to 'config_count'. I didn't understand what the variable
      did until I untangled the for-loops. Now the next person won't have that
      v2: Rebase. Fix typo. Apply to all platforms (for emil).
      Reviewed-by: Eric Engestrom <eric@engestrom.ch>  (v1)
    • Chad Versace's avatar
      egl/android: Declare EGLConfig attrib array inside loop (v2) · bd789098
      Chad Versace authored
      No behavioral change. Just a readability cleanup.
      Instead of modifying this small array on each loop iteration, we now
      initialize it in-place with the values it needs.
      v2: Rebase.
      Reviewed-by: Eric Engestrom <eric@engestrom.ch> (v1)