From patchwork Fri Mar 3 13:39:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 94841 Delivered-To: patch@linaro.org Received: by 10.140.82.71 with SMTP id g65csp240166qgd; Fri, 3 Mar 2017 05:40:58 -0800 (PST) X-Received: by 10.99.116.10 with SMTP id p10mr3511137pgc.74.1488548458528; Fri, 03 Mar 2017 05:40:58 -0800 (PST) Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id y67si10685342pfa.97.2017.03.03.05.40.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Mar 2017 05:40:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4A5046ED2A; Fri, 3 Mar 2017 13:40:27 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr0-x241.google.com (mail-wr0-x241.google.com [IPv6:2a00:1450:400c:c0c::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id C46FC6ED1F; Fri, 3 Mar 2017 13:40:25 +0000 (UTC) Received: by mail-wr0-x241.google.com with SMTP id g10so13344035wrg.0; Fri, 03 Mar 2017 05:40:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=bb4Qlu5mRVuM6e/Ykhg4y+ekxP0dkjLOJEiEY2wpay4=; b=kRV90LmNSMVcbXuj2TzYktDw/BUNTnl6BPw8SW7xAFqZJ9FB5zw1rw/BadHFywOm0m bZvfhfrZKzAZ4Q6JWygWamH+P1b2hlvzLEWEx3i2C25uZr1UqCjcgZC9irla8kaoXUe9 GHByEzyu2KAykqaCmrIMBUx9tAC+9+I4PLRBO7+kU7dnm1jQksU44inBj99MtDH+Hpdl OVzQK7uTKPechwJoqV14wBDllRthuxuLWwZ8fL9IG7P4kZXi+ab5lPkwyFRxUm05C83O B5My6fJG1zX0BEWzTG1HVK4BNAZfFhwV+JBSugBWiGAM7weIX4fGbwGSQP69S+2GclMj djIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=bb4Qlu5mRVuM6e/Ykhg4y+ekxP0dkjLOJEiEY2wpay4=; b=MfUXiSAGshlizDiihUmSbD/2UJVJ46RwvYaAcl0A18pJsEmxdsD6WRzOaM8br46Qs6 Bq/T95qzGOG+xCU4os4Fk1Ke7su7thqbjG7h3to5vzJ1AC3d7lE6xLD2o+bfmhA46mJj JDJ3zRJt9pj6LkkCxjnnhMVgEO5W0OBW1zQ7sEG+en8YdGji6Ep8Uw13p81STt+dZ1LC yXWrPQcKwf4Q3H+w3/bkEASCL7uH3M86rk0YGspKa/x34GvH3RpkEYBE4oXLKMrVMlQK bh/OzG/TzQREjaLAJdRFH6+d/MgRQczpkZLmq27NlubseL/3gcM5vF7XoGzbfJhH3Aw1 3/vg== X-Gm-Message-State: AMke39nuNTCqNbviQZjOTiwscA2DvMyTODC9STZFSWrfGagdvnnh1RMOR8GU8k8LDAeAJg== X-Received: by 10.223.155.211 with SMTP id e19mr2592765wrc.74.1488548424492; Fri, 03 Mar 2017 05:40:24 -0800 (PST) Received: from cizrna.lan ([109.72.12.6]) by smtp.gmail.com with ESMTPSA id d42sm15247482wrd.7.2017.03.03.05.40.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Mar 2017 05:40:23 -0800 (PST) From: Tomeu Vizoso To: linux-kernel@vger.kernel.org Subject: [PATCH v6 3/4] drm/bridge: analogix_dp: add helpers for capture of frame CRCs Date: Fri, 3 Mar 2017 14:39:35 +0100 Message-Id: <20170303133936.14964-4-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170303133936.14964-1-tomeu.vizoso@collabora.com> References: <20170303133936.14964-1-tomeu.vizoso@collabora.com> Cc: Tomeu Vizoso , Emil Velikov , dri-devel@lists.freedesktop.org, intel-gfx-trybot@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" Add two simple functions that just take the drm_dp_aux from our struct and calls the corresponding DP helpers with it. v6: Pass to the DP helper the drm_crtc of the current connector (Sean Paul) Signed-off-by: Tomeu Vizoso --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 22 ++++++++++++++++++++++ include/drm/bridge/analogix_dp.h | 3 +++ 2 files changed, 25 insertions(+) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index e7cd1056ff2d..c26997afd3cf 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -1488,6 +1488,28 @@ int analogix_dp_resume(struct device *dev) EXPORT_SYMBOL_GPL(analogix_dp_resume); #endif +int analogix_dp_start_crc(struct drm_connector *connector) +{ + struct analogix_dp_device *dp = to_dp(connector); + + if (!connector->state->crtc) { + DRM_ERROR("Connector %s doesn't currently have a CRTC.\n", + connector->name); + return -EINVAL; + } + + return drm_dp_start_crc(&dp->aux, connector->state->crtc); +} +EXPORT_SYMBOL_GPL(analogix_dp_start_crc); + +int analogix_dp_stop_crc(struct drm_connector *connector) +{ + struct analogix_dp_device *dp = to_dp(connector); + + return drm_dp_stop_crc(&dp->aux); +} +EXPORT_SYMBOL_GPL(analogix_dp_stop_crc); + MODULE_AUTHOR("Jingoo Han "); MODULE_DESCRIPTION("Analogix DP Core Driver"); MODULE_LICENSE("GPL v2"); diff --git a/include/drm/bridge/analogix_dp.h b/include/drm/bridge/analogix_dp.h index f6f0c062205c..c99d6eaef1ac 100644 --- a/include/drm/bridge/analogix_dp.h +++ b/include/drm/bridge/analogix_dp.h @@ -49,4 +49,7 @@ int analogix_dp_bind(struct device *dev, struct drm_device *drm_dev, struct analogix_dp_plat_data *plat_data); void analogix_dp_unbind(struct device *dev, struct device *master, void *data); +int analogix_dp_start_crc(struct drm_connector *connector); +int analogix_dp_stop_crc(struct drm_connector *connector); + #endif /* _ANALOGIX_DP_H_ */