@@ -1682,6 +1682,11 @@ struct drm_i915_gem_object {
unsigned int has_global_gtt_mapping:1;
unsigned int has_dma_mapping:1;
+ /*
+ * Is the object associated with user created FB
+ */
+ unsigned int user_fb:1;
+
struct sg_table *pages;
int pages_pin_count;
@@ -10385,6 +10385,7 @@ static void intel_user_framebuffer_destroy(struct drm_framebuffer *fb)
{
struct intel_framebuffer *intel_fb = to_intel_framebuffer(fb);
+ intel_fb->obj->user_fb = 0;
intel_framebuffer_fini(intel_fb);
kfree(intel_fb);
}
@@ -10535,6 +10536,7 @@ intel_user_framebuffer_create(struct drm_device *dev,
if (&obj->base == NULL)
return ERR_PTR(-ENOENT);
+ obj->user_fb = 1;
return intel_framebuffer_create(dev, mode_cmd, obj);
}