From patchwork Thu Feb 24 10:52:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejas Upadhyay X-Patchwork-Id: 12758364 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 899F0C433F5 for ; Thu, 24 Feb 2022 11:06:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C8C1410FA4F; Thu, 24 Feb 2022 11:06:20 +0000 (UTC) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2DF1010FA4E for ; Thu, 24 Feb 2022 11:06:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645700780; x=1677236780; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=0/rUV6l4WB220jxCP+sxm76j802zWdUHEIQkkYoiOcc=; b=c4BfXVR728MuKdZGcBqKGzu9Rfbn4q14mJcR6zf6RAGz7+3xAoMI72yn 0OTRFHyBUaZnkBwIq8TVCHKzC3iZa9sn5of+e5zZRMgZDimSzTnNR0nQR pefxZtJbXkVfBJ6qtMz2nFzPUNH+c1d07Lr/pfzsRqYh62cWBHUs7348z ttYnTXRmW5vEU3riMRRipq2FKMj44VybTfnEkpDs9pFkggv3wEL0Nid8k tuiQCiGsjkXFcRRuiNsBRYUhahHi/EOTYOyYEh0XoUimAYT0G1cW4DOhv iREtSZs3ybAa3JylUKs8q3jcZs03aX/Nn0U+FnBfbA70dYAKIIa4xr9l3 w==; X-IronPort-AV: E=McAfee;i="6200,9189,10267"; a="252401621" X-IronPort-AV: E=Sophos;i="5.88,393,1635231600"; d="scan'208";a="252401621" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Feb 2022 03:06:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,393,1635231600"; d="scan'208";a="592051688" Received: from tejas-system-product-name.iind.intel.com ([10.145.162.130]) by fmsmga008.fm.intel.com with ESMTP; 24 Feb 2022 03:06:18 -0800 From: Tejas Upadhyay To: intel-gfx@lists.freedesktop.org Date: Thu, 24 Feb 2022 16:22:43 +0530 Message-Id: <20220224105246.145917-1-tejaskumarx.surendrakumar.upadhyay@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH V3 0/3] Replace VT-d workaround with guard pages 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: Tejas Upadhyay Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Replace filling the GGTT entirely with scratch pages to avoid invalid accesses from VT-d overfetch of scanout by only surrounding scanout vma with guard pages. This eliminates the 100+ms delay in resume where we have to repopulate the GGTT with scratch. This should also help in avoiding slow suspend/resume on GEN11/12 platforms. Which will also resolve issues with following reported errors : "slow framebuffer consoles issue impacts Linux S3" V3: Rebased on drm-tip V2: solved checkpatch warning Chris Wilson (3): drm/i915: Wrap all access to i915_vma.node.start|size drm/i915: Introduce guard pages to i915_vma drm/i915: Refine VT-d scanout workaround drivers/gpu/drm/i915/display/intel_dpt.c | 7 ++- drivers/gpu/drm/i915/display/intel_fbdev.c | 6 +- drivers/gpu/drm/i915/gem/i915_gem_domain.c | 13 +++++ .../gpu/drm/i915/gem/i915_gem_execbuffer.c | 33 ++++++----- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 2 +- drivers/gpu/drm/i915/gem/i915_gem_shrinker.c | 2 +- drivers/gpu/drm/i915/gem/i915_gem_tiling.c | 4 +- .../gpu/drm/i915/gem/selftests/huge_pages.c | 2 +- .../i915/gem/selftests/i915_gem_client_blt.c | 15 ++--- .../drm/i915/gem/selftests/i915_gem_context.c | 15 +++-- .../drm/i915/gem/selftests/i915_gem_mman.c | 2 +- .../drm/i915/gem/selftests/igt_gem_utils.c | 7 ++- drivers/gpu/drm/i915/gt/gen6_ppgtt.c | 4 +- drivers/gpu/drm/i915/gt/gen7_renderclear.c | 2 +- drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 12 ++-- drivers/gpu/drm/i915/gt/intel_ggtt.c | 48 +++++++--------- drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c | 3 +- drivers/gpu/drm/i915/gt/intel_ppgtt.c | 12 +++- drivers/gpu/drm/i915/gt/intel_renderstate.c | 2 +- .../gpu/drm/i915/gt/intel_ring_submission.c | 2 +- drivers/gpu/drm/i915/gt/selftest_engine_cs.c | 8 +-- drivers/gpu/drm/i915/gt/selftest_execlists.c | 18 +++--- drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 15 ++--- drivers/gpu/drm/i915/gt/selftest_lrc.c | 16 +++--- .../drm/i915/gt/selftest_ring_submission.c | 2 +- drivers/gpu/drm/i915/gt/selftest_rps.c | 12 ++-- .../gpu/drm/i915/gt/selftest_workarounds.c | 8 +-- drivers/gpu/drm/i915/i915_cmd_parser.c | 4 +- drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_gem_gtt.h | 1 + drivers/gpu/drm/i915/i915_perf.c | 2 +- drivers/gpu/drm/i915/i915_vma.c | 55 ++++++++++++++----- drivers/gpu/drm/i915/i915_vma.h | 25 ++++++++- drivers/gpu/drm/i915/i915_vma_types.h | 3 +- drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 12 +++- drivers/gpu/drm/i915/selftests/i915_request.c | 20 +++---- drivers/gpu/drm/i915/selftests/igt_spinner.c | 8 +-- 37 files changed, 245 insertions(+), 159 deletions(-)