if (!nvbo->drm.size) {
nouveau_bo_realloc_gpu(nvbo, flags, nvbo->base.size);
nouveau_bo_upload(nvbo);
+ if (!nvbo->user) {
+ free(nvbo->sysmem);
+ nvbo->sysmem = NULL;
+ }
} else
if (nvbo->user) {
nouveau_bo_upload(nvbo);
- } else
- if (nvbo->base.map) {
- nouveau_bo_upload(nvbo);
- nvbo->sync_hack = 1;
- }
-
- if (!nvbo->user && !nvbo->base.map) {
- free(nvbo->sysmem);
- nvbo->sysmem = NULL;
}
-
+
if (nvbo->fence)
nouveau_fence_del(&nvbo->fence);
nouveau_fence_ref(fence, &nvbo->fence);
struct nouveau_pushbuf_priv *nvpb = nouveau_pushbuf(nvchan->pb_tail);
struct nouveau_pushbuf_bo *pbbo;
struct nouveau_fence *fence = NULL;
- int sync_hack = 0;
int ret;
if (!nvpb)
ret = nouveau_bo_validate(chan, bo, fence, pbbo->flags);
assert (ret == 0);
- sync_hack |= nouveau_bo(bo)->sync_hack;
- nouveau_bo(bo)->sync_hack = 0;
-
while ((r = ptr_to_pbrel(pbbo->relocs))) {
uint32_t push;
/* Kickoff */
FIRE_RING_CH(chan);
- if (sync_hack) {
- struct nouveau_fence *f = NULL;
- nouveau_fence_ref(nvpb->fence, &f);
- nouveau_fence_wait(&f);
- }
-
/* Allocate space for next push buffer */
out_realloc:
nvpb = calloc(1, sizeof(struct nouveau_pushbuf_priv));