From patchwork Mon May 23 10:50:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Kahola X-Patchwork-Id: 9131471 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 716A460459 for ; Mon, 23 May 2016 10:51:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 63BDB28221 for ; Mon, 23 May 2016 10:51:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5860B28231; Mon, 23 May 2016 10:51:45 +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]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 026B128221 for ; Mon, 23 May 2016 10:51:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 25A5C6E575; Mon, 23 May 2016 10:51:44 +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 ESMTP id D9C796E578; Mon, 23 May 2016 10:51:12 +0000 (UTC) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 23 May 2016 03:51:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,355,1459839600"; d="scan'208";a="982783325" Received: from sorvi.fi.intel.com ([10.237.72.50]) by orsmga002.jf.intel.com with ESMTP; 23 May 2016 03:51:11 -0700 From: Mika Kahola To: dri-devel@lists.freedesktop.org Date: Mon, 23 May 2016 13:50:51 +0300 Message-Id: <1464000657-16867-7-git-send-email-mika.kahola@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1464000657-16867-1-git-send-email-mika.kahola@intel.com> References: <1464000657-16867-1-git-send-email-mika.kahola@intel.com> Cc: intel-gfx@lists.freedesktop.org, jim.bride@intel.com Subject: [Intel-gfx] [PATCH v3 06/12] drm: Read DPCD receiver capability for DP to Wireless Converter 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 Read from DPCD receiver capability field for the DP to Wireless converter. The only supported wireless technology on DP1.3 spec is WiGig display extension. If WiGig display extension is present, then read out the - number of wde tx on device - the number of wde txs that can be concurrently active Signed-off-by: Mika Kahola --- drivers/gpu/drm/drm_dp_helper.c | 7 +++++++ include/drm/drm_dp_helper.h | 13 +++++++++++++ 2 files changed, 20 insertions(+) diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c index f98e4be..2c91771 100644 --- a/drivers/gpu/drm/drm_dp_helper.c +++ b/drivers/gpu/drm/drm_dp_helper.c @@ -468,6 +468,13 @@ int drm_dp_bd(struct drm_dp_aux *aux, struct drm_dp_bd *bd) bd->dfp.dual_mode.tmds_clk = info[1] * 2500; bd->dfp.dual_mode.bpc = info[2] & DP_DS_VGA_MAX_BPC_MASK; bd->dfp.dual_mode.frame_seq_to_frame_pack = info[3] & FRAME_SEQ_TO_FRAME_PACK; + } else if (bd->type & DP_DS_PORT_TYPE_WIRELESS) { + bd->dfp.wireless.wireless_tech = info[1] & DP_DS_WIRELESS_TECH_MASK; + + if (bd->dfp.wireless.wireless_tech == 0x0) { + bd->dfp.wireless.number_of_wde_tx_on_device = info[2] & WIRELESS_MASK; + bd->dfp.wireless.wde_tx_concurrency_cap = (info[2]>>2) & WIRELESS_MASK; + } } } diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h index adf05a1..831f944 100644 --- a/include/drm/drm_dp_helper.h +++ b/include/drm/drm_dp_helper.h @@ -230,6 +230,9 @@ # define YCBCR420_PASS_THROUGH (1<<2) # define YCBCR444_TO_YCBCR422 (1<<3) # define YCBCR444_TO_YCBCR420 (1<<4) +/* offset 3 for Wireless */ +# define DP_DS_WIRELESS_TECH_MASK 0xf +# define WIRELESS_MASK 3 /* link configuration */ #define DP_LINK_BW_SET 0x100 @@ -851,6 +854,15 @@ struct drm_dp_dual_mode { }; /* + * DP to Wireless + */ +struct drm_dp_wireless { + int wireless_tech; + int number_of_wde_tx_on_device; + int wde_tx_concurrency_cap; +}; + +/* * Branch device */ struct drm_dp_bd { @@ -862,6 +874,7 @@ struct drm_dp_bd { struct drm_dp_dvi dvi; struct drm_dp_hdmi hdmi; struct drm_dp_dual_mode dual_mode; + struct drm_dp_wireless wireless; } dfp; };