[PATCH v2 1/4] drm/mga: drop dependency on drm_os_linux.h

Emil Velikov emil.l.velikov at gmail.com
Mon Jul 1 10:59:15 UTC 2019


On Sun, 23 Jun 2019 at 11:36, Sam Ravnborg <sam at ravnborg.org> wrote:

> -int mga_driver_fence_wait(struct drm_device *dev, unsigned int *sequence)
> +void mga_driver_fence_wait(struct drm_device *dev, unsigned int *sequence)
>  {
>         drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private;
>         unsigned int cur_fence;
> -       int ret = 0;
>
>         /* Assume that the user has missed the current sequence number
>          * by about a day rather than she wants to wait for years
>          * using fences.
>          */
> -       DRM_WAIT_ON(ret, dev_priv->fence_queue, 3 * HZ,
> +       wait_event_timeout(dev_priv->fence_queue,
>                     (((cur_fence = atomic_read(&dev_priv->last_fence_retired))
> -                     - *sequence) <= (1 << 23)));
> +                     - *sequence) <= (1 << 23)),
> +                   msecs_to_jiffies(3000));
>
>         *sequence = cur_fence;
> -
> -       return ret;
>  }
>
Most of the patch is a trivial substitution. This piece is not though :-\
For the future, please keep mechanical and functional changes in
separate patches.

Thanks
Emil


More information about the dri-devel mailing list