Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp451814pxb; Thu, 9 Sep 2021 04:55:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydCVDE9sJyM3IDZVtQBedvCKEcNgXfN+zhRBZOZwbQWx/XXdmhARY7vKC/qwzWQuG5AFer X-Received: by 2002:a17:906:720e:: with SMTP id m14mr2972022ejk.500.1631188553779; Thu, 09 Sep 2021 04:55:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631188553; cv=none; d=google.com; s=arc-20160816; b=l+vH/WwYszxob6rMS2ebV54LwKvDDSgr/4sZB4wXNeDeZhD6LYYofwM4b6hXLKGA5K Sz7/q9L5N03B2HWLB9TLNHGTJ/9Q1+RPL6NSQmGr5Ny4RybxDbIHle/nILQoH8Lg9eJn 2Ef9dAWup6CuEnwPtvUoGoUtJ2gVM5f921cDEC0D/PJ6VpWMoM+60hr7wTl5p0vLJjk3 7nMx4FdVYx1gIDg/JW2vG1iTPWLXDTeSGEvmN47P1tkvv4UgRgRk+MmLkeQJgXy/1THJ kAgLAepeRBLr56dZxr+/1wqnWZa1qgWxc6rE/w+ZlE+38ogauWtLMVa56Z2FlwY1RK+b 1mZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dZ21RVxBf3waDvGM1Qm2DF60q3uxP788EBc1bkC05H0=; b=I4MljzZgDWco4kwaTQih8nDqzVccY7WBgHvDCnQiVCyCwL0FB3YDv7LxpX41tDvh/G 8g8ptKtD9GMdvytevGRUar7l/y65dGY/Q8KzzqY/4lJcPm2K4AIup+LIHKTkPUgcCLwx fg+2WQ5nq1luPLtmb8GVlHeAw/uSaEXLqAmKKhabuMFcAH+K4XKP8Ye6TD98janW3jWY VJYPMTvGiGMvfAzkpXD6K2lQF7W8bie2i/Xug/qAZ5g0IGiu298s37z2t4jRWBJKQrOj DCph0NxGXOTmKqoKEYZ8uS39OMaopRwqJmDT/3G4RMf+S1sjSpCtzCaQPVhezCkJBou0 ImSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YgwnaM6P; 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 a10si1837534ejf.122.2021.09.09.04.55.29; Thu, 09 Sep 2021 04:55:53 -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=k20201202 header.b=YgwnaM6P; 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 S243813AbhIILyZ (ORCPT + 99 others); Thu, 9 Sep 2021 07:54:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:53686 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240632AbhIILvh (ORCPT ); Thu, 9 Sep 2021 07:51:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EAF1761357; Thu, 9 Sep 2021 11:44:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631187853; bh=0ffYMfdpHIDmaWPEEAKeCUH0FGyny8eVV9zObef2Gxc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YgwnaM6PhWReDxt/KNqLv8GDV+RUwM5Ls+cFQ1hksMMJOLA0QN3ML5RIc8ELoIPQB zlSk9UtY42sBf3VzFHgwJhCvXYLroVc85s0zhPDzvZKQgXu9oYjddWezMxPZU1oBDr Arzhm6LjMTdC/jVIMmVhv9rp4JYxNsmPLKCxtah2ykrAkSmLW3828JDmq+2Gaycie4 fK9ksplIkNozypfIf9NIMeAam6WBgk52NxJE0j64jcq5l7qlTKM2n8ayTgWqT6cyq4 VZ/Z9bx9Qfojqnyo/JUHeQLkU/5yXe5v7BZfT5Rbl1i8oGdN0f0G5k+nowhjtkPJN8 NcjUOtCPxsuCg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Kuogee Hsieh , Stephen Boyd , Rob Clark , Sasha Levin , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.14 143/252] drm/msm/dp: reset aux controller after dp_aux_cmd_fifo_tx() failed. Date: Thu, 9 Sep 2021 07:39:17 -0400 Message-Id: <20210909114106.141462-143-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210909114106.141462-1-sashal@kernel.org> References: <20210909114106.141462-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kuogee Hsieh [ Upstream commit 0b324564ff74fa0556002be8fbbace556b9b2ad0 ] Aux hardware calibration sequence requires resetting the aux controller in order for the new setting to take effect. However resetting the AUX controller will also clear HPD interrupt status which may accidentally cause pending unplug interrupt to get lost. Therefore reset aux controller only when link is in connection state when dp_aux_cmd_fifo_tx() fail. This fixes Link Layer CTS cases 4.2.1.1 and 4.2.1.2. Signed-off-by: Kuogee Hsieh Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1628196295-7382-4-git-send-email-khsieh@codeaurora.org Signed-off-by: Rob Clark Signed-off-by: Sasha Levin --- drivers/gpu/drm/msm/dp/dp_aux.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/msm/dp/dp_aux.c b/drivers/gpu/drm/msm/dp/dp_aux.c index 4a3293b590b0..eb40d8413bca 100644 --- a/drivers/gpu/drm/msm/dp/dp_aux.c +++ b/drivers/gpu/drm/msm/dp/dp_aux.c @@ -353,6 +353,9 @@ static ssize_t dp_aux_transfer(struct drm_dp_aux *dp_aux, if (!(aux->retry_cnt % MAX_AUX_RETRIES)) dp_catalog_aux_update_cfg(aux->catalog); } + /* reset aux if link is in connected state */ + if (dp_catalog_link_is_connected(aux->catalog)) + dp_catalog_aux_reset(aux->catalog); } else { aux->retry_cnt = 0; switch (aux->aux_error_num) { -- 2.30.2