From patchwork Mon May 23 10:50:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Kahola X-Patchwork-Id: 9131473 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 2BAA960459 for ; Mon, 23 May 2016 10:51:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E05C28221 for ; Mon, 23 May 2016 10:51:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1290128231; Mon, 23 May 2016 10:51:49 +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 C907728221 for ; Mon, 23 May 2016 10:51:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B8E1D6E577; 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 041886E57C; Mon, 23 May 2016 10:51:23 +0000 (UTC) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 23 May 2016 03:51:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,355,1459839600"; d="scan'208";a="982783390" Received: from sorvi.fi.intel.com ([10.237.72.50]) by orsmga002.jf.intel.com with ESMTP; 23 May 2016 03:51:22 -0700 From: Mika Kahola To: dri-devel@lists.freedesktop.org Date: Mon, 23 May 2016 13:50:56 +0300 Message-Id: <1464000657-16867-12-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 11/12] drm/i915: Read DP branch device SW revision 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 SW revision is mandatory field for DisplayPort branch devices. This is defined in DPCD register field 0x50A. Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/intel_dp.c | 5 +++++ include/drm/drm_dp_helper.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 12ab26b..7e50d32 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -3468,6 +3468,11 @@ intel_dp_probe_oui(struct intel_dp *intel_dp) sizeof(intel_dp->bd.hw_rev)) == sizeof(intel_dp->bd.hw_rev)) DRM_DEBUG_KMS("HW revision: %.2d.%.2d\n", intel_dp->bd.hw_rev & 0xf, (intel_dp->bd.hw_rev>>4) & 0xf); + + if (drm_dp_dpcd_read(&intel_dp->aux, DP_BRANCH_SW_REV, intel_dp->bd.sw_rev, + sizeof(intel_dp->bd.sw_rev)) == sizeof(intel_dp->bd.sw_rev)) + DRM_DEBUG_KMS("SW revision: %.2d.%.2d\n", + intel_dp->bd.sw_rev[0], intel_dp->bd.sw_rev[1]); } } diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h index d0965ca..c0ca0c9 100644 --- a/include/drm/drm_dp_helper.h +++ b/include/drm/drm_dp_helper.h @@ -459,6 +459,7 @@ #define DP_BRANCH_OUI 0x500 #define DP_BRANCH_ID 0x503 #define DP_BRANCH_HW_REV 0x509 +#define DP_BRANCH_SW_REV 0x50A #define DP_SET_POWER 0x600 # define DP_SET_POWER_D0 0x1 @@ -873,6 +874,7 @@ struct drm_dp_bd { bool hpd; uint8_t id[6]; uint8_t hw_rev; + uint8_t sw_rev[2]; union { struct drm_dp_vga vga; struct drm_dp_dvi dvi;