diff options
| author | Mark Brown <broonie@kernel.org> | 2016-11-04 21:16:38 +0300 | 
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2016-11-04 21:16:38 +0300 | 
| commit | cc9b94029e9ef51787af908e9856b1eed314bc00 (patch) | |
| tree | 9675310b89d0f6fb1f7bd9423f0638c4ee5226fd /drivers/gpu/drm/amd/amdgpu/atombios_dp.c | |
| parent | 13bed58ce8748d430a26e353a09b89f9d613a71f (diff) | |
| parent | 1b5b42216469b05ef4b5916cb40b127dfab1da88 (diff) | |
| download | linux-cc9b94029e9ef51787af908e9856b1eed314bc00.tar.xz | |
Merge branch 'topic/error' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-fixed
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/atombios_dp.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 22 | 
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/atombios_dp.c b/drivers/gpu/drm/amd/amdgpu/atombios_dp.c index 7f85c2c1d681..f81068ba4cc6 100644 --- a/drivers/gpu/drm/amd/amdgpu/atombios_dp.c +++ b/drivers/gpu/drm/amd/amdgpu/atombios_dp.c @@ -88,7 +88,6 @@ static int amdgpu_atombios_dp_process_aux_ch(struct amdgpu_i2c_chan *chan,  	/* timeout */  	if (args.v2.ucReplyStatus == 1) { -		DRM_DEBUG_KMS("dp_aux_ch timeout\n");  		r = -ETIMEDOUT;  		goto done;  	} @@ -339,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;  }  | 
