From: Lyude <cpaul@redhat.com>
To: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
xorg-driver-ati@lists.freedesktop.org
Cc: Lyude <cpaul@redhat.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"David Airlie" <airlied@linux.ie>,
"Tom St Denis" <tom.stdenis@amd.com>,
"Harry Wentland" <harry.wentland@amd.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 5/7] drm/amdgpu: Don't retry 7 times in amdgpu_atombios_dp_get_dpcd()
Date: Fri, 5 Aug 2016 20:30:37 -0400 [thread overview]
Message-ID: <1470443443-27252-6-git-send-email-cpaul@redhat.com> (raw)
In-Reply-To: <1470443443-27252-1-git-send-email-cpaul@redhat.com>
When this code was written, we didn't retry DP aux transactions on any
error, which required retrying important transactions like this in
individual drivers. Since that's no longer the case, retrying here is
not necessary. As well, we retry any aux transaction on any error 32
times. 7 * 32 = 224, which means this loop causes us to retry grabbing
the dpcd 224 times. This is definitely far more then we actually need to
do.
Signed-off-by: Lyude <cpaul@redhat.com>
---
drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/atombios_dp.c b/drivers/gpu/drm/amd/amdgpu/atombios_dp.c
index 166dc7b..f81068b 100644
--- a/drivers/gpu/drm/amd/amdgpu/atombios_dp.c
+++ b/drivers/gpu/drm/amd/amdgpu/atombios_dp.c
@@ -338,22 +338,21 @@ int amdgpu_atombios_dp_get_dpcd(struct amdgpu_connector *amdgpu_connector)
{
struct amdgpu_connector_atom_dig *dig_connector = amdgpu_connector->con_priv;
u8 msg[DP_DPCD_SIZE];
- int ret, i;
+ int ret;
- for (i = 0; i < 7; i++) {
- ret = drm_dp_dpcd_read(&amdgpu_connector->ddc_bus->aux, DP_DPCD_REV, msg,
- DP_DPCD_SIZE);
- if (ret == DP_DPCD_SIZE) {
- memcpy(dig_connector->dpcd, msg, DP_DPCD_SIZE);
+ ret = drm_dp_dpcd_read(&amdgpu_connector->ddc_bus->aux, DP_DPCD_REV,
+ msg, DP_DPCD_SIZE);
+ if (ret == DP_DPCD_SIZE) {
+ memcpy(dig_connector->dpcd, msg, DP_DPCD_SIZE);
- DRM_DEBUG_KMS("DPCD: %*ph\n", (int)sizeof(dig_connector->dpcd),
- dig_connector->dpcd);
+ DRM_DEBUG_KMS("DPCD: %*ph\n", (int)sizeof(dig_connector->dpcd),
+ dig_connector->dpcd);
- amdgpu_atombios_dp_probe_oui(amdgpu_connector);
+ amdgpu_atombios_dp_probe_oui(amdgpu_connector);
- return 0;
- }
+ return 0;
}
+
dig_connector->dpcd[0] = 0;
return -EINVAL;
}
--
2.7.4
next prev parent reply other threads:[~2016-08-06 20:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-06 0:30 [PATCH 0/7] Minor DP aux transaction fixes Lyude
2016-08-06 0:30 ` [PATCH 1/7] drm/dp_helper: Print first error received on failure in drm_dp_dpcd_access() Lyude
2016-08-06 0:30 ` [PATCH 2/7] drm/radeon: Don't print error on aux transaction timeouts Lyude
2016-08-06 0:30 ` [PATCH 3/7] drm/radeon: Don't retry 7 times in radeon_dp_dpcd() Lyude
2016-08-06 0:30 ` [PATCH 4/7] drm/amdgpu: Don't print error on aux transaction timeouts Lyude
2016-08-06 0:30 ` Lyude [this message]
2016-08-06 0:30 ` [PATCH 6/7] drm: Add ratelimited versions of the DRM_DEBUG* macros Lyude
2016-08-06 20:32 ` Joe Perches
2016-08-06 0:30 ` [PATCH 7/7] drm/dp_helper: Rate limit timeout errors from drm_dp_i2c_do_msg() Lyude
2016-08-06 10:22 ` [PATCH 0/7] Minor DP aux transaction fixes Christian König
2016-08-08 17:30 ` Alex Deucher
2016-08-09 6:11 ` Daniel Vetter
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=1470443443-27252-6-git-send-email-cpaul@redhat.com \
--to=cpaul@redhat.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tom.stdenis@amd.com \
--cc=xorg-driver-ati@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).