mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-20 07:00:11 +01:00
Use DRM_SPINLOCK / DRM_UNSPINLOCK macros.
This commit is contained in:
parent
3383e8bd6b
commit
2bcd5b5e33
3 changed files with 6 additions and 6 deletions
|
|
@ -202,7 +202,7 @@ int xgi_bootstrap(struct drm_device * dev, void * data,
|
|||
int err;
|
||||
|
||||
|
||||
spin_lock_init(&info->fence_lock);
|
||||
DRM_SPINLOCK_INIT(&info->fence_lock);
|
||||
info->next_sequence = 0;
|
||||
info->complete_sequence = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ struct xgi_info {
|
|||
|
||||
struct xgi_cmdring_info cmdring;
|
||||
|
||||
spinlock_t fence_lock;
|
||||
DRM_SPINTYPE fence_lock;
|
||||
unsigned complete_sequence;
|
||||
unsigned next_sequence;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ static uint32_t xgi_do_flush(struct drm_device * dev, uint32_t class)
|
|||
if ((info == NULL) || (class != 0))
|
||||
return 0;
|
||||
|
||||
spin_lock(&info->fence_lock);
|
||||
DRM_SPINLOCK(&info->fence_lock);
|
||||
|
||||
pending_flush_types = fc->pending_flush |
|
||||
((fc->pending_exe_flush) ? DRM_FENCE_TYPE_EXE : 0);
|
||||
|
|
@ -64,7 +64,7 @@ static uint32_t xgi_do_flush(struct drm_device * dev, uint32_t class)
|
|||
}
|
||||
}
|
||||
|
||||
spin_unlock(&info->fence_lock);
|
||||
DRM_SPINUNLOCK(&info->fence_lock);
|
||||
|
||||
return fc->pending_flush |
|
||||
((fc->pending_exe_flush) ? DRM_FENCE_TYPE_EXE : 0);
|
||||
|
|
@ -81,12 +81,12 @@ int xgi_fence_emit_sequence(struct drm_device * dev, uint32_t class,
|
|||
return -EINVAL;
|
||||
|
||||
|
||||
spin_lock(&info->fence_lock);
|
||||
DRM_SPINLOCK(&info->fence_lock);
|
||||
info->next_sequence++;
|
||||
if (info->next_sequence > BEGIN_BEGIN_IDENTIFICATION_MASK) {
|
||||
info->next_sequence = 1;
|
||||
}
|
||||
spin_unlock(&info->fence_lock);
|
||||
DRM_SPINUNLOCK(&info->fence_lock);
|
||||
|
||||
|
||||
*sequence = (uint32_t) info->next_sequence;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue