All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
To: linux-kernel@vger.kernel.org
Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Sean Paul" <seanpaul@chromium.org>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	intel-gfx-trybot@lists.freedesktop.org,
	"Emil Velikov" <emil.l.velikov@gmail.com>,
	"Daniel Vetter" <daniel.vetter@intel.com>,
	"Benjamin Gaignard" <benjamin.gaignard@linaro.org>,
	"Tomeu Vizoso" <tomeu.vizoso@collabora.com>,
	"Archit Taneja" <architt@codeaurora.org>,
	"David Airlie" <airlied@linux.ie>,
	dri-devel@lists.freedesktop.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	[thread overview]
Message-ID: <20170303133936.14964-4-tomeu.vizoso@collabora.com> (raw)
In-Reply-To: <20170303133936.14964-1-tomeu.vizoso@collabora.com>

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 <tomeu.vizoso@collabora.com>
---

 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 <jg1.han@samsung.com>");
 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_ */
-- 
2.9.3

WARNING: multiple messages have this Message-ID (diff)
From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
To: linux-kernel@vger.kernel.org
Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>,
	Emil Velikov <emil.l.velikov@gmail.com>,
	dri-devel@lists.freedesktop.org,
	intel-gfx-trybot@lists.freedesktop.org,
	Daniel Vetter <daniel.vetter@intel.com>
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	[thread overview]
Message-ID: <20170303133936.14964-4-tomeu.vizoso@collabora.com> (raw)
In-Reply-To: <20170303133936.14964-1-tomeu.vizoso@collabora.com>

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 <tomeu.vizoso@collabora.com>
---

 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 <jg1.han@samsung.com>");
 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_ */
-- 
2.9.3

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2017-03-03 13:47 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-03 13:39 [PATCH v6 0/4] drm/dp: Implement CRC debugfs API Tomeu Vizoso
2017-03-03 13:39 ` Tomeu Vizoso
2017-03-03 13:39 ` Tomeu Vizoso
2017-03-03 13:39 ` [PATCH v6 1/4] drm/dp: add crtc backpointer to drm_dp_aux Tomeu Vizoso
2017-03-03 13:39   ` Tomeu Vizoso
2017-03-03 13:39 ` [PATCH v6 2/4] drm/dp: add helpers for capture of frame CRCs Tomeu Vizoso
2017-03-03 13:39   ` Tomeu Vizoso
2017-03-07 18:26   ` Gabriel Krisman Bertazi
2017-03-07 20:35     ` [PATCH] drm/dp: Add missing description to parameter Tomeu Vizoso
2017-03-07 20:35       ` Tomeu Vizoso
2017-03-07 22:03       ` Sean Paul
2017-03-07 22:03         ` Sean Paul
2017-03-08  8:39         ` 0day 'make htmldocs' testing (was: Re: [PATCH] drm/dp: Add missing description to parameter) Jani Nikula
2017-03-08  8:41           ` Jani Nikula
2017-03-08  9:20             ` [kbuild-all] " Philip Li
2017-03-08  9:24             ` Fengguang Wu
2017-03-03 13:39 ` Tomeu Vizoso [this message]
2017-03-03 13:39   ` [PATCH v6 3/4] drm/bridge: analogix_dp: add helpers for capture of frame CRCs Tomeu Vizoso
2017-03-03 13:39 ` [PATCH v6 4/4] drm/rockchip: Implement CRC debugfs API Tomeu Vizoso
2017-03-03 13:39   ` Tomeu Vizoso
2017-03-03 13:39   ` Tomeu Vizoso
2017-03-06  0:55   ` Mark yao
2017-03-06  0:55     ` Mark yao
2017-03-06  0:55     ` Mark yao
2017-03-06 17:58   ` Emil Velikov
2017-03-06 17:58     ` Emil Velikov
2017-03-06 17:58     ` Emil Velikov
2017-03-06 17:19 ` [PATCH v6 0/4] drm/dp: " Sean Paul
2017-03-06 17:19   ` Sean Paul
2017-03-06 17:19   ` Sean Paul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170303133936.14964-4-tomeu.vizoso@collabora.com \
    --to=tomeu.vizoso@collabora.com \
    --cc=airlied@linux.ie \
    --cc=architt@codeaurora.org \
    --cc=benjamin.gaignard@linaro.org \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=intel-gfx-trybot@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=seanpaul@chromium.org \
    --cc=thierry.reding@gmail.com \
    --cc=ville.syrjala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.