From patchwork Wed Oct 26 23:25:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Navare, Manasi" X-Patchwork-Id: 9398799 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 9CD4260234 for ; Thu, 27 Oct 2016 00:56:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 66CEF29E64 for ; Thu, 27 Oct 2016 00:56:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5BBB129E66; Thu, 27 Oct 2016 00:56: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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable 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 07E6329E64 for ; Thu, 27 Oct 2016 00:56:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D54E56E98F; Thu, 27 Oct 2016 00:55:14 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7CB866E961; Wed, 26 Oct 2016 23:25:50 +0000 (UTC) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP; 26 Oct 2016 16:25:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,551,1473145200"; d="scan'208";a="894421041" Received: from manasi-otcmedia.jf.intel.com ([10.7.199.175]) by orsmga003.jf.intel.com with ESMTP; 26 Oct 2016 16:25:49 -0700 From: Manasi Navare To: intel-gfx@lists.freedesktop.org Subject: [PATCH 3/7] drm/i915: Set link status property for DP connector Date: Wed, 26 Oct 2016 16:25:54 -0700 Message-Id: <1477524358-16563-3-git-send-email-manasi.d.navare@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1477524358-16563-1-git-send-email-manasi.d.navare@intel.com> References: <1477524358-16563-1-git-send-email-manasi.d.navare@intel.com> X-Mailman-Approved-At: Thu, 27 Oct 2016 00:55:07 +0000 Cc: Manasi Navare , dri-devel@lists.freedesktop.org, Daniel Vetter X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This defines a helper function to set the property value. This will be used to set the link status to Bad in case of link training failures. Cc: dri-devel@lists.freedesktop.org Cc: Jani Nikula Cc: Daniel Vetter Cc: Ville Syrjala Cc: Chris Wilson Signed-off-by: Manasi Navare --- drivers/gpu/drm/i915/intel_dp.c | 16 ++++++++++++++++ drivers/gpu/drm/i915/intel_drv.h | 2 ++ 2 files changed, 18 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 3c2293b..795897c 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -4673,6 +4673,22 @@ static int intel_dp_get_modes(struct drm_connector *connector) return 0; } +int +intel_dp_set_link_status_property(struct drm_connector *connector, + uint64_t val) +{ + struct drm_device *dev = connector->dev; + int ret = 0; + + ret = drm_object_property_set_value(&connector->base, + dev->mode_config.link_status_property, + val); + if (ret) + return ret; + + return ret; +} + static int intel_dp_connector_register(struct drm_connector *connector) { diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 7dda79d..f6fe05a 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -1397,6 +1397,8 @@ u32 skl_plane_stride(const struct drm_framebuffer *fb, int plane, bool intel_dp_init(struct drm_device *dev, i915_reg_t output_reg, enum port port); bool intel_dp_init_connector(struct intel_digital_port *intel_dig_port, struct intel_connector *intel_connector); +int intel_dp_set_link_status_property(struct drm_connector *connector, + uint64_t val); void intel_dp_set_link_params(struct intel_dp *intel_dp, int link_rate, uint8_t lane_count, bool link_mst);