From: Daniel Vetter Subject: Re: [PATCH] drm/i915: FBC flush nuke for BDW Date: Mon, 8 Sep 2014 09:29:04 +0200 Message-ID: <20140908072904.GL15520@phenom.ffwll.local> References: <20140804081147.GL8727@phenom.ffwll.local> <1407149498-3289-1-git-send-email-rodrigo.vivi@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by gabe.freedesktop.org (Postfix) with ESMTP id EB3BC6E217 for ; Mon, 8 Sep 2014 00:28:38 -0700 (PDT) Received: by mail-wi0-f171.google.com with SMTP id hi2so2078135wib.16 for ; Mon, 08 Sep 2014 00:28:38 -0700 (PDT) Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Rodrigo Vivi Cc: Intel Graphics Development , Rodrigo Vivi List-Id: intel-gfx@lists.freedesktop.org On Fri, Sep 05, 2014 at 02:12:49PM -0700, Rodrigo Vivi wrote: > As Paulo told the part 2 of his proposal is still missing and we will get > the WARN of reading fbc register at fbc_enabled when on runtime_suspend... > > But I couldn't find the propper place to check for intel_crtc->active. This > was another issue reported by power team that on screen off there was to > much activity on our driver. So we need to check it more carefully the > proper place to avoid all unecessary inactivities with display off. > > Do you have any suggestion Daniel? Don't check for intel->active since doing that will lead to hilarious locking inversions. You have to add a bit of tracking (with it's own locking) for which frontbuffer events are interesting for fbc like psr does. Since we only do fbc on one plane ever that's only ever going to be one bit, but setting/clearing it correctly in crtc_enable/disable is the important part here. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch