Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp835601rbb; Sun, 25 Feb 2024 06:13:46 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWpQOPeYu6o5EQzRFSBeXKqWsYqRYnSrkCxTu6trO5tAcC87SrsMBKDjIrrq+07NkC4W/3GBPaM4wGQ7Mg6wrVebWBpwWI3FoVm8cZLNg== X-Google-Smtp-Source: AGHT+IG/1ztlNKTg9LXUGxL3amR2bmnLY4fNl/HGRa5TR7cnhAR8kfEs5H5Me5JMsZS0dniTuqUP X-Received: by 2002:a05:6a21:1799:b0:1a0:e474:4407 with SMTP id nx25-20020a056a21179900b001a0e4744407mr6521957pzb.8.1708870425913; Sun, 25 Feb 2024 06:13:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708870425; cv=pass; d=google.com; s=arc-20160816; b=VX+zjrM8vwgXxlwuRZkWgOXLzk39X1Fg8mCUbZFycTIQvvILPLhukeE+CtWFqhfAcd olDV2rxnyb7Vq8HehQiPmn8VdALy4Sk6EF5EFDJ2uIORyA0AhOZb/evIndYmlrAtACzB +Is3ech7OKQa+xprR6Jh027vNqQUup8yUzoPSmNluBeqwrzNIp2NI3WCxu5F/dcdN+rV qWgMrdC7k74f5P4DIk+LCSYage15htleDdy2yuQo07RfTraPeDEXx+rMaQcHF/uDxCZy gj2FSHDf5Q7ZFPN00WHV2KEYUKgcwn1+KhhnrJhI3zsqjE4nFTHuQse5ZcdEVLwW/35n svCg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=W1EgeiS53bZU89cWnjtfqhJ0Xbfd+zvllvWyAXpOfzo=; fh=n9+73JIW8aoPBmaqZ7/JLhJTGhF02rDa4LjhOXnKTks=; b=KbCgh+NqfOawOO1zUQaOdjmYv8ZNW6nwSHZUxzJh6fOr1mjGIbO5p/gP2RRFb22SAm 4ukEOA7tm5Bw323k3BAhl5jTwTPr9+tV8bE44zgwVaCK0715N/NjWoHYxeOoXvvcW9tU PelX2wNMMvTz9tTvvd4Q4/9JgCxFrQysBIpxkC5eB9VNa98A2nwg9WiG+5g2XdctAY0b 0VlhNDkeTEFK0IAchzK5WY4+jPk8HDfypB4FZU4tsXHkHxHgLGLbIBH9mWpSjfWuR+yl lRgzf513p8yWHZcebmb7NNJaLQKgLEOhZhwt6zxpmehDNu2HTBxi2IOhSXZHdbP+0Pfd tHUQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BOuBoxCs; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-80091-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80091-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id t63-20020a638142000000b005d795f96f31si2247951pgd.152.2024.02.25.06.13.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 06:13:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80091-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BOuBoxCs; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-80091-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80091-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id E1FDDB20F8D for ; Sun, 25 Feb 2024 14:13:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2F085156C2; Sun, 25 Feb 2024 14:12:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="BOuBoxCs" Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (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 74405134CE for ; Sun, 25 Feb 2024 14:12:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708870375; cv=none; b=R895PVE6rDs2wRg34UoA6Nfx9mBL7GLTHSePWDUhVuASZP1qyxsaN45BhYukNFpgKrOnzUL6fsdAcIck0emogIZdiY5KVj59lkhsoov6HSqv4mYM5ivc82MvQ3f4hVHnSEFY7u8leU8Z1cLSkpX48OUyjwJ+POphdXK+X9+/gYY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708870375; c=relaxed/simple; bh=kq1wMGjAFgykNjnALUOfiwVmAiWVNLEAtKXn23jQRrA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=u3i7+MGbQiKqGvMWUVIPv/LJxTeLiXLxDXEuc0/asn3zKo39NR0hPt2+dqgLAa2/T8PyI361bBFE7530laloPrzac2jrKgJt69aXLaOGV+dJgKnQU3ik3X6cocJeKCEaPsxBt3N6ItMGN+if1iJ5QJ7XLlOHl+qZTyqbQQwYV3E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=BOuBoxCs; arc=none smtp.client-ip=209.85.208.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-2d2628e81b8so15871871fa.0 for ; Sun, 25 Feb 2024 06:12:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708870372; x=1709475172; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=W1EgeiS53bZU89cWnjtfqhJ0Xbfd+zvllvWyAXpOfzo=; b=BOuBoxCsWGVQvmsi66WqX9fJIewAxtDUUJFBsxQvaQJYC2wUiwly2Vmh7e82LmMzjI 6Yl/TGelB1E5ZzIYnMVmWfl8EjmqC/BetBPg3tYhZcSQZZRkd4sS7s7qHM/7MNMnkDuv nxzp1LAuvI1okCeT4qcKxlw9jrjpQZXP7Z4gvZCl0bpxad0/YjH31kfAAJpP5H2RvDDO ZeZLfy2v3MhaGwwyDdl/vipsoOnzT+dvn4jzLyHresgUxHdYbZaj5I9Lomv0W1dKcJpX OHWZOYf4AXIWiNPtaVBd77zQhoKqnl54eI/GSoVzmcRI8YZSmM8U96orRd8Wlo6xPp48 mnNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708870372; x=1709475172; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=W1EgeiS53bZU89cWnjtfqhJ0Xbfd+zvllvWyAXpOfzo=; b=rP/7JCD0pwlJtq4J2pOj3oCL/2k64iKVg/b84syNom6urLLdnXo5ifspU8tk7z8uZS J7CReQwet5Wj/notavGDCGq+ep9lST7qDm/fCWbQeGH3a8vexGzcDFYvnEwQJA+uR1Ea qr+0/8citCF5l+SE00442Pc/6lTTXMOEC0udXnhvCvurfQ3VNxxSTvW/pGaNlrXlctUT yLnG8cYYxLuwHF/y4f0ii04V0N7EnTBy9G3aRqAkOtKi6XZZF54MKtOqgW5dwuTb/xdT F+y4W02B3+p2ZWPkRlabpquU8iUokaq/r1ZSwCxVWsVVryZPjMb9JBV9yhsglb13LYal DmBw== X-Forwarded-Encrypted: i=1; AJvYcCVD2kX0iq7rs/hMhwbUogbYo1z9Dv/mXoETy/MeB4c2EuBuPYHU+P7JXHQtVe6ElxLZixMPB/n0iVLvPIit3t6MJHM7PSlsCoItqhBd X-Gm-Message-State: AOJu0Yy1hkgZ6egdL2nzGJ2IRYLpnv0Rk9tWjR8QnecpxXK6LmebLdZW Jy8ud0wZ/OTOVrYKzdYZs+aWyzCmbIWbzNPLcQCu+N3Ibm1AXGfm/m0B4N7eTAM= X-Received: by 2002:a05:6512:3087:b0:512:d7fb:8c8d with SMTP id z7-20020a056512308700b00512d7fb8c8dmr1562188lfd.23.1708870371781; Sun, 25 Feb 2024 06:12:51 -0800 (PST) Received: from umbar.lan (dzyjmhybhls-s--zn36gy-3.rev.dnainternet.fi. [2001:14ba:a00e:a300:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id w13-20020ac254ad000000b00512e5bd2296sm522931lfk.217.2024.02.25.06.12.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 06:12:51 -0800 (PST) From: Dmitry Baryshkov Date: Sun, 25 Feb 2024 16:12:48 +0200 Subject: [PATCH v3 3/3] drm/msm/dpu: capture snapshot on the first commit_done timeout Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240225-fd-dpu-debug-timeout-v3-3-252f2b21cdcc@linaro.org> References: <20240225-fd-dpu-debug-timeout-v3-0-252f2b21cdcc@linaro.org> In-Reply-To: <20240225-fd-dpu-debug-timeout-v3-0-252f2b21cdcc@linaro.org> To: Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter Cc: Steev Klimaszewski , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2131; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=kq1wMGjAFgykNjnALUOfiwVmAiWVNLEAtKXn23jQRrA=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBl20rfZatQwbsnIGDdcoW5gLJWbqK0DBCsltFny PS9SGAxgeOJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZdtK3wAKCRCLPIo+Aiko 1UitB/wITuYU5p6dOOSUv1JzfYEmwL/GKKF0SC4IbGLssbPmSgUySdE9DqjlCPM6rj5vaVRx1Bk p+/ypYmnmyncdrYoAno3IJVFcBQWctCe5DyU6JvmrLk6gHLN8r+cKk7HyvhoFeH7F+WB1+S+NAt TpOAXWCqaCGaCqzPgN+J1h3J8xbsKPKUqymyjbnVtdrjfIfGsFqA79FJpUi4MFpCzEJMfiZod/J G2VBYphZ86mzY1WNA/wJlD6UN/LU9J9UEfCF0l+qulZoZ3SES+Tz369iyyFMAu2HjMlPBv76zGv mUzVOA9EOlu5Yn4BVYOLhdWQOd3W4KpdLHpA3kAbEB4eED82 X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A In order to debug commit_done timeouts, capture the devcoredump state when the first timeout occurs after the encoder has been enabled. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index 30f349c8a1e5..3cae07bf0b9b 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -126,6 +126,8 @@ enum dpu_enc_rc_states { * @base: drm_encoder base class for registration with DRM * @enc_spinlock: Virtual-Encoder-Wide Spin Lock for IRQ purposes * @enabled: True if the encoder is active, protected by enc_lock + * @commit_done_timedout: True if there has been a timeout on commit after + * enabling the encoder. * @num_phys_encs: Actual number of physical encoders contained. * @phys_encs: Container of physical encoders managed. * @cur_master: Pointer to the current master in this mode. Optimization @@ -172,6 +174,7 @@ struct dpu_encoder_virt { spinlock_t enc_spinlock; bool enabled; + bool commit_done_timedout; unsigned int num_phys_encs; struct dpu_encoder_phys *phys_encs[MAX_PHYS_ENCODERS_PER_VIRTUAL]; @@ -1226,6 +1229,8 @@ static void dpu_encoder_virt_atomic_enable(struct drm_encoder *drm_enc, else if (disp_info->intf_type == INTF_DSI) dpu_enc->wide_bus_en = msm_dsi_wide_bus_enabled(priv->dsi[index]); + dpu_enc->commit_done_timedout = false; + mutex_lock(&dpu_enc->enc_lock); cur_mode = &dpu_enc->base.crtc->state->adjusted_mode; @@ -2436,6 +2441,10 @@ int dpu_encoder_wait_for_commit_done(struct drm_encoder *drm_enc) DPU_ATRACE_BEGIN("wait_for_commit_done"); ret = phys->ops.wait_for_commit_done(phys); DPU_ATRACE_END("wait_for_commit_done"); + if (ret == -ETIMEDOUT && !dpu_enc->commit_done_timedout) { + dpu_enc->commit_done_timedout = true; + msm_disp_snapshot_state(drm_enc->dev); + } if (ret) return ret; } -- 2.39.2