From patchwork Wed Mar 29 09:02:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhang, Xiong Y" X-Patchwork-Id: 9651035 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C003F601D7 for ; Wed, 29 Mar 2017 08:54:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B7C8026E82 for ; Wed, 29 Mar 2017 08:54:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ABF6D283B9; Wed, 29 Mar 2017 08:54:36 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RCVD_IN_SORBS_SPAM,T_DKIM_INVALID 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 4BDE326E82 for ; Wed, 29 Mar 2017 08:54:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2B3986E6EA; Wed, 29 Mar 2017 08:54:35 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3E9F66E6EA for ; Wed, 29 Mar 2017 08:54:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490777674; x=1522313674; h=from:to:cc:subject:date:message-id; bh=DyRIbZHivfBvgSSa656mO6CBx3sEqGJ9Bv/cWB2awYc=; b=gjYeGiWTLkN1nlc9pR/O+cm1MglzhcB+sJ5pmlFNVMjByM0Qf2/c8TAs I6RJncMHvqwrQ9TWeodDA3Gt7kNc8w==; Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Mar 2017 01:54:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.36,240,1486454400"; d="scan'208"; a="1128402290" Received: from panda-dev.bj.intel.com ([10.238.135.63]) by fmsmga001.fm.intel.com with ESMTP; 29 Mar 2017 01:54:32 -0700 From: Xiong Zhang To: intel-gfx@lists.freedesktop.org Date: Wed, 29 Mar 2017 17:02:47 +0800 Message-Id: <1490778167-21424-1-git-send-email-xiong.y.zhang@intel.com> X-Mailer: git-send-email 1.9.1 Subject: [Intel-gfx] [PATCH] drm/i915: Setting pch_id for Gen7.5+ in virtual environment X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP In a virtual passthrough environment, the ISA bridge isn't able to be passed through. So pch_id couldn't be gotten from ISA bridge, but pch_id is used to identify LPT_H and LPT_LP, this patch set pch_id according to IGD type. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99938 Signed-off-by: Xiong Zhang --- drivers/gpu/drm/i915/i915_drv.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 8b807a9..32a9bff 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -135,9 +135,17 @@ static enum intel_pch intel_virt_detect_pch(struct drm_i915_private *dev_priv) DRM_DEBUG_KMS("Assuming CouarPoint PCH\n"); } else if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv)) { ret = PCH_LPT; + if (IS_HSW_ULT(dev_priv) || IS_BDW_ULT(dev_priv)) + dev_priv->pch_id = INTEL_PCH_LPT_LP_DEVICE_ID_TYPE; + else + dev_priv->pch_id = INTEL_PCH_LPT_DEVICE_ID_TYPE; DRM_DEBUG_KMS("Assuming LynxPoint PCH\n"); } else if (IS_SKYLAKE(dev_priv) || IS_KABYLAKE(dev_priv)) { ret = PCH_SPT; + if (IS_SKL_ULT(dev_priv) || IS_KBL_ULT(dev_priv)) + dev_priv->pch_id = INTEL_PCH_SPT_LP_DEVICE_ID_TYPE; + else + dev_priv->pch_id = INTEL_PCH_SPT_DEVICE_ID_TYPE; DRM_DEBUG_KMS("Assuming SunrisePoint PCH\n"); }