From patchwork Wed Jul 10 00:54:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniele Ceraolo Spurio X-Patchwork-Id: 11037627 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D8DFF14E5 for ; Wed, 10 Jul 2019 00:54:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C2A21286F1 for ; Wed, 10 Jul 2019 00:54:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B6AD52870D; Wed, 10 Jul 2019 00:54:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3A7C4286F1 for ; Wed, 10 Jul 2019 00:54:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 503EC89836; Wed, 10 Jul 2019 00:54:56 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id C21A989836 for ; Wed, 10 Jul 2019 00:54:54 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jul 2019 17:54:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,472,1557212400"; d="scan'208";a="340915024" Received: from dceraolo-linux.fm.intel.com ([10.1.27.145]) by orsmga005.jf.intel.com with ESMTP; 09 Jul 2019 17:54:53 -0700 From: Daniele Ceraolo Spurio To: intel-gfx@lists.freedesktop.org Date: Tue, 9 Jul 2019 17:54:25 -0700 Message-Id: <20190710005437.3496-1-daniele.ceraolospurio@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 00/12] GT-fy the uc code X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP GuC and HuC are a subunits of the GT HW, so it makes sense for the relevant structures to be inside intel_gt. This series introduces a new intel_uc structure under intel_gt and moves the GuC/HuC structures in there. All the general uc code is then encapsulated, working on intel_uc instead of i915. Note that a bit of ugliness is inroduced with the move because we have a lot of layers (i915->gt.uc.guc.fw). Most of these "deep" accesses are removed by the later patches in the series, but some of them remain, mainly in debugfs functions. Follow up updates to make the code more encapsulated should help cleaning up. Cc: Michal Wajdeczko Cc: Chris Wilson Cc: Tvrtko Ursulin Chris Wilson (1): drm/i915/guc: Remove preemption support for current fw Daniele Ceraolo Spurio (11): drm/i915/guc: simplify guc client drm/i915/uc: replace uc init/fini misc drm/i915/uc: introduce intel_uc_fw_supported drm/i915/guc: move guc irq functions to intel_guc parameter drm/i915/guc: unify guc irq handling drm/i915/uc: move GuC and HuC files under gt/uc/ drm/i915/uc: move GuC/HuC inside intel_gt under a new intel_uc drm/i915/uc: Move intel functions to intel_uc drm/i915/uc: prefer intel_gt over i915 in GuC/HuC paths drm/i915/guc: prefer intel_gt in guc interrupt functions drm/i915/uc: kill uc_to_i915 drivers/gpu/drm/i915/Makefile | 21 +- drivers/gpu/drm/i915/Makefile.header-test | 4 - drivers/gpu/drm/i915/gem/i915_gem_context.c | 17 - drivers/gpu/drm/i915/gem/i915_gem_pm.c | 6 +- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 13 - drivers/gpu/drm/i915/gt/intel_engine_types.h | 1 - drivers/gpu/drm/i915/gt/intel_gt.h | 15 + drivers/gpu/drm/i915/gt/intel_gt_pm.c | 4 - drivers/gpu/drm/i915/gt/intel_gt_types.h | 6 + drivers/gpu/drm/i915/gt/intel_reset.c | 10 +- drivers/gpu/drm/i915/gt/uc/Makefile | 5 + .../gpu/drm/i915/gt/uc/Makefile.header-test | 16 + drivers/gpu/drm/i915/{ => gt/uc}/intel_guc.c | 144 ++----- drivers/gpu/drm/i915/{ => gt/uc}/intel_guc.h | 17 +- .../gpu/drm/i915/{ => gt/uc}/intel_guc_ads.c | 3 +- .../gpu/drm/i915/{ => gt/uc}/intel_guc_ads.h | 0 .../gpu/drm/i915/{ => gt/uc}/intel_guc_ct.c | 0 .../gpu/drm/i915/{ => gt/uc}/intel_guc_ct.h | 0 .../gpu/drm/i915/{ => gt/uc}/intel_guc_fw.c | 89 +++-- .../gpu/drm/i915/{ => gt/uc}/intel_guc_fw.h | 0 .../gpu/drm/i915/{ => gt/uc}/intel_guc_fwif.h | 0 .../gpu/drm/i915/{ => gt/uc}/intel_guc_log.c | 44 ++- .../gpu/drm/i915/{ => gt/uc}/intel_guc_log.h | 0 .../gpu/drm/i915/{ => gt/uc}/intel_guc_reg.h | 32 +- .../i915/{ => gt/uc}/intel_guc_submission.c | 358 ++---------------- .../i915/{ => gt/uc}/intel_guc_submission.h | 2 - drivers/gpu/drm/i915/{ => gt/uc}/intel_huc.c | 32 +- drivers/gpu/drm/i915/{ => gt/uc}/intel_huc.h | 6 - .../gpu/drm/i915/{ => gt/uc}/intel_huc_fw.c | 12 +- .../gpu/drm/i915/{ => gt/uc}/intel_huc_fw.h | 0 drivers/gpu/drm/i915/{ => gt/uc}/intel_uc.c | 237 ++++++------ drivers/gpu/drm/i915/{ => gt/uc}/intel_uc.h | 39 +- .../gpu/drm/i915/{ => gt/uc}/intel_uc_fw.c | 4 +- .../gpu/drm/i915/{ => gt/uc}/intel_uc_fw.h | 30 +- .../intel_guc.c => gt/uc/selftest_guc.c} | 45 +-- drivers/gpu/drm/i915/i915_debugfs.c | 36 +- drivers/gpu/drm/i915/i915_drv.c | 18 +- drivers/gpu/drm/i915/i915_drv.h | 24 +- drivers/gpu/drm/i915/i915_gem.c | 24 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 8 +- drivers/gpu/drm/i915/i915_gem_gtt.h | 4 +- drivers/gpu/drm/i915/i915_gpu_error.c | 11 +- drivers/gpu/drm/i915/i915_gpu_error.h | 2 +- drivers/gpu/drm/i915/i915_irq.c | 127 ++++--- drivers/gpu/drm/i915/i915_irq.h | 13 +- drivers/gpu/drm/i915/i915_reg.h | 10 - drivers/gpu/drm/i915/intel_wopcm.c | 4 +- 47 files changed, 556 insertions(+), 937 deletions(-) create mode 100644 drivers/gpu/drm/i915/gt/uc/Makefile create mode 100644 drivers/gpu/drm/i915/gt/uc/Makefile.header-test rename drivers/gpu/drm/i915/{ => gt/uc}/intel_guc.c (78%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_guc.h (92%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_guc_ads.c (98%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_guc_ads.h (100%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_guc_ct.c (100%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_guc_ct.h (100%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_guc_fw.c (78%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_guc_fw.h (100%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_guc_fwif.h (100%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_guc_log.c (92%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_guc_log.h (100%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_guc_reg.h (88%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_guc_submission.c (74%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_guc_submission.h (98%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_huc.c (86%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_huc.h (92%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_huc_fw.c (95%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_huc_fw.h (100%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_uc.c (72%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_uc.h (60%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_uc_fw.c (99%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_uc_fw.h (81%) rename drivers/gpu/drm/i915/{selftests/intel_guc.c => gt/uc/selftest_guc.c} (86%)