Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp846148rwi; Wed, 19 Oct 2022 03:49:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM75+pMidiNNe+Y3CRQdTbI5bSPwATKzJgIXBF9G/Ryk5fA5AaGZ8y2RsATf/u5VHZTP6X1+ X-Received: by 2002:a05:6402:1e88:b0:45d:88f:4b99 with SMTP id f8-20020a0564021e8800b0045d088f4b99mr6934770edf.236.1666176557008; Wed, 19 Oct 2022 03:49:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666176557; cv=none; d=google.com; s=arc-20160816; b=b6vzRm1lB+51uNG9XScfLa39piEwWfQAAdzF7cxmQPkXPUBhwH1E3w+jmQDPA8aZwj DxKYPD5soP+4ep7iNc+p0HmT9QCmZGN9L5KzRazrZvL2oSLQkilPheS+7iG2U+SwFo2I csWk5ZrSA0lKK6dAFMWX6b3TnfPL6UI9hRbbYrz7m/bMcQs9nmWRL5qKzvc3FDz9LfP3 q85GmtXD0bkZ2jOl4aE2/8PJtmSWwncGqIsGyKbHlxIzKuHDKhNfYCrZtxijTWJ5zp7k onmmSBCJ37ygb2z9er2T5dXw59hbckcTO4/UefH+f5rd1bdgx9OsEyV1UGpsAygZtfOl ptGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+FF6tR55L9skBGVg/rJD2lSKl2v9tnGDn1Luhfp2Hmo=; b=BDC4Xtf1B3bZL2W+hwj3SyvSHLB9y/6bhnoeD2ZmbySgFhZL8AArwNhh7nR42rXMsR e7Zbu+to39HK+LxylRsVKRIG83lwxo3SZnz+N194nHMnbyQ6ZZJrmqhPpsy0hsadXTMk P74rf1URY2X1MqHWsF2e0BGTJmDBZW4+aVdR1uJMFQSxKAN8wBZuSRX9sl1yv0CbnDLk hLNcHetk+V0NLhgGPYTu3Y8mG8hxoBL59hbonr1LlR2LX70Jl4CtubOxpdulBJlyxn44 pbGalYytwYZ0OodMHoFmmetMzQ6JbszeJCIzmg50zPaSmpmwbZf8kOuKhiqTubDuTWBj AKWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YAobm5eE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dd17-20020a1709069b9100b0077cfec3a52fsi15241121ejc.839.2022.10.19.03.48.48; Wed, 19 Oct 2022 03:49:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YAobm5eE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233627AbiJSKrb (ORCPT + 99 others); Wed, 19 Oct 2022 06:47:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232715AbiJSKpU (ORCPT ); Wed, 19 Oct 2022 06:45:20 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CE6D118766; Wed, 19 Oct 2022 03:21:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B44B5B82315; Wed, 19 Oct 2022 08:46:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ED665C433B5; Wed, 19 Oct 2022 08:46:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169195; bh=EvVp/KIs4ddef+5+zGPr/+WMP5WJiBafZuZGyLqw2bM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YAobm5eErV2G13MdTFgTS5Onx0F+4QXR32AEkBxgi2mri6UaeCgmphT0z+tTGajLg uNmi2YTDbC8CmNqZxO0MADpNPia1fxBbTw4JL/zwUnYDToqfgmkC3GH0NckIsoyZ4N r0HuDpoXEj+HUb2miN6C5ot+M42FeMG+zkYxSr5U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= , Matthew Auld , intel-gfx@lists.freedesktop.org, David de Sousa , Andrzej Hajda , Tvrtko Ursulin , Kevin Boulain Subject: [PATCH 6.0 189/862] drm/i915: Fix display problems after resume Date: Wed, 19 Oct 2022 10:24:36 +0200 Message-Id: <20221019083258.329800967@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thomas Hellström commit 6c482c62a635aa4f534d2439fbf8afa37452b986 upstream. Commit 39a2bd34c933 ("drm/i915: Use the vma resource as argument for gtt binding / unbinding") introduced a regression that due to the vma resource tracking of the binding state, dpt ptes were not correctly repopulated. Fix this by clearing the vma resource state before repopulating. The state will subsequently be restored by the bind_vma operation. Fixes: 39a2bd34c933 ("drm/i915: Use the vma resource as argument for gtt binding / unbinding") Signed-off-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20220912121957.31310-1-thomas.hellstrom@linux.intel.com Cc: Matthew Auld Cc: intel-gfx@lists.freedesktop.org Cc: # v5.18+ Reported-and-tested-by: Kevin Boulain Tested-by: David de Sousa Reviewed-by: Matthew Auld Reviewed-by: Andrzej Hajda Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20221005121159.340245-1-thomas.hellstrom@linux.intel.com (cherry picked from commit bc2472538c0d1cce334ffc9e97df0614cd2b1469) Signed-off-by: Tvrtko Ursulin Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/gt/intel_ggtt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/i915/gt/intel_ggtt.c +++ b/drivers/gpu/drm/i915/gt/intel_ggtt.c @@ -1267,10 +1267,16 @@ bool i915_ggtt_resume_vm(struct i915_add atomic_read(&vma->flags) & I915_VMA_BIND_MASK; GEM_BUG_ON(!was_bound); - if (!retained_ptes) + if (!retained_ptes) { + /* + * Clear the bound flags of the vma resource to allow + * ptes to be repopulated. + */ + vma->resource->bound_flags = 0; vma->ops->bind_vma(vm, NULL, vma->resource, obj ? obj->cache_level : 0, was_bound); + } if (obj) { /* only used during resume => exclusive access */ write_domain_objs |= fetch_and_zero(&obj->write_domain); obj->read_domains |= I915_GEM_DOMAIN_GTT;