Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp570305rdb; Wed, 17 Jan 2024 10:18:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IFnfMVoxhBYdmD/mzhLWXuj58oBYZRwcCUmkNSQ0/VkwTRwFhQ5PCTachI1sgEOiJWkFvmJ X-Received: by 2002:a17:90a:ce18:b0:290:61:b83e with SMTP id f24-20020a17090ace1800b002900061b83emr810364pju.16.1705515482319; Wed, 17 Jan 2024 10:18:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705515482; cv=pass; d=google.com; s=arc-20160816; b=D8DVcFvw7Xf5TrSutFz1oxowBzk0HcyxfC5rmDZitar1tHOH9Kit18MFC4+NviRG89 xYktsPR9DNcJkEmSUre7AJLj/yb5CaK8FWBWrB/OEUwM+vznD4a1/xAfctjjsJjanYEm GkSmSvp4yaZJlDJEoVZHXFAOr+7eKRzjnLYGrAsCOw7BKkodKb7Mh0bu0flYFv0s0VdN 28G9xJ6kvLKOf4j63Mbz4miKE461KAdXENgojQjvA59sdUsC9BUtnu44BFpfU4nr4Pzt hTbD5gOfWiJxzrbH0C5Ae9+WUfgw+DHNpiHiBTbUSZmh24WMBWbLqilk2dDTHkDPQ+sf QMew== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=mu6LdrycNNgQ08y3UW6a9CSmx2uDyBWPruWDy4r8EMA=; fh=BcQbdMDYKEj3jWqzAdBhNDO1dQXbF4mu4Zo1fW9VU/k=; b=LsUx3OLD2qkW+sfEC2ILNe2O88FUrxI5frvzAe9CXzOQAhgDnrKjOUCHOYgKA5WDDG uqFHzj5BN1qWlKNQWUl83WZEwRlf0Wtpmwv7aGqqPSSFiFgQUfDJrt3SR4LkqihTO89T NteCsoYltulZ0P8l1JwCXprv4Szs5xkNGCP1TIEMN8Jj0hVY71My0pmO+bYOfe6MSBaJ c6epArW8knDcFUkbSsSkBgIWXi2D1WNBqS6fv33PZo00FAcpc2SjdfezcIKj0HuaYPXz d4zwdc0lcJW9lx4QPZBx2eRntFSbzkoQAHkp6PvmxuSE4xR0X+owcA9FpeR4rw41WqKQ me0g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="NWVdi1j/"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-29310-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29310-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id n59-20020a17090a2cc100b0028cf4ff8cf3si5601871pjd.174.2024.01.17.10.18.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 10:18:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29310-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="NWVdi1j/"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-29310-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29310-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 031BA285889 for ; Wed, 17 Jan 2024 18:18:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0A44222F06; Wed, 17 Jan 2024 18:17:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NWVdi1j/" Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC59C22EE0 for ; Wed, 17 Jan 2024 18:17:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705515474; cv=none; b=euD9VQ0SgTGErZSkEZaKro7/lJGDSPvrzjl3Zz7WOLxv8SRaAZCSUKpF+zZk+fNXQSihs8iUB66ojv/gfDCTNQe2j5JOkWQ7RhbBjUImbUTvZ1z9+HxdRmYl29e/ZL9vOyF9YF/NzJv6JiiangbvTnuKJUkOjzWuPE/pWVblJDQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705515474; c=relaxed/simple; bh=WvQNTcu7rqbJv5yCi1GthboGGdsWbP3S2OLtyEk7dRE=; h=Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Google-Smtp-Source:X-Received:MIME-Version: References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc: Content-Type:Content-Transfer-Encoding; b=m9/ufDk/9And+qvnd/70OWhv3L5lbm/ZgrijzUyEBI0OJZE4mLlLGxcI9y9Djjg1V8xe/uVOdyFWsNNdMUh+yU7V4QD+rUUSuhDNkxnICIlEwID+0sKB1/kTNHWArNl95NelzuxunWljd78MZGOrqExkxRo5mBP7xVRIzVLSXmY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=NWVdi1j/; arc=none smtp.client-ip=209.85.221.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-3379e942685so849661f8f.0 for ; Wed, 17 Jan 2024 10:17:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705515471; x=1706120271; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=mu6LdrycNNgQ08y3UW6a9CSmx2uDyBWPruWDy4r8EMA=; b=NWVdi1j/dBE884TOX3WeNKKe8jFKngzRIHFrCFeKdx4UccbbrJSm6dkmyT97OBgRDD UY7LxgHJ4y0jxos/cguwGpVOnDD866kIB3UfUz0U+87pfw9pWebMLHNB9xLT3nhQs/rp qRZHKbry/oMSI4ilgcv+hV9DNHETy3TE/dIsE7CwdGpo1Lym3G4zfbTVthlB5wdP4eoQ 0BZOcbNrh3gyN7sbWDFAYUJgO8HxQG0oZlbto5cecNBD+xQ3DjTPU0vT1UyLnHueGrFa s9tzyLcgqhJToBMnzrbprCFkvBA69CUELmdxuxTVoFqu6HHupMITI07H6JEQ6lCwk357 0fCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705515471; x=1706120271; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mu6LdrycNNgQ08y3UW6a9CSmx2uDyBWPruWDy4r8EMA=; b=cSiwhp0QMOL8lXa9f93SRSdscEWWrlRTFZWRBI/M1sQi5vXYy8cP0KsQC54+8KUNon PenkP9AKVIVSL/fQR0JE3lHeG9W0pMukrU14+yctvJrHVKIFPQNBcdvKrjzsDExQLKoI NUtM+W9Y6RGtZ/3cbvRhVGbZcXCppmpZKI3BHU98jCMcXUqfN2f+kFreqmyukC3OtwbQ rnUldeDlQv4RpB/50hpNL9ndJa7MXvT7jOVIKktFY7h3BhCZz6lZKKrDJmKteova/qsc 1brUphr989K9/ni0nl2dkY2tXOqH6LbyjTD2nyzDrkHc+6tiLZ1yIvoOvv5o9WCmGMhv 9SYg== X-Gm-Message-State: AOJu0YzMBGHrQFPxqrRkWMhqer1wmCqHXhHN8hqPrYrh7hx5aOgQuvxq IXljq99s7A/XDVzxfwpoh3kcZiBOSQxLMKpYVJQ= X-Received: by 2002:adf:fec8:0:b0:337:c50c:27df with SMTP id q8-20020adffec8000000b00337c50c27dfmr1311116wrs.4.1705515470923; Wed, 17 Jan 2024 10:17:50 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240117031212.1104034-1-nunes.erico@gmail.com> <20240117031212.1104034-3-nunes.erico@gmail.com> In-Reply-To: <20240117031212.1104034-3-nunes.erico@gmail.com> From: Vasily Khoruzhick Date: Wed, 17 Jan 2024 10:17:24 -0800 Message-ID: Subject: Re: [PATCH v1 2/6] drm/lima: reset async_reset on pp hard reset To: Erico Nunes Cc: Qiang Yu , dri-devel@lists.freedesktop.org, lima@lists.freedesktop.org, Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Sumit Semwal , christian.koenig@amd.com, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jan 16, 2024 at 7:12=E2=80=AFPM Erico Nunes = wrote: > > Lima pp jobs use an async reset to avoid having to wait for the soft > reset right after a job. The soft reset is done at the end of a job and > a reset_complete flag is expected to be set at the next job. > However, in case the user runs into a job timeout from any application, > a hard reset is issued to the hardware. This hard reset clears the > reset_complete flag, which causes an error message to show up before the > next job. > This is probably harmless for the execution but can be very confusing to > debug, as it blames a reset timeout on the next application to submit a > job. > Reset the async_reset flag when doing the hard reset so that we don't > get that message. > > Signed-off-by: Erico Nunes Reviewed-by: Vasily Khoruzhick > --- > drivers/gpu/drm/lima/lima_pp.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/gpu/drm/lima/lima_pp.c b/drivers/gpu/drm/lima/lima_p= p.c > index a5c95bed08c0..a8f8f63b8295 100644 > --- a/drivers/gpu/drm/lima/lima_pp.c > +++ b/drivers/gpu/drm/lima/lima_pp.c > @@ -191,6 +191,13 @@ static int lima_pp_hard_reset(struct lima_ip *ip) > pp_write(LIMA_PP_PERF_CNT_0_LIMIT, 0); > pp_write(LIMA_PP_INT_CLEAR, LIMA_PP_IRQ_MASK_ALL); > pp_write(LIMA_PP_INT_MASK, LIMA_PP_IRQ_MASK_USED); > + > + /* > + * if there was an async soft reset queued, > + * don't wait for it in the next job > + */ > + ip->data.async_reset =3D false; > + > return 0; > } > > -- > 2.43.0 >