[Beignet] [PATCH] Driver: fix the annoying "Failed to release userptr..." error message

Yang, Rong R rong.r.yang at intel.com
Tue Sep 22 20:28:50 PDT 2015


LGTM, pushed, thanks.

> -----Original Message-----
> From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of
> Pan Xiuli
> Sent: Wednesday, September 23, 2015 10:35
> To: beignet at lists.freedesktop.org
> Cc: Pan, Xiuli
> Subject: [Beignet] [PATCH] Driver: fix the annoying "Failed to release
> userptr..." error message
> 
> It is a drm related bug. As the drm driver changed the time to free their test
> userptr to bufmgr destroy(30921483c70c6939f017476eac13da6aa26b3b3c),
> we need anothr order to release our driver to make sure the test userptr can
> be freed with a valid fd.
> 
> Signed-off-by: Pan Xiuli <xiuli.pan at intel.com>
> ---
>  src/intel/intel_driver.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/src/intel/intel_driver.c b/src/intel/intel_driver.c index
> 507c910..035a103 100644
> --- a/src/intel/intel_driver.c
> +++ b/src/intel/intel_driver.c
> @@ -85,8 +85,6 @@ intel_driver_delete(intel_driver_t *driver)
>    if (driver == NULL)
>      return;
> 
> -  if (driver->bufmgr)
> -    drm_intel_bufmgr_destroy(driver->bufmgr);
>    cl_free(driver);
>  }
> 
> @@ -257,6 +255,10 @@ intel_driver_open(intel_driver_t *intel,
> cl_context_prop props)  static void  intel_driver_close(intel_driver_t *intel)  {
> +  //Due to the drm change about the test usrptr, we need to destroy the
> + bufmgr  //befor the driver was closed, otherwise the test usrptr will not be
> freed.
> +  if (intel->bufmgr)
> +    drm_intel_bufmgr_destroy(intel->bufmgr);
>  #ifdef HAS_X11
>    if(intel->dri_ctx) dri_state_release(intel->dri_ctx);
>    if(intel->x11_display) XCloseDisplay(intel->x11_display);
> --
> 2.1.4
> 
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list