[Intel-gfx] [PATCH 1/3] drm/i915/dp: Check if the sink crc we read is 6 bytes.

Rodrigo Vivi rodrigo.vivi at intel.com
Tue Apr 24 20:53:45 UTC 2018


On Mon, Apr 23, 2018 at 07:56:57PM -0700, Dhinakaran Pandiyan wrote:
> We attempt to read 6 bytes, make sure we have.
> 
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan at intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>

> ---
>  drivers/gpu/drm/i915/intel_dp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 62f82c4298ac..7dcc874b7d8f 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -3989,7 +3989,7 @@ int intel_dp_sink_crc(struct intel_dp *intel_dp, struct intel_crtc_state *crtc_s
>  		goto stop;
>  	}
>  
> -	if (drm_dp_dpcd_read(&intel_dp->aux, DP_TEST_CRC_R_CR, crc, 6) < 0) {
> +	if (drm_dp_dpcd_read(&intel_dp->aux, DP_TEST_CRC_R_CR, crc, 6) != 6) {
>  		ret = -EIO;
>  		goto stop;
>  	}
> -- 
> 2.14.1
> 


More information about the Intel-gfx mailing list