From patchwork Tue Dec 27 13:29:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Manna, Animesh" X-Patchwork-Id: 9489221 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 E8E9B60838 for ; Tue, 27 Dec 2016 13:16:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D9D38209CD for ; Tue, 27 Dec 2016 13:16:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CEF2225F31; Tue, 27 Dec 2016 13:16:38 +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=-4.2 required=2.0 tests=BAYES_00, 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 681D9209CD for ; Tue, 27 Dec 2016 13:16:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 89FD0897E7; Tue, 27 Dec 2016 13:16:33 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id 11B9B89AC9 for ; Tue, 27 Dec 2016 13:16:25 +0000 (UTC) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP; 27 Dec 2016 05:16:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.33,416,1477983600"; d="scan'208"; a="1076680304" Received: from dispdev.iind.intel.com ([10.223.25.80]) by orsmga001.jf.intel.com with ESMTP; 27 Dec 2016 05:16:23 -0800 From: Animesh Manna To: intel-gfx@lists.freedesktop.org Date: Tue, 27 Dec 2016 18:59:53 +0530 Message-Id: <1482845396-23408-3-git-send-email-animesh.manna@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1482845396-23408-1-git-send-email-animesh.manna@intel.com> References: <1482845396-23408-1-git-send-email-animesh.manna@intel.com> Subject: [Intel-gfx] [PATCH v3 2/5] drm/i915/bxt: VBT changes for hpd as wakeup feature 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 To support hpd during sleep a new feature flag is added in vbt and also in dev_priv for enabling/disabling inside driver. By default this feature will be disabled and based on oem request this feature can be enabled by changing vbt feature flag. v1: Initial version as RFC. v2: Based on review comments from Jani, - Used bool instead of enum for hpd feature flag. - Updating feature flag at the first place based on vbt entry. v3: Based on review comment from Jani, - removed the if condition check, directly update driver flag with vbt feature flag. Signed-off-by: Animesh Manna Signed-off-by: A.Sunil Kamath --- drivers/gpu/drm/i915/i915_drv.h | 3 +++ drivers/gpu/drm/i915/intel_bios.c | 4 ++++ drivers/gpu/drm/i915/intel_vbt_defs.h | 3 ++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 77d7a07..651a013 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -1743,6 +1743,9 @@ struct intel_vbt_data { const u8 *sequence[MIPI_SEQ_MAX]; } dsi; + /* HPD as wakesoure for DC9 BXT */ + bool hpd_wakeup_enabled; + int crt_ddc_pin; int child_dev_num; diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c index 1cf2fa6..aacbd62 100644 --- a/drivers/gpu/drm/i915/intel_bios.c +++ b/drivers/gpu/drm/i915/intel_bios.c @@ -559,6 +559,10 @@ parse_driver_features(struct drm_i915_private *dev_priv, if (driver->lvds_config == BDB_DRIVER_FEATURE_EDP) dev_priv->vbt.edp.support = 1; + dev_priv->vbt.hpd_wakeup_enabled = driver->hpd_wakeup_source; + DRM_DEBUG_KMS("HPD as wakeup source:%s\n", + yesno(driver->hpd_wakeup_source)); + DRM_DEBUG_KMS("DRRS State Enabled:%d\n", driver->drrs_enabled); /* * If DRRS is not supported, drrs_type has to be set to 0. diff --git a/drivers/gpu/drm/i915/intel_vbt_defs.h b/drivers/gpu/drm/i915/intel_vbt_defs.h index 8886cab1..2072134 100644 --- a/drivers/gpu/drm/i915/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/intel_vbt_defs.h @@ -561,7 +561,8 @@ struct bdb_driver_features { u16 tbt_enabled:1; u16 psr_enabled:1; u16 ips_enabled:1; - u16 reserved3:4; + u16 reserved3:3; + u16 hpd_wakeup_source:1; u16 pc_feature_valid:1; } __packed;