diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2008-08-16 11:35:10 -0700 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2008-08-16 11:35:10 -0700 |
commit | 893315d49ed678de95cf6ac553efb6093cc7343c (patch) | |
tree | f16c5ddd7a23d6f9faf37424ed023fc59903a384 /linux-core/intel_fb.c | |
parent | 5f9e4a764ac7acf1311388dd693bc4f0e6c0c4e9 (diff) |
i915: set domain properly on fb mapping, flush out changes
The user visible ioctl does this, but since we call into GEM internals
directly, we have to flush things ourselves. Fixes initial fb console
corruption.
Diffstat (limited to 'linux-core/intel_fb.c')
-rw-r--r-- | linux-core/intel_fb.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/linux-core/intel_fb.c b/linux-core/intel_fb.c index ce8ac3d9..c1391c0a 100644 --- a/linux-core/intel_fb.c +++ b/linux-core/intel_fb.c @@ -716,12 +716,18 @@ int intelfb_create(struct drm_device *dev, uint32_t fb_width, uint32_t fb_height obj_priv = fbo->driver_private; mutex_lock(&dev->struct_mutex); + /* Flush everything out, we'll be doing GTT only from now on */ + i915_gem_object_set_domain(fbo, I915_GEM_DOMAIN_GTT, + I915_GEM_DOMAIN_GTT); + ret = i915_gem_object_pin(fbo, PAGE_SIZE); if (ret) { DRM_ERROR("failed to pin fb: %d\n", ret); goto out_unref; } + i915_gem_clflush_object(fbo); + fb = intel_user_framebuffer_create(dev, NULL, &mode_cmd); if (!fb) { DRM_ERROR("failed to allocate fb.\n"); |