Re: [PATCH] drm/vmwgfx: Propagate error on failed ioctl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2022-03-13 at 06:06 +0100, Philipp Sieweck wrote:
> The cases of vmw_user_bo_synccpu_grab failing with -ERESTARTSYS or -
> EBUSY
> are handled in vmw_user_bo_synccpu_ioctl by not printing an error
> message.
> However, the error value gets discarded, indicating success. This
> leads
> to rendering glitches and a reported drm error on the next ioctl call
> to
> release the handle.
> 
> This patch propagates the error value from vmw_user_synccpu_grab.
> 
> Signed-off-by: Philipp Sieweck <psi@xxxxxxxxxxxxxxxxxxxxxx>

Hi, Philipp.

Thanks for the patch. Some questions below.

> ---
>  drivers/gpu/drm/vmwgfx/vmwgfx_bo.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
> b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
> index 31aecc46624b..81fe4dc5e6ab 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
> @@ -621,6 +621,8 @@ int vmw_user_bo_synccpu_ioctl(struct drm_device
> *dev, void *data,
>                                   (unsigned int) arg->handle);
>                         return ret;
>                 }
> +               if (unlikely(ret != 0))
> +                       return ret;
>                 break;

I'd just break apart the condition above rather than have two if ret !=
0. What apps do you see glitches in as a result of this? Can you
reproduce it?

z




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux