Re: [PATCH 14/15] drm/i915: Track frontbuffer invalidation/flushing

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

 



On Mon, Jun 16, 2014 at 07:51:34PM +0200, Daniel Vetter wrote:
> diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c
> index 27975c3e21c5..12276c39d14d 100644
> --- a/drivers/gpu/drm/i915/intel_fbdev.c
> +++ b/drivers/gpu/drm/i915/intel_fbdev.c
> @@ -43,10 +43,26 @@
>  #include <drm/i915_drm.h>
>  #include "i915_drv.h"
>  
> +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);
> +	int ret;
> +
> +	ret = drm_fb_helper_set_par(info);
> +
> +	if (ret == 0)
> +		ret = i915_gem_object_set_to_gtt_domain(ifbdev->fb->obj,
> +							true);
> +
> +	return ret;
> +}

Ah, I had missed you added this. Yes, this is what I had in mind for
fixing fbcon. However, this is worth splitting out into a separate path
as this is about to get hairy!

ret = drm_fb_helper_set_par(info)
if (ret) return ret;

 /* Invalidate the fb for all further writes whilst on the console */
 if (!in_atomic() && mutex_trylock(&dev->struct_mutex)) {
   ret = i915_gem_object_set_tp_gtt_domain(obj, true);
   mutex_unlock(&dev->srtuct_mutex);
  }
 return ret;
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
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