From patchwork Wed Oct 26 01:16:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Navare, Manasi" X-Patchwork-Id: 9395761 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 4739C60233 for ; Wed, 26 Oct 2016 01:15:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E9D232959E for ; Wed, 26 Oct 2016 01:15:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DDB7F295EE; Wed, 26 Oct 2016 01:15:14 +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 85C5B2959E for ; Wed, 26 Oct 2016 01:15:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0B7AB6E795; Wed, 26 Oct 2016 01:15:14 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id BE35A6E796; Wed, 26 Oct 2016 01:15:12 +0000 (UTC) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP; 25 Oct 2016 18:15:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,548,1473145200"; d="scan'208";a="23735828" Received: from manasi-otcmedia.jf.intel.com ([10.7.199.175]) by orsmga005.jf.intel.com with ESMTP; 25 Oct 2016 18:15:12 -0700 From: Manasi Navare To: intel-gfx@lists.freedesktop.org Date: Tue, 25 Oct 2016 18:16:35 -0700 Message-Id: <1477444595-19656-2-git-send-email-manasi.d.navare@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1477444595-19656-1-git-send-email-manasi.d.navare@intel.com> References: <1477444595-19656-1-git-send-email-manasi.d.navare@intel.com> Cc: dri-devel@lists.freedesktop.org, Daniel Vetter Subject: [Intel-gfx] [PATCH 2/2] 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 The link status connector property is attached to the drm object in DP initialization. This also defines a helper function to set the property value. This will be used to set the link sttaus 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 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 3c2293b..dd0d372 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -4674,6 +4674,22 @@ static int intel_dp_get_modes(struct drm_connector *connector) } static 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) { struct intel_dp *intel_dp = intel_attached_dp(connector); @@ -4940,6 +4956,11 @@ bool intel_dp_is_edp(struct drm_device *dev, enum port port) connector->dev->mode_config.scaling_mode_property, DRM_MODE_SCALE_ASPECT); intel_connector->panel.fitting_mode = DRM_MODE_SCALE_ASPECT; + } else { + drm_mode_create_link_status_property(connector->dev); + drm_object_attach_property(&connector->base, + connector->dev->mode_config.link_status_property, + DRM_MODE_LINK_STATUS_GOOD); } }