Re: [Mesa-dev] [egl/android: Implement the eglSwapinterval for Android] egl/android: Implement the eglSwapinterval for Android.
Hi Tomasz: Thanks very much for your reply, I will re-submit the patch. And I did not do the deqp testing yet, I am going to have a try. -Original Message- From: mesa-dev [mailto:mesa-dev-boun...@lists.freedesktop.org] On Behalf Of Tomasz Figa Sent: Tuesday, January 16, 2018 15:17 To: Wu, Zhongmin <zhongmin...@intel.com> Cc: Long, Zhifang <zhifang.l...@intel.com>; Kps, Harish Krupo <harish.krupo@intel.com>; Xu, Randy <randy...@intel.com>; Chad Versace <chadvers...@chromium.org>; Eric Engestrom <e...@engestrom.ch>; Emil Velikov <emil.l.veli...@gmail.com>; Kondapally, Kalyan <kalyan.kondapa...@intel.com>; Bhardwaj, MunishX <munishx.bhard...@intel.com>; mesa-dev@lists.freedesktop.org Subject: Re: [Mesa-dev] [egl/android: Implement the eglSwapinterval for Android] egl/android: Implement the eglSwapinterval for Android. Hi Zhongmin, On Tue, Jan 16, 2018 at 4:07 PM, Wu, Zhongmin <zhongmin...@intel.com> wrote: > Sorry, is there any comment about the below patch, Thanks very much! Or did I > miss something ? I assumed this was sent by mistake. The subject doesn't look like a patch for review - it should have [PATCH] prefix. There was even a follow-up email (presumably generated by your mailing client) to cancel sending it. Also please remove internal annotations, such as gerrit Change-Id, since they do not have any meaning for upstream purposes. As for the change itself, it looks fine to me, +/- some style nitpicks, which I listed inline. Have you checked if there are no dEQP regressions (at least for the EGL suite)? Best regards, Tomasz > > -Original Message- > From: Wu, Zhongmin > Sent: Wednesday, January 3, 2018 10:11 > To: mesa-dev@lists.freedesktop.org > Cc: Kondapally, Kalyan <kalyan.kondapa...@intel.com>; Palli, Tapani > <tapani.pa...@intel.com>; Xu, Randy <randy...@intel.com>; Long, > Zhifang <zhifang.l...@intel.com>; Wu, Zhongmin > <zhongmin...@intel.com>; Rob Herring <r...@kernel.org>; Tomasz Figa > <tf...@chromium.org>; Eric Engestrom <e...@engestrom.ch>; Emil Velikov > <emil.l.veli...@gmail.com>; Bhardwaj, MunishX > <munishx.bhard...@intel.com>; Kps, Harish Krupo > <harish.krupo@intel.com>; Chad Versace <chadvers...@chromium.org> > Subject: [egl/android: Implement the eglSwapinterval for Android] > egl/android: Implement the eglSwapinterval for Android. > > From: Zhongmin Wu <zhongmin...@intel.com> > > Implement the eglSwapinterval for Android platform to enable the async mode > for some GFX benchmarks. > > Change-Id: I3576d8b92862719dae11c31e2adc2d77cb5a0b64 > Signed-off-by: Zhongmin Wu <zhongmin...@intel.com> > --- > src/egl/drivers/dri2/platform_android.c | 15 +++ > 1 file changed, 15 insertions(+) > > diff --git a/src/egl/drivers/dri2/platform_android.c > b/src/egl/drivers/dri2/platform_android.c > index f6a24cd..f9c74ee 100644 > --- a/src/egl/drivers/dri2/platform_android.c > +++ b/src/egl/drivers/dri2/platform_android.c > @@ -476,6 +476,18 @@ droid_destroy_surface(_EGLDriver *drv, _EGLDisplay > *disp, _EGLSurface *surf) > return EGL_TRUE; > } > > +static EGLBoolean droid_swap_interval(_EGLDriver *drv, _EGLDisplay *dpy, > +_EGLSurface *surf, EGLint interval) { Please move the function name to new line, align the arguments with the top lines, if there is a need to wrap the lines and move the opening brace to new line, to match the coding style already used in the file. > + No need for this blank line. Best regards, Tomasz ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [egl/android: Implement the eglSwapinterval for Android] egl/android: Implement the eglSwapinterval for Android.
Hi Zhongmin, On Tue, Jan 16, 2018 at 4:07 PM, Wu, Zhongminwrote: > Sorry, is there any comment about the below patch, Thanks very much! Or did I > miss something ? I assumed this was sent by mistake. The subject doesn't look like a patch for review - it should have [PATCH] prefix. There was even a follow-up email (presumably generated by your mailing client) to cancel sending it. Also please remove internal annotations, such as gerrit Change-Id, since they do not have any meaning for upstream purposes. As for the change itself, it looks fine to me, +/- some style nitpicks, which I listed inline. Have you checked if there are no dEQP regressions (at least for the EGL suite)? Best regards, Tomasz > > -Original Message- > From: Wu, Zhongmin > Sent: Wednesday, January 3, 2018 10:11 > To: mesa-dev@lists.freedesktop.org > Cc: Kondapally, Kalyan ; Palli, Tapani > ; Xu, Randy ; Long, Zhifang > ; Wu, Zhongmin ; Rob Herring > ; Tomasz Figa ; Eric Engestrom > ; Emil Velikov ; Bhardwaj, > MunishX ; Kps, Harish Krupo > ; Chad Versace > Subject: [egl/android: Implement the eglSwapinterval for Android] > egl/android: Implement the eglSwapinterval for Android. > > From: Zhongmin Wu > > Implement the eglSwapinterval for Android platform to enable the async mode > for some GFX benchmarks. > > Change-Id: I3576d8b92862719dae11c31e2adc2d77cb5a0b64 > Signed-off-by: Zhongmin Wu > --- > src/egl/drivers/dri2/platform_android.c | 15 +++ > 1 file changed, 15 insertions(+) > > diff --git a/src/egl/drivers/dri2/platform_android.c > b/src/egl/drivers/dri2/platform_android.c > index f6a24cd..f9c74ee 100644 > --- a/src/egl/drivers/dri2/platform_android.c > +++ b/src/egl/drivers/dri2/platform_android.c > @@ -476,6 +476,18 @@ droid_destroy_surface(_EGLDriver *drv, _EGLDisplay > *disp, _EGLSurface *surf) > return EGL_TRUE; > } > > +static EGLBoolean droid_swap_interval(_EGLDriver *drv, _EGLDisplay *dpy, > +_EGLSurface *surf, EGLint interval) { Please move the function name to new line, align the arguments with the top lines, if there is a need to wrap the lines and move the opening brace to new line, to match the coding style already used in the file. > + No need for this blank line. Best regards, Tomasz ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [egl/android: Implement the eglSwapinterval for Android] egl/android: Implement the eglSwapinterval for Android.
Sorry, is there any comment about the below patch, Thanks very much! Or did I miss something ? -Original Message- From: Wu, Zhongmin Sent: Wednesday, January 3, 2018 10:11 To: mesa-dev@lists.freedesktop.org Cc: Kondapally, Kalyan; Palli, Tapani ; Xu, Randy ; Long, Zhifang ; Wu, Zhongmin ; Rob Herring ; Tomasz Figa ; Eric Engestrom ; Emil Velikov ; Bhardwaj, MunishX ; Kps, Harish Krupo ; Chad Versace Subject: [egl/android: Implement the eglSwapinterval for Android] egl/android: Implement the eglSwapinterval for Android. From: Zhongmin Wu Implement the eglSwapinterval for Android platform to enable the async mode for some GFX benchmarks. Change-Id: I3576d8b92862719dae11c31e2adc2d77cb5a0b64 Signed-off-by: Zhongmin Wu --- src/egl/drivers/dri2/platform_android.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c index f6a24cd..f9c74ee 100644 --- a/src/egl/drivers/dri2/platform_android.c +++ b/src/egl/drivers/dri2/platform_android.c @@ -476,6 +476,18 @@ droid_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf) return EGL_TRUE; } +static EGLBoolean droid_swap_interval(_EGLDriver *drv, _EGLDisplay *dpy, +_EGLSurface *surf, EGLint interval) { + + struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf); + struct ANativeWindow *window = dri2_surf->window; + if (window->setSwapInterval(window, interval)) { + return EGL_FALSE; + } + surf->SwapInterval = interval; + return EGL_TRUE; +} + static int update_buffers(struct dri2_egl_surface *dri2_surf) { @@ -1300,6 +1312,7 @@ static const struct dri2_egl_display_vtbl droid_display_vtbl = { .swap_buffers = droid_swap_buffers, .swap_buffers_with_damage = dri2_fallback_swap_buffers_with_damage, /* Android implements the function */ .swap_buffers_region = dri2_fallback_swap_buffers_region, + .swap_interval = droid_swap_interval, #if ANDROID_API_LEVEL >= 23 .set_damage_region = droid_set_damage_region, #else @@ -1443,6 +1456,8 @@ dri2_initialize_android(_EGLDriver *drv, _EGLDisplay *dpy) dri2_setup_screen(dpy); + dri2_setup_swap_interval(dpy, 1); + if (!droid_add_configs_for_visuals(drv, dpy)) { err = "DRI2: failed to add configs"; goto cleanup; -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev