From patchwork Sat Oct 29 01:07:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Navare, Manasi" X-Patchwork-Id: 9402963 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 E8E086022E for ; Sat, 29 Oct 2016 01:06:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D6A362A6C9 for ; Sat, 29 Oct 2016 01:06:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CB6452A6F5; Sat, 29 Oct 2016 01:06:06 +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 71DE52A6C9 for ; Sat, 29 Oct 2016 01:06:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 597FD6EC9A; Sat, 29 Oct 2016 01:06:03 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2D08B6EC97; Sat, 29 Oct 2016 01:06:02 +0000 (UTC) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP; 28 Oct 2016 18:06:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.31,560,1473145200"; d="scan'208"; a="1051968312" Received: from manasi-otcmedia.jf.intel.com ([10.7.199.175]) by orsmga001.jf.intel.com with ESMTP; 28 Oct 2016 18:06:01 -0700 From: Manasi Navare To: intel-gfx@lists.freedesktop.org Date: Fri, 28 Oct 2016 18:07:23 -0700 Message-Id: <1477703245-27375-3-git-send-email-manasi.d.navare@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1477703245-27375-1-git-send-email-manasi.d.navare@intel.com> References: <1477703245-27375-1-git-send-email-manasi.d.navare@intel.com> Cc: dri-devel@lists.freedesktop.org, Daniel Vetter Subject: [Intel-gfx] [PATCH v2 2/4] drm/i915: Set link status property for DP connector 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 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. v2: * Simplify the return value (Jani Nikula) Cc: dri-devel@lists.freedesktop.org Cc: Jani Nikula Cc: Daniel Vetter Cc: Ville Syrjala Cc: Chris Wilson Signed-off-by: Manasi Navare Reviewed-by: Jani Nikula --- drivers/gpu/drm/i915/intel_dp.c | 11 +++++++++++ drivers/gpu/drm/i915/intel_drv.h | 2 ++ 2 files changed, 13 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 1063afe..2b6f51c 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -4640,6 +4640,17 @@ 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; + + return drm_object_property_set_value(&connector->base, + dev->mode_config.link_status_property, + val); +} + 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 2616d92..3cb7481 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -1391,6 +1391,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);