From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC96BC3A5A9 for ; Mon, 4 May 2020 13:49:33 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C00C92078E for ; Mon, 4 May 2020 13:49:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C00C92078E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 558E76E3FE; Mon, 4 May 2020 13:49:33 +0000 (UTC) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id B03F56E402 for ; Mon, 4 May 2020 13:49:31 +0000 (UTC) IronPort-SDR: IZanvEuJXZtW37zFCzdMzVMLClTqLR6BEzLwa73LRHO/COI7Dcjg8SjQFY2/8sOM7o0VO6POaL +A51iZLKi6Uw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 May 2020 06:49:31 -0700 IronPort-SDR: Q85ECNrh14Phu2+mAaBQjC7hvbohFyyhogZ9n4Ll5myrXr7SmTU/AniFrTHVXErbSZsskLhXTo tJ9YFWh1DuBA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,352,1583222400"; d="scan'208";a="277531262" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by orsmga002.jf.intel.com with SMTP; 04 May 2020 06:49:29 -0700 Received: by stinkbox (sSMTP sendmail emulation); Mon, 04 May 2020 16:49:28 +0300 Date: Mon, 4 May 2020 16:49:28 +0300 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Chris Wilson Message-ID: <20200504134928.GA6112@intel.com> References: <20200503180034.20010-1-chris@chris-wilson.co.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200503180034.20010-1-chris@chris-wilson.co.uk> X-Patchwork-Hint: comment User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [Intel-gfx] [PATCH] drm/i915/display: Warn if the FBC is still writing to stolen on removal X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-gfx@lists.freedesktop.org Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Sun, May 03, 2020 at 07:00:34PM +0100, Chris Wilson wrote: > If the FBC is still writing into stolen, it will overwrite any future > users of that stolen region. Check before release. > = > References: https://gitlab.freedesktop.org/drm/intel/-/issues/1635 > Signed-off-by: Chris Wilson > --- > drivers/gpu/drm/i915/display/intel_fbc.c | 3 +++ > 1 file changed, 3 insertions(+) > = > diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i= 915/display/intel_fbc.c > index c6afa10e814c..37244ed92ae4 100644 > --- a/drivers/gpu/drm/i915/display/intel_fbc.c > +++ b/drivers/gpu/drm/i915/display/intel_fbc.c > @@ -540,6 +540,9 @@ static void __intel_fbc_cleanup_cfb(struct drm_i915_p= rivate *dev_priv) > { > struct intel_fbc *fbc =3D &dev_priv->fbc; > = > + if (WARN_ON(intel_fbc_hw_is_active(dev_priv))) > + return; > + Can't immediately see how that would hapoen, but no harm in checking. Reviewed-by: Ville Syrj=E4l=E4 > if (!drm_mm_node_allocated(&fbc->compressed_fb)) > return; > = > -- = > 2.20.1 > = > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx -- = Ville Syrj=E4l=E4 Intel _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx