On 10/18/23 21:17, Gurchetan Singh wrote:
> + case VIRTGPU_CONTEXT_PARAM_DEBUG_NAME:
> + if (vfpriv->explicit_debug_name) {
> + ret = -EINVAL;
> + goto out_unlock;
> + }
> +
> + ret = strncpy_from_user(vfpriv->debug_name,
> + u64_to_user_ptr(value),
> + DEBUG_NAME_MAX_LEN - 1);
> +
> + if (ret < 0) {
> + ret = -EFAULT;
> + goto out_unlock;
> + }
> +
> + vfpriv->explicit_debug_name = true;
> + break;
Spotted a problem here. The ret needs to be set to zero on success. I'll
send the fix shortly. Gurchetan you should've been getting the
DRM_IOCTL_VIRTGPU_CONTEXT_INIT failure from gfxstream when you tested
this patch, haven't you?
Also noticed that the patch title says "drm/uapi" instead of
"drm/virtio". My bad for not noticing it earlier. Please be more careful
next time too :)
--
Best regards,
Dmitry