Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1056629pxk; Mon, 31 Aug 2020 08:38:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlYW33oCGu593oP/kBGGxnIGClLM0yTpadNISRGx4O/0WWklh5QRp+UdReUU2nY8t908Q/ X-Received: by 2002:a17:907:37b:: with SMTP id rs27mr1789286ejb.0.1598888330441; Mon, 31 Aug 2020 08:38:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598888330; cv=none; d=google.com; s=arc-20160816; b=CNi//sUPTYknn0GlS/hJDQODdirM6/mOXD3pvGq6YTRhJHMsy0CFftiOZkTVuehfdm kNAv2VtNxyZpzpyGUYrynWqvSPHi9AXO0ryfmuEMcBaMbr7q6eY9rZ763RKB5hvThVo5 C/AOfTpRzXxi98vq5QY/fBd6Z5a3/8s44gYrxZsfs4c9OqzI83DXWeLycONx6Kof8v5G FfsemzlE3X/dZ9w8hgs47b5tNZfwktJwg2I/v7SceX0Xs7ZxctFETBE7D275w/FfwLNk dOP/w5juWgfVliW9rQM4rJnygGt2g+BLCX4AqwVmVwCSfc08fppa9AAtg9A3M4tv5/n1 WbUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OstVxMRCGm8ooGuYnDLDGPfTbD4I0Rl2YEh/hbC7ntg=; b=onE5SK89dSIUHZH3kxRd1lokVUZJ/P0sk01uDfae/TrWN4WEUFMJU8HfnNGYKU69AP poD/BT9t2ADF7vQNph9CbEUnwgxLYQ+cOHWKyT/bqG6QzEIj+I9SiTqu74PQ16omr472 NJYtG/Ma4eOT64TSvIMYJrFTG67lxJfWfjzL4jUGbhue2vh4YeDGwWkphxX9x0w+12AH XndmFgHmrWM2de4Y1rW5uB/niLJcN0ndOKLtlZy84ecDeG9dx8FEaYjmFnmUiI1uYoy4 XeIQr+B3YGNTOX9YV1nY9gRl02/CUMvxm06DKr5LUw3vGebQgrE9FAq6QbY2KnBscaaj JdYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HmgoYRkP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n10si5002132edo.516.2020.08.31.08.38.27; Mon, 31 Aug 2020 08:38:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HmgoYRkP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728681AbgHaPgz (ORCPT + 99 others); Mon, 31 Aug 2020 11:36:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:40160 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728666AbgHaPad (ORCPT ); Mon, 31 Aug 2020 11:30:33 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 801CB21527; Mon, 31 Aug 2020 15:30:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598887833; bh=eDLK48bT73nERhUd4Rq9S2uiOR78bsJN6ZeA5PmgfgU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HmgoYRkPwwYRAvvTUCCwnUhZaBj2mRFLJOJqSL8Q5veK/IPo3xgnEliuIhutcOxMC dh9WtKd8tmgWOtAylDCmrQ97KKB5+dwpIaVbEPsx4IyTQ+y+qxjrb2nMHPz5iJB96U 1fU+8LBd17VN5rmnp+BQDtebKOTzP+yUTZvXJ8pE= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Wayne Lin , Hersen Wu , Rodrigo Siqueira , Alex Deucher , Sasha Levin , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.8 39/42] drm/amd/display: Retry AUX write when fail occurs Date: Mon, 31 Aug 2020 11:29:31 -0400 Message-Id: <20200831152934.1023912-39-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831152934.1023912-1-sashal@kernel.org> References: <20200831152934.1023912-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wayne Lin [ Upstream commit ef67d792a2fc578319399f605fbec2f99ecc06ea ] [Why] In dm_dp_aux_transfer() now, we forget to handle AUX_WR fail cases. We suppose every write wil get done successfully and hence some AUX commands might not sent out indeed. [How] Check if AUX_WR success. If not, retry it. Signed-off-by: Wayne Lin Reviewed-by: Hersen Wu Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c index e5ecc5affa1eb..5098fc98cc255 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c @@ -67,7 +67,7 @@ static ssize_t dm_dp_aux_transfer(struct drm_dp_aux *aux, result = dc_link_aux_transfer_raw(TO_DM_AUX(aux)->ddc_service, &payload, &operation_result); - if (payload.write) + if (payload.write && result >= 0) result = msg->size; if (result < 0) -- 2.25.1