From: Thierry Reding <thierry.reding@gmail.com>
To: dri-devel@lists.freedesktop.org
Subject: [PATCH 01/12] drm/dp: Add drm_dp_link_reset() implementation
Date: Mon, 14 Dec 2015 13:55:53 +0100 [thread overview]
Message-ID: <1450097764-30063-2-git-send-email-thierry.reding@gmail.com> (raw)
In-Reply-To: <1450097764-30063-1-git-send-email-thierry.reding@gmail.com>
From: Thierry Reding <treding@nvidia.com>
Subsequent patches will add non-volatile fields to struct drm_dp_link,
so introduce a function to zero out only the volatile fields.
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
drivers/gpu/drm/drm_dp_helper.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
index 9535c5b60387..841b49652cc5 100644
--- a/drivers/gpu/drm/drm_dp_helper.c
+++ b/drivers/gpu/drm/drm_dp_helper.c
@@ -284,6 +284,17 @@ int drm_dp_dpcd_read_link_status(struct drm_dp_aux *aux,
}
EXPORT_SYMBOL(drm_dp_dpcd_read_link_status);
+static void drm_dp_link_reset(struct drm_dp_link *link)
+{
+ if (!link)
+ return;
+
+ link->revision = 0;
+ link->rate = 0;
+ link->num_lanes = 0;
+ link->capabilities = 0;
+}
+
/**
* drm_dp_link_probe() - probe a DisplayPort link for capabilities
* @aux: DisplayPort AUX channel
@@ -300,7 +311,7 @@ int drm_dp_link_probe(struct drm_dp_aux *aux, struct drm_dp_link *link)
u8 values[3];
int err;
- memset(link, 0, sizeof(*link));
+ drm_dp_link_reset(link);
err = drm_dp_dpcd_read(aux, DP_DPCD_REV, values, sizeof(values));
if (err < 0)
--
2.5.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-12-14 12:56 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-14 12:55 [PATCH 00/12] drm/dp: Extend DRM DP link helpers Thierry Reding
2015-12-14 12:55 ` Thierry Reding [this message]
2015-12-14 12:55 ` [PATCH 02/12] drm/dp: link: Track capabilities alongside settings Thierry Reding
2015-12-14 12:55 ` [PATCH 03/12] drm/dp: Turn link capabilities into booleans Thierry Reding
2015-12-15 10:35 ` Daniel Vetter
2015-12-14 12:55 ` [PATCH 04/12] drm/dp: Probe link using existing parsing helpers Thierry Reding
2015-12-14 12:55 ` [PATCH 05/12] drm/dp: Read fast training capability from link Thierry Reding
2015-12-14 12:55 ` [PATCH 06/12] drm/dp: Read TPS3 capability from sink Thierry Reding
2015-12-14 12:55 ` [PATCH 07/12] drm/dp: Set channel coding on link configuration Thierry Reding
2015-12-14 12:56 ` [PATCH 08/12] drm/dp: Read eDP version from DPCD Thierry Reding
2015-12-14 12:56 ` [PATCH 09/12] drm/dp: Add helper to get post-cursor adjustments Thierry Reding
2015-12-14 12:56 ` [PATCH 10/12] drm/dp: Enable alternate scrambler when supported Thierry Reding
2015-12-14 12:56 ` [PATCH 11/12] drm/dp: Read AUX read interval from DPCD Thierry Reding
2015-12-15 10:38 ` Daniel Vetter
2016-02-29 6:38 ` Thierry Reding
2016-02-29 14:44 ` Daniel Vetter
2015-12-14 12:56 ` [PATCH 12/12] drm/dp: Add drm_dp_link_choose() helper Thierry Reding
2016-01-31 14:39 ` Jani Nikula
2016-02-29 6:29 ` Thierry Reding
2016-02-29 9:00 ` Jani Nikula
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=1450097764-30063-2-git-send-email-thierry.reding@gmail.com \
--to=thierry.reding@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).