On 10 September 2018 at 22:23, Mauro Rossi <issor.or...@gmail.com> wrote: > Hi Emil, > Il giorno lun 3 set 2018 alle ore 14:42 Emil Velikov > <emil.l.veli...@gmail.com> ha scritto: >> >> From: Emil Velikov <emil.veli...@collabora.com> >> >> 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 >> moment. >> >> 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. >> >> v2: >> - 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) >> >> v3: >> - 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) >> >> Cc: Robert Foss <robert.f...@collabora.com> >> Cc: Tomasz Figa <tf...@chromium.org> >> Cc: Mauro Rossi <issor.or...@gmail.com> >> Signed-off-by: Emil Velikov <emil.veli...@collabora.com> >> Tested-by: Tomasz Figa <tf...@chromium.org> >> Tested-by: Tapani Pälli <tapani.pa...@intel.com> >> --- >> Thanks for the feedback everyone. >> >> Mauro, this includes a forward declaration which should fix things for >> you. >> --- >> src/egl/drivers/dri2/platform_android.c | 124 +++++++++++++++--------- >> 1 file changed, 79 insertions(+), 45 deletions(-) >> >> diff --git a/src/egl/drivers/dri2/platform_android.c >> b/src/egl/drivers/dri2/platform_android.c >> index ecc0245c9a2..5a73d9e7ea9 100644 >> --- a/src/egl/drivers/dri2/platform_android.c >> +++ b/src/egl/drivers/dri2/platform_android.c >> @@ -1202,10 +1202,14 @@ droid_add_configs_for_visuals(_EGLDriver *drv, >> _EGLDisplay *dpy) >> return (config_count != 0); >> } >> >> +static EGLBoolean >> +droid_load_driver(_EGLDisplay *disp); > > droid_probe_device(_EGLDisplay *disp); > > is required here, as it is invoked in droid_open_device_drm_gralloc() > With this change there is no regression in the drivers I've tested > (Intel and AMD) > Thanks Mauro, tweaked and pushed to master.
-Emil _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev