Alternative implementation of page table zeroing using zap page_range.
(Disabled for now) Fix bo_wait_idle bug. Remove stray debug message.main
parent
c4fad4c961
commit
ca1b15d645
|
@ -2984,8 +2984,10 @@ int drmBOWaitIdle(int fd, drmBO *buf, unsigned hint)
|
||||||
req->hint = hint;
|
req->hint = hint;
|
||||||
arg.next = 0;
|
arg.next = 0;
|
||||||
|
|
||||||
ret = ioctl(fd, DRM_IOCTL_BUFOBJ, &arg);
|
do {
|
||||||
|
ret = ioctl(fd, DRM_IOCTL_BUFOBJ, &arg);
|
||||||
|
} while (ret && errno == EAGAIN);
|
||||||
|
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
if (!arg.handled)
|
if (!arg.handled)
|
||||||
|
|
|
@ -1115,6 +1115,7 @@ static int drm_bo_handle_wait(drm_file_t * priv, uint32_t handle,
|
||||||
if (!bo) {
|
if (!bo) {
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
mutex_lock(&bo->mutex);
|
mutex_lock(&bo->mutex);
|
||||||
ret = drm_bo_wait_unfenced(bo, no_wait, 0);
|
ret = drm_bo_wait_unfenced(bo, no_wait, 0);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
@ -1124,10 +1125,11 @@ static int drm_bo_handle_wait(drm_file_t * priv, uint32_t handle,
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
drm_bo_fill_rep_arg(bo, rep);
|
drm_bo_fill_rep_arg(bo, rep);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
mutex_unlock(&bo->mutex);
|
mutex_unlock(&bo->mutex);
|
||||||
drm_bo_usage_deref_unlocked(bo->dev, bo);
|
drm_bo_usage_deref_unlocked(bo->dev, bo);
|
||||||
return 0;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -124,6 +124,7 @@ static inline void change_pud_range(struct mm_struct *mm, pgd_t * pgd,
|
||||||
* This function should be called with all relevant spinlocks held.
|
* This function should be called with all relevant spinlocks held.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if 1
|
||||||
void drm_clear_vma(struct vm_area_struct *vma,
|
void drm_clear_vma(struct vm_area_struct *vma,
|
||||||
unsigned long addr, unsigned long end)
|
unsigned long addr, unsigned long end)
|
||||||
{
|
{
|
||||||
|
@ -146,6 +147,19 @@ void drm_clear_vma(struct vm_area_struct *vma,
|
||||||
flush_tlb_range(vma, addr, end);
|
flush_tlb_range(vma, addr, end);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
|
||||||
|
void drm_clear_vma(struct vm_area_struct *vma,
|
||||||
|
unsigned long addr, unsigned long end)
|
||||||
|
{
|
||||||
|
struct mm_struct *mm = vma->vm_mm;
|
||||||
|
|
||||||
|
spin_unlock(&mm->page_table_lock);
|
||||||
|
(void) zap_page_range(vma, addr, end - addr, NULL);
|
||||||
|
spin_lock(&mm->page_table_lock);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
pgprot_t vm_get_page_prot(unsigned long vm_flags)
|
pgprot_t vm_get_page_prot(unsigned long vm_flags)
|
||||||
{
|
{
|
||||||
|
|
|
@ -86,7 +86,6 @@ static void i915_perform_flush(drm_device_t * dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fm->pending_flush && !dev_priv->flush_pending) {
|
if (fm->pending_flush && !dev_priv->flush_pending) {
|
||||||
DRM_ERROR("Sync flush");
|
|
||||||
dev_priv->flush_sequence = (uint32_t) READ_BREADCRUMB(dev_priv);
|
dev_priv->flush_sequence = (uint32_t) READ_BREADCRUMB(dev_priv);
|
||||||
dev_priv->flush_flags = fm->pending_flush;
|
dev_priv->flush_flags = fm->pending_flush;
|
||||||
dev_priv->saved_flush_status = READ_HWSP(dev_priv, 0);
|
dev_priv->saved_flush_status = READ_HWSP(dev_priv, 0);
|
||||||
|
|
Loading…
Reference in New Issue