From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: add intel_display_power_enabled_sw() for use in atomic ctx Date: Thu, 28 Nov 2013 15:05:28 +0100 Message-ID: <20131128140528.GL27344@phenom.ffwll.local> References: <1385575744-7743-1-git-send-email-imre.deak@intel.com> <1385582522-11626-1-git-send-email-imre.deak@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 49982FAD38 for ; Thu, 28 Nov 2013 06:04:47 -0800 (PST) Received: by mail-wi0-f171.google.com with SMTP id ca18so884643wib.4 for ; Thu, 28 Nov 2013 06:04:46 -0800 (PST) Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Paulo Zanoni Cc: Intel Graphics Development List-Id: intel-gfx@lists.freedesktop.org On Thu, Nov 28, 2013 at 11:50:33AM -0200, Paulo Zanoni wrote: > 2013/11/27 Imre Deak : > > Atm we call intel_display_power_enabled() from > > i915_capture_error_state() in IRQ context and then take a mutex. To fix > > this add a new intel_display_power_enabled_sw() which returns the domain > > state based on software tracking as opposed to reading the actual HW > > state. > > > > Since we use domain_use_count for this without locking on the reader > > side make sure we increase the counter only after enabling all required > > power wells and decrease it before disabling any of these power wells. > > > > Regression introduced in > > commit 1b02383464b4a915627ef3b8fd0ad7f07168c54c > > Author: Imre Deak > > Date: Tue Sep 24 16:17:09 2013 +0300 > > > > drm/i915: support for multiple power wells > > > > Note that atm we depend on the value returned by > > intel_display_power_enabled_sw() in i915_capture_error_state() to avoid > > unclaimed register access reports. This was never guaranteed though, > > since another thread can disable the power concurrently. If this is a > > problem we need another explicit way to disable the reporting during > > error captures. > > > > v2: > > - remove barriers as the caller can't depend on the value > > returned from i915_capture_error_state_sw() anyway (Ville) > > - dump the state of pipe/transcoder power domain state (Daniel) > > > > Reported-by: Chris Wilson > > Signed-off-by: Imre Deak > > > Makes sense to me. Reviewed-by: Paulo Zanoni Queued for -next, thanks for the patch. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch