From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 14/15] drm/i915: Track frontbuffer invalidation/flushing Date: Tue, 17 Jun 2014 11:01:58 +0200 Message-ID: <20140617090158.GF5821@phenom.ffwll.local> References: <1402941095-27879-1-git-send-email-daniel.vetter@ffwll.ch> <1402941095-27879-15-git-send-email-daniel.vetter@ffwll.ch> <20140617064148.GA17744@nuc-i3427.alporthouse.com> <20140617073247.GS5821@phenom.ffwll.local> <20140617073648.GM17744@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 4B5B66E642 for ; Tue, 17 Jun 2014 02:02:12 -0700 (PDT) Received: by mail-we0-f177.google.com with SMTP id u56so6597873wes.8 for ; Tue, 17 Jun 2014 02:02:05 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140617073648.GM17744@nuc-i3427.alporthouse.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Chris Wilson , Daniel Vetter , Daniel Vetter , Intel Graphics Development , Rodrigo Vivi List-Id: intel-gfx@lists.freedesktop.org On Tue, Jun 17, 2014 at 08:36:48AM +0100, Chris Wilson wrote: > On Tue, Jun 17, 2014 at 09:32:47AM +0200, Daniel Vetter wrote: > > On Tue, Jun 17, 2014 at 07:41:48AM +0100, Chris Wilson wrote: > > > 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 > > > > #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; > > > > We already have ridiculous amounts of not trylocked state in set_par, so > > doing this won't help really. And fixing up the emergency console logic is > > imo out of scope for this ;-) > > But at least separate the dubious from the rest of the patch. :) Yeah, split out now. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch