From patchwork Sun Feb 27 08:18:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jordan Justen X-Patchwork-Id: 12761553 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 B9D47C433F5 for ; Sun, 27 Feb 2022 08:18:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2E56D10E373; Sun, 27 Feb 2022 08:18:35 +0000 (UTC) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 58BC310E35E; Sun, 27 Feb 2022 08:18:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645949913; x=1677485913; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=zM+ZgmJi62CXkIYmLDv9QmQgGW2X57F9tFxY+XKy5Ug=; b=gd6xPf8LmHtTkUm+RPGEVtGgyT56D0Fal4zqhU9ryqZNVG1YlhtzvaOl vReeUBY/DLookIwqvPwNLK0GUp8WmUswIubPlrv8wHNbYTDXX85MQq0IU nDlHDGX00GHGIteHWozoO/fqDRR+iKLZRQdikCn8wEqZtSURaPz316CyF 1vQxueq6TdQtsFFJBXowE/lTDStfa/qWyfIGmvp5RBoyamu6bKrvNYVZK XXHY0RHvJxSa/BMvBrRvs7pi729ypdAx0W35v+QYKMP2aKPqMSiu26PZN iVSrtPiFSYA9jWl/ijOz2Q0etetoWc+uoBY4IN9+QL9vGbM4TQPFPTrsF g==; X-IronPort-AV: E=McAfee;i="6200,9189,10270"; a="252444625" X-IronPort-AV: E=Sophos;i="5.90,140,1643702400"; d="scan'208";a="252444625" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Feb 2022 00:18:32 -0800 X-IronPort-AV: E=Sophos;i="5.90,140,1643702400"; d="scan'208";a="534073253" Received: from jingyiji-mobl.amr.corp.intel.com (HELO localhost) ([10.209.25.43]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Feb 2022 00:18:32 -0800 From: Jordan Justen To: intel-gfx Subject: [PATCH v6 0/4] GuC HWCONFIG with documentation Date: Sun, 27 Feb 2022 00:18:27 -0800 Message-Id: <20220227081831.1089720-1-jordan.l.justen@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jordan Justen , dri-devel Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This is John/Rodrigo's 2 patches with some minor changes, and I added 2 patches. "drm/i915/uapi: Add query for hwconfig blob" was changed: * Rename DRM_I915_QUERY_HWCONFIG_TABLE to DRM_I915_QUERY_HWCONFIG_BLOB as requested by Joonas. * Reword commit message * I added Acked-by to this patch, but this Acked-by only applies in the context of this version of the patchset. "drm/i915/uapi: Add struct drm_i915_query_hwconfig_blob_item" adds a struct to the uAPI and documents the return value for DRM_I915_QUERY_HWCONFIG_BLOB. (Except, keys / values are still deferred to the PRM.) "drm/i915/guc: Verify hwconfig blob matches supported format" does the simple verification of the blob to make sure it matches what the uAPI documents. v2: * Fix -Werror errors. * Rebase to drm-intel/for-linux-next instead of drm-intel/for-linux-next-gt, as this seems to be what CI wants. * Fix u32 -> __u32. * Add commit message for "Verify hwconfig blob" patch as requested by Tvrtko. * Reword text added to i915_drm.h as requested by Tvrtko. (Attempting to indicate the overall blob ends right at the last blob item.) v3: * Add several changes suggested by Tvrtko in the "Verify hwconfig blob", along with some tweaks to i915_drm.h from the feedback for the same patch. v4: * Rewrite verify_hwconfig_blob() to hopefully be clearer without relying on comments so much, and add various suggestions from Michal. * Michal also had some suggestions in John's "drm/i915/guc: Add fetch of hwconfig table" patch. I held off on making any of these changes in this version. v5: * Add many changes suggested by Michal in John's "drm/i915/guc: Add fetch of hwconfig table" patch. * Fix documenation formatting as suggested by Daniel in "drm/i915/uapi: Add struct drm_i915_query_hwconfig_blob_item" v6: * Updated "drm/i915/guc: Add fetch of hwconfig table" by merging in John's v2 patch which saves the hwconfig blob at the GT level. I also added a few changes requested by Michal on the v5 posting. * Tvrtko requested an example of UMD using the i915 hwconfig interface. Mesa support for this interface can be seen in this MR: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14511 John Harrison (1): drm/i915/guc: Add fetch of hwconfig table Jordan Justen (2): drm/i915/uapi: Add struct drm_i915_query_hwconfig_blob_item drm/i915/guc: Verify hwconfig blob matches supported format Rodrigo Vivi (1): drm/i915/uapi: Add query for hwconfig blob drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/gt/intel_gt.c | 6 + drivers/gpu/drm/i915/gt/intel_gt_types.h | 4 + drivers/gpu/drm/i915/gt/intel_hwconfig.h | 21 ++ .../gpu/drm/i915/gt/uc/abi/guc_actions_abi.h | 1 + .../gpu/drm/i915/gt/uc/abi/guc_errors_abi.h | 4 + .../gpu/drm/i915/gt/uc/intel_guc_hwconfig.c | 203 ++++++++++++++++++ drivers/gpu/drm/i915/i915_query.c | 23 ++ include/uapi/drm/i915_drm.h | 44 ++++ 9 files changed, 307 insertions(+) create mode 100644 drivers/gpu/drm/i915/gt/intel_hwconfig.h create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c