Merge branch 'drm-fixes-3.18' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
A few more small fixes for 3.18. * 'drm-fixes-3.18' of git://people.freedesktop.org/~agd5f/linux: drm/radeon: kernel panic in drm_calc_vbltimestamp_from_scanoutpos with 3.18.0-rc6 drm/radeon: Ignore RADEON_GEM_GTT_WC on 32-bit x86 drm/radeon: sync all BOs involved in a CS v2
This commit is contained in:
commit
00d6a9b6be
@ -251,22 +251,19 @@ static int radeon_cs_get_ring(struct radeon_cs_parser *p, u32 ring, s32 priority
|
|||||||
|
|
||||||
static int radeon_cs_sync_rings(struct radeon_cs_parser *p)
|
static int radeon_cs_sync_rings(struct radeon_cs_parser *p)
|
||||||
{
|
{
|
||||||
int i, r = 0;
|
struct radeon_cs_reloc *reloc;
|
||||||
|
int r;
|
||||||
|
|
||||||
for (i = 0; i < p->nrelocs; i++) {
|
list_for_each_entry(reloc, &p->validated, tv.head) {
|
||||||
struct reservation_object *resv;
|
struct reservation_object *resv;
|
||||||
|
|
||||||
if (!p->relocs[i].robj)
|
resv = reloc->robj->tbo.resv;
|
||||||
continue;
|
|
||||||
|
|
||||||
resv = p->relocs[i].robj->tbo.resv;
|
|
||||||
r = radeon_semaphore_sync_resv(p->rdev, p->ib.semaphore, resv,
|
r = radeon_semaphore_sync_resv(p->rdev, p->ib.semaphore, resv,
|
||||||
p->relocs[i].tv.shared);
|
reloc->tv.shared);
|
||||||
|
|
||||||
if (r)
|
if (r)
|
||||||
break;
|
|
||||||
}
|
|
||||||
return r;
|
return r;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX: note that this is called from the legacy UMS CS ioctl as well */
|
/* XXX: note that this is called from the legacy UMS CS ioctl as well */
|
||||||
|
@ -795,6 +795,8 @@ int radeon_get_vblank_timestamp_kms(struct drm_device *dev, int crtc,
|
|||||||
|
|
||||||
/* Get associated drm_crtc: */
|
/* Get associated drm_crtc: */
|
||||||
drmcrtc = &rdev->mode_info.crtcs[crtc]->base;
|
drmcrtc = &rdev->mode_info.crtcs[crtc]->base;
|
||||||
|
if (!drmcrtc)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
/* Helper routine in DRM core does all the work: */
|
/* Helper routine in DRM core does all the work: */
|
||||||
return drm_calc_vbltimestamp_from_scanoutpos(dev, crtc, max_error,
|
return drm_calc_vbltimestamp_from_scanoutpos(dev, crtc, max_error,
|
||||||
|
@ -213,6 +213,13 @@ int radeon_bo_create(struct radeon_device *rdev,
|
|||||||
if (!(rdev->flags & RADEON_IS_PCIE))
|
if (!(rdev->flags & RADEON_IS_PCIE))
|
||||||
bo->flags &= ~(RADEON_GEM_GTT_WC | RADEON_GEM_GTT_UC);
|
bo->flags &= ~(RADEON_GEM_GTT_WC | RADEON_GEM_GTT_UC);
|
||||||
|
|
||||||
|
#ifdef CONFIG_X86_32
|
||||||
|
/* XXX: Write-combined CPU mappings of GTT seem broken on 32-bit
|
||||||
|
* See https://bugs.freedesktop.org/show_bug.cgi?id=84627
|
||||||
|
*/
|
||||||
|
bo->flags &= ~RADEON_GEM_GTT_WC;
|
||||||
|
#endif
|
||||||
|
|
||||||
radeon_ttm_placement_from_domain(bo, domain);
|
radeon_ttm_placement_from_domain(bo, domain);
|
||||||
/* Kernel allocation are uninterruptible */
|
/* Kernel allocation are uninterruptible */
|
||||||
down_read(&rdev->pm.mclk_lock);
|
down_read(&rdev->pm.mclk_lock);
|
||||||
|
Loading…
Reference in New Issue
Block a user