[PATCH 6/7] drm/i915: fbdev_set_par reliably invalidating frontbuffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



fbdev_set_par is called when fbcon is taking over control, but
frontbuffer was being invalidated only on the first time when
moving obj to GTT domain.
However on the following calls write domain was already GTT
so invalidate was never called again.

The issue was mainly on boot with plymouth doing a splash screen
when returning to the console frontbuffer wans't being invalidated
causing missed screen updates with PSR enabled.

Cc: Daniel Vetter <daniel.vetter@xxxxxxxx>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>
---
 drivers/gpu/drm/i915/intel_fbdev.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c
index 2a1724e..a76cebc 100644
--- a/drivers/gpu/drm/i915/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/intel_fbdev.c
@@ -50,6 +50,7 @@ static int intel_fbdev_set_par(struct fb_info *info)
 	struct drm_fb_helper *fb_helper = info->par;
 	struct intel_fbdev *ifbdev =
 		container_of(fb_helper, struct intel_fbdev, helper);
+	struct drm_i915_gem_object *obj = ifbdev->fb->obj;
 	int ret;
 
 	ret = drm_fb_helper_set_par(info);
@@ -63,8 +64,13 @@ static int intel_fbdev_set_par(struct fb_info *info)
 		 * now until we solve this for real.
 		 */
 		mutex_lock(&fb_helper->dev->struct_mutex);
-		ret = i915_gem_object_set_to_gtt_domain(ifbdev->fb->obj,
-							true);
+		if (obj) {
+			if (obj->base.write_domain != I915_GEM_DOMAIN_GTT)
+				ret = i915_gem_object_set_to_gtt_domain(obj,
+									true);
+			else
+				intel_fb_obj_invalidate(obj, ORIGIN_GTT);
+		}
 		mutex_unlock(&fb_helper->dev->struct_mutex);
 	}
 
-- 
2.1.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux