From patchwork Thu Feb 17 14:04:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 12750210 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 EBB42C433F5 for ; Thu, 17 Feb 2022 14:05:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 414A810EB69; Thu, 17 Feb 2022 14:05:00 +0000 (UTC) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id EA6F910EB69; Thu, 17 Feb 2022 14:04:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645106698; x=1676642698; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=W9cusu0H41I9fgzaSsAcBFWP8L7H5DGUPWYmNsEav2c=; b=Hf/jhx6lb5mZm5a3Bbs/Rx35MYxRIjJD1jc/5Q3oC9nKNEXShN73ahCJ Ir5T8ucfXi24d8MvIDOlR3eE9mMQMH+3O6E9T8L2odGs8N7bbOXSSJSSZ BdvmN1/f23F4cqWjtKjQo0TuZef/NwejdvvzF2B0lDO1pyKwZ/tjRRSo6 miPsses0SPkS8FEgeBe9quiJxppGlUj/EQ7F6nm3CwIZUilz8g8dM7kU5 AmUQhzlHIs2TZWVWBs+3du1PYt9/Z50dhYmxGmdehz6p2BSlX37dasAWd DtrPDrNGoEZdobF2towSlVWDGqU7NR/ciGlFz+sxTcICWCf7vg6esmtvw Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10260"; a="230840794" X-IronPort-AV: E=Sophos;i="5.88,376,1635231600"; d="scan'208";a="230840794" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Feb 2022 06:04:56 -0800 X-IronPort-AV: E=Sophos;i="5.88,376,1635231600"; d="scan'208";a="530241067" Received: from lab-ah.igk.intel.com ([10.91.215.196]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Feb 2022 06:04:54 -0800 From: Andrzej Hajda To: linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, netdev Date: Thu, 17 Feb 2022 15:04:32 +0100 Message-Id: <20220217140441.1218045-1-andrzej.hajda@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Organization: Intel Technology Poland sp. z o.o. - ul. Slowackiego 173, 80-298 Gdansk - KRS 101882 - NIP 957-07-52-316 Subject: [Intel-gfx] [PATCH 0/9] drm/i915: use ref_tracker library for tracking wakerefs 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: Lucas De Marchi , Andrzej Hajda Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Hi, Appearance of ref_tracker library allows to drop custom solution for wakeref tracking used in i915 and reuse the library. For this few adjustements has been made to ref_tracker, details in patches. I hope changes are OK for original author. The patchset has been rebased on top of drm-tip to allow test changes by CI. Added CC to netdev as the only user of the library atm. Regards Andrzej Andrzej Hajda (7): lib/ref_tracker: add unlocked leak print helper lib/ref_tracker: compact stacktraces before printing lib/ref_tracker: __ref_tracker_dir_print improve printing lib/ref_tracker: add printing to memory buffer lib/ref_tracker: improve allocation flags drm/i915: Correct type of wakeref variable drm/i915: replace Intel internal tracker with kernel core ref_tracker Chris Wilson (2): drm/i915: Separate wakeref tracking drm/i915: Track leaked gt->wakerefs drivers/gpu/drm/i915/Kconfig.debug | 19 ++ drivers/gpu/drm/i915/Makefile | 1 + .../drm/i915/display/intel_display_power.c | 2 +- .../gpu/drm/i915/gem/i915_gem_execbuffer.c | 7 +- .../i915/gem/selftests/i915_gem_coherency.c | 10 +- .../drm/i915/gem/selftests/i915_gem_mman.c | 14 +- drivers/gpu/drm/i915/gt/intel_breadcrumbs.c | 13 +- .../gpu/drm/i915/gt/intel_breadcrumbs_types.h | 3 +- drivers/gpu/drm/i915/gt/intel_engine_pm.c | 6 +- drivers/gpu/drm/i915/gt/intel_engine_types.h | 2 + .../drm/i915/gt/intel_execlists_submission.c | 2 +- drivers/gpu/drm/i915/gt/intel_gt_pm.c | 12 +- drivers/gpu/drm/i915/gt/intel_gt_pm.h | 36 ++- drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c | 4 +- drivers/gpu/drm/i915/gt/selftest_engine_cs.c | 20 +- drivers/gpu/drm/i915/gt/selftest_gt_pm.c | 5 +- drivers/gpu/drm/i915/gt/selftest_reset.c | 10 +- drivers/gpu/drm/i915/gt/selftest_rps.c | 17 +- drivers/gpu/drm/i915/gt/selftest_slpc.c | 10 +- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 11 +- drivers/gpu/drm/i915/i915_pmu.c | 16 +- drivers/gpu/drm/i915/intel_runtime_pm.c | 239 ++---------------- drivers/gpu/drm/i915/intel_runtime_pm.h | 10 +- drivers/gpu/drm/i915/intel_wakeref.c | 10 +- drivers/gpu/drm/i915/intel_wakeref.h | 112 +++++++- include/linux/ref_tracker.h | 31 ++- lib/ref_tracker.c | 150 ++++++++--- 27 files changed, 429 insertions(+), 343 deletions(-)