- Apr 19, 2018
-
-
Tomeu Vizoso authored
kms_swrast can work without a KMS device, so don't fail to init if no device was found. This allows the platform to be used in machines where no KMS device at all is present. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
-
- Dec 27, 2017
-
-
Eric Engestrom authored
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-
- Oct 18, 2017
-
-
Eric Engestrom authored
Suggested-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
-
- Oct 03, 2017
-
-
Gurchetan Singh authored
The kms_swrast extension is an actively developed software fallback, and platform_surfaceless can use it if there are no available hardware drivers. v2: Split into 2 patches, use booleans, check LIBGL_ALWAYS_SOFTWARE, and modify the eglLog level (Emil, Eric, Tomasz). Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
-
Gurchetan Singh authored
This will help us initialize a software driver, if it's needed or requested. Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
-
- Sep 27, 2017
-
-
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 attributes EGL_MIN_SWAP_INTERVAL and EGL_MAX_SWAP_INTERVAL respectively. 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: Tomasz Figa <tfiga@chromium.org> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Chad Versace <chadversary@chromium.org> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
-
- Sep 19, 2017
-
-
Zhongmin Wu authored
Add plumbing to allow creation of per display surface out fence. This can be used to implement explicit sync. One user of which is Android - which will be addressed with next commit. Signed-off-by: Zhongmin Wu <zhongmin.wu@intel.com> Signed-off-by: Yogesh Marathe <yogesh.marathe@intel.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Tomasz Figa <tfiga@chromium.org> [Emil Velikov: reorder so there's no intermetent regressions, split] Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
-
- Aug 30, 2017
-
-
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 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 false 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=101655 Signed-off-by: Zhongmin Wu <zhongmin.wu@intel.com> Signed-off-by: Yogesh Marathe <yogesh.marathe@intel.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Tomasz Figa <tfiga@chromium.org>
-
- Jun 22, 2017
-
-
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 problem. v2: Rebase. Fix typo. Apply to all platforms (for emil). Reviewed-by: Eric Engestrom <eric@engestrom.ch> (v1)
-
Chad Versace authored
That is, consistently do this: for (int i = 0; ...) No behavioral change. Reviewed-by: Eric Engestrom <eric@engestrom.ch>
-
Eric Engestrom authored
dri2_conf represents another config (which shouldn't be counted) if it doesn't have the requested ID. Reported-by: Liu Zhiquan <zhiquan.liu@intel.com> Signed-off-by: Eric Engestrom <eric@engestrom.ch> Cc: <mesa-stable@lists.freedesktop.org> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-
- Jun 11, 2017
-
-
Harish Krupo authored
This patch adds support for the EGL_KHR_partial_update extension for android platform. It passes 36/37 tests in dEQP for EGL_KHR_partial_update. 1 test not supported. v2: add fallback for eglSetDamageRegionKHR (Tapani) v3: The native_window_set_surface_damage call is available only from Android version 6.0. Reintroduce the ANDROID_VERSION guard and advertise extension only if version is >= 6.0. (Emil Velikov) v4: use newly introduced ANDROID_API_LEVEL guard rather than ANDROID_VERSION guard to advertise the extension.The extension is advertised only if ANDROID_API_LEVEL >= 23 (Android 6.0 or greater). Add fallback function for platforms other than Android. Fix possible math overflow. (Emil Velikov) Return immediately when n_rects is 0. Place function's entrypoint in alphabetical order. (Eric Engestrom) v5: Replace unnecessary calloc with malloc (Eric) Check for BAD_ALLOC error (Emil) Check for error in native_window_set_damage_region. (Emil, Tapani, Eric). Signed-off-by: Harish Krupo <harish.krupo.kps@intel.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
-
- May 29, 2017
-
-
Emil Velikov authored
Analogous to previous commit. Cc: Chad Versace <chadversary@chromium.org> Cc: Gurchetan Singh <gurchetansingh@chromium.org> Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
-
Emil Velikov authored
With the final place that modifies the vtbl removed as of last commit we can annotate the symbols accordingly. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
-
Emil Velikov authored
Split the create_screen into: - create screen - setup/bind extensions - setup screen This will allow us to reuse the latter two on egl/drm. Said platform does create its own screen and attempts to reinvent the later two functions itself. Since the GBM ones tend to get out of sync quite often, and there is no distinct reason why it does so we'll drop them with latter commits. v2: disp -> dpy for the Android platform. v3: use correct goto label (Rob) Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Tested-by: Rob Herring <robh@kernel.org>
-
Emil Velikov authored
Cc: Chad Versace <chadversary@chromium.org> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> Tested-by: Rob Herring <robh@kernel.org>
-
- Jan 13, 2017
-
-
Boyan Ding authored
Signed-off-by: Boyan Ding <boyan.j.ding@gmail.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> [Emil Velikov: address platform_surfaceless] Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
-
- Dec 09, 2016
-
-
Emil Velikov authored
Already set by the core code - dri2_create_screen/dri2_setup_screen Cc: Chad Versace <chadversary@chromium.org> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
-
- Oct 18, 2016
-
-
Chad Versace authored
Since commit 63c5d5c6, the surfaceless platform has allowed creation of pbuffer surfaces. But the vtable entry for eglSwapBuffers has remained NULL. Discovered by running a little pbuffer test. Cc: Gurchetan Singh <gurchetansingh@chromium.org> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
-
Emil Velikov authored
Reminiscent from the pre-loader days, were we had multiple instances of the loader logic in separate places and one could build a "GALLIUM_ONLY" version. Since that is no longer the case and the loaders (glx/egl/gbm) do not (and should not) require to know any classic/gallium specific we can drop the argument and the related code. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Axel Davy <axel.davy@ens.fr> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
-
- Oct 16, 2016
-
-
Chad Versace authored
Fixes GCC warning: drivers/dri2/platform_surfaceless.c:196:18: warning: comparison between pointer and integer Fixes: 4b8a5580 ("egl/surfaceless: tweak surfaceless_add_configs_for_visuals()") Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
-
Emil Velikov authored
i is used for the driver_configs, while j is for the visuals. Fixes: 4b8a5580 ("egl/surfaceless: tweak surfaceless_add_configs_for_visuals()") Reported-by: Chad Versace <chadversary@chromium.org> Tested-by: Chad Versace <chadversary@chromium.org> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
-
- Oct 14, 2016
-
-
Emil Velikov authored
Analogous to previous commit. v2: Use correct comparison in loop conditional (Eric) Use valid C initializer (Gurchetan) Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
-
Emil Velikov authored
Currently we print a debug message if the total configs is non-zero only to do the same (at an error level) as we return from the function. Rework the message to print if we're missing a config for the given format. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
-
Emil Velikov authored
Remove the error prone fixed size array. While we're here also rename to loader_extensions like in the GLX code. v2: Rebase. Keep image_loader_extension within the wayland_drm dri2_loader_extensions list. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
-
Emil Velikov authored
Remove a few gratious blank lines and use the correct level of indentation. Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
-
Emil Velikov authored
The latter already does it for us. As we're here annotate the masks as const and use unsigned for the index(es). Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
-
Emil Velikov authored
Earlier commit introduced support for image_loader and left the dri2_loader code dangling/unused. Let's remove it. Fixes: 63c5d5c6 ("Added pbuffer hooks for surfaceless platform") Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
-
Emil Velikov authored
The extension stored in struct dri2_egl_display isn't used, thus we can create a static const instance of the extension and point extensions[] to it. Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
-
Emil Velikov authored
All the platforms are duplicating what should be a driver/dri2 thing - refcounting. Just fold it accordingly. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
-
- Aug 15, 2016
-
-
Nicolas Boichat authored
Avoid use-after-free on error. Fixes: 9ee683f8 (egl/dri2: Add reference count for dri2_egl_display) Cc: "12.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Martin Peres <martin.peres@linux.intel.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-
- Jun 14, 2016
-
-
Gurchetan Singh authored
This change enables the creation of pbuffer surfaces on the surfaceless platform. v3: Going back to single-buffered pbuffer plus additional code review changes Reviewed-by: Chad Versace <chad.versace@intel.com>
-
- Apr 26, 2016
-
-
Jakob Sinclair authored
Removes all accidental semi-colons in egl. Signed-off-by: Jakob Sinclair <sinclair.jakob@openmailbox.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
-
- Jun 23, 2015
-
-
Derek Foreman authored
We've moved the open with CLOEXEC idiom into a helper function, so call it instead of duplicating the code. This also replaces a couple of opens that didn't properly do CLOEXEC. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
-
- Jun 16, 2015
-
-
Haixia Shi authored
The surfaceless platform is for off-screen rendering only. Render node support is required. Only consider the render nodes. Do not use normal nodes as they require auth hooks. v3: change platform_null to platform_surfaceless v4: make libdrm required for surfaceless v5: remove modified include guards with defined(HAVE_SURFACELESS_PLATFORM) v6: use O_CLOEXEC for drm fd Signed-off-by: Haixia Shi <hshi@chromium.org> Signed-off-by: Zach Reizner <zachr@google.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
-