From patchwork Mon Nov 26 06:05:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhenyu Wang X-Patchwork-Id: 10697605 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 158B615A7 for ; Mon, 26 Nov 2018 06:06:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 04EF029800 for ; Mon, 26 Nov 2018 06:06:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EC00B2980B; Mon, 26 Nov 2018 06:06:11 +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 A618E29800 for ; Mon, 26 Nov 2018 06:06:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E05F46E2CE; Mon, 26 Nov 2018 06:06:10 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id 586886E2C4; Mon, 26 Nov 2018 06:06:06 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Nov 2018 22:06:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,280,1539673200"; d="scan'208";a="89170709" Received: from debian-nuc.sh.intel.com ([10.239.159.41]) by fmsmga008.fm.intel.com with ESMTP; 25 Nov 2018 22:06:04 -0800 From: Zhenyu Wang To: joonas.lahtinen@linux.intel.com Date: Mon, 26 Nov 2018 14:05:52 +0800 Message-Id: <20181126060554.16481-1-zhenyuw@linux.intel.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Subject: [Intel-gfx] [RFC PATCH v2 0/2] GVT device model split 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: , Cc: intel-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Refresh previous attempt to split GVT module. This trys to move GVT device model in stand alone module. New module named as "i915_gvt" is created. The purpose is to enable GVT function once user loads i915_gvt module. This needs to export several i915 functions currently used by GVT as in first patch. As GVT requires HW initial MMIO state for vGPU as base initial state after create, which needs to be got from early stage of i915 load, this trys to read all GVT tracked registers when i915 init, and provide for i915_gvt module when host init. I think we would refactor "kvmgt" module init first. "kvmgt" should register into GVT as hypervisor interface provider, instead of making GVT to load it for now. But that still won't split GVT from i915. So this work takes further to split GVT device model from i915. Thanks Zhenyu Wang (2): drm/i915: Export current required functions for GVT drm/i915: Move GVT device model into separate module drivers/gpu/drm/i915/Kconfig | 2 +- drivers/gpu/drm/i915/Makefile | 4 +- drivers/gpu/drm/i915/gvt/Makefile | 8 +- drivers/gpu/drm/i915/gvt/firmware.c | 2 +- drivers/gpu/drm/i915/gvt/gvt.c | 52 +- drivers/gpu/drm/i915/gvt/gvt.h | 3 + drivers/gpu/drm/i915/i915_drv.c | 43 +- drivers/gpu/drm/i915/i915_drv.h | 10 +- drivers/gpu/drm/i915/i915_gem.c | 11 + drivers/gpu/drm/i915/i915_gem_context.c | 2 + drivers/gpu/drm/i915/i915_gem_dmabuf.c | 1 + drivers/gpu/drm/i915/i915_gem_fence_reg.c | 2 + drivers/gpu/drm/i915/i915_gem_gtt.c | 1 + drivers/gpu/drm/i915/i915_params.c | 5 - drivers/gpu/drm/i915/i915_params.h | 3 +- drivers/gpu/drm/i915/i915_request.c | 3 + drivers/gpu/drm/i915/i915_vma.c | 2 + drivers/gpu/drm/i915/intel_gvt.c | 1519 ++++++++++++++++++++- drivers/gpu/drm/i915/intel_gvt.h | 29 +- drivers/gpu/drm/i915/intel_ringbuffer.c | 1 + drivers/gpu/drm/i915/intel_runtime_pm.c | 2 + drivers/gpu/drm/i915/intel_uncore.c | 3 + 22 files changed, 1575 insertions(+), 133 deletions(-)