#include <linux/swap.h>
static int
-i915_gem_object_set_domain(struct drm_gem_object *obj,
- uint32_t read_domains,
- uint32_t write_domain);
-static int
i915_gem_object_set_domain_range(struct drm_gem_object *obj,
uint64_t offset,
uint64_t size,
* MI_FLUSH
* drm_agp_chipset_flush
*/
-static int
+int
i915_gem_object_set_domain(struct drm_gem_object *obj,
uint32_t read_domains,
uint32_t write_domain)
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");
void i915_gem_cleanup_ringbuffer(struct drm_device *dev);
int i915_gem_do_init(struct drm_device *dev, unsigned long start,
unsigned long end);
+int i915_gem_object_set_domain(struct drm_gem_object *obj,
+ uint32_t read_domains,
+ uint32_t write_domain);
void i915_gem_retire_work_handler(struct work_struct *work);
void i915_gem_clflush_object(struct drm_gem_object *obj);
#endif