Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2020037rdb; Tue, 20 Feb 2024 14:40:51 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWCBoNS49TVcxg+f/bPKQdoctYRrVpv2fwcptQbAo+Pa8oGQQ4a9MNe5Lpd0F87dbg87El165DSeQsOmmEW2Vfn2vNsm8LCOhcX3NxlAw== X-Google-Smtp-Source: AGHT+IEXZ07/AcmWlMqe6sEYEOWfnRexYXnkuAgJV5IPNSr/bbf8Gf9GFNjeBfaib8+4VlpA118G X-Received: by 2002:a17:906:407:b0:a3e:a3dc:45c9 with SMTP id d7-20020a170906040700b00a3ea3dc45c9mr4385130eja.72.1708468850999; Tue, 20 Feb 2024 14:40:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708468850; cv=pass; d=google.com; s=arc-20160816; b=APg1lfe7uumzfm53JGK17yOoWuNcSXWNDQh2ePZ1DR+xRFL9c2qKP1TRQpJU6WY92u q3NFGIXyoOC5KUA0pGbho/P+fahzRQG5iKVtkh9+8R+PpA0m9UEKp4xYpBOy8jfHPcsr D/xZ0hqIPeI0LfMVaUsYYinJYupsN4w0qxYou0Ft66R5l013yTA8YuStgJC8lLDfLSL+ HCkK959hvbvcVUQo8T+3570m34LRD1T73QGlW/QgUFYfulSt10SXt0DDAcugT5JLILO/ iltjBOqHKhyHcj7eIt/QcVOeQKuKNjOseamrfCh7M5FBkXUVIFv7mS4FSim5E3ilgcQp Se8w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=DzgSSjiF7MER59HcHRdD0KQPa4VTP7amKqzcZKrkGcE=; fh=SRXwINMTyMhn95Yo13Nr7ACXmvfRoGGmFyexc+hTky0=; b=b/KCKYxg1B3VQmp2cCXPCD4kvBoctcMZNpf5kD9Di69CpYPj5NbDupgFM/GndRvBAR awHu3+RxiiDmd3e4qbHzzz/vH//zzEksBLIO/DtAN1P7/ntqVrEesFWdL4Z7gpRmAM33 7p+DKx8aCopGRWLaS4ghkrwbyhgfHdbrRR8F1/tqCieAQISH4lfYnfqe//uwNCrKN0/v jV+zoUtQSV5UasMY8Hdaij2NziDB2E2mFKWyYn8i+M9jh3licbkdvSLDQFe/XTewYp60 QOmhtvKZXfWYQlB5LoKymQsWiqBWMuUzhL+4RoCOSiEziJVc86Bslbu91qjX195SYI5t yc2A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="B4bN5/3K"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-73770-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73770-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id go30-20020a1709070d9e00b00a3e8a584562si2416338ejc.184.2024.02.20.14.40.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 14:40:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-73770-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="B4bN5/3K"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-73770-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73770-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.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 am.mirrors.kernel.org (Postfix) with ESMTPS id BDF211F22C25 for ; Tue, 20 Feb 2024 22:40:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6A238154426; Tue, 20 Feb 2024 22:40:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="B4bN5/3K" Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B7E0628DBD; Tue, 20 Feb 2024 22:40:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708468842; cv=none; b=LI+GCSBE4dnXmoYG7czDMlDoFtcBeesWmtQ8Br4AzBKnnsOe61xSZWbMFQYWKZBZBnkVGE+yxxrCGd1q+UPFWuY1cBcZjhbZqEdzlv2+23nUyQh0MpJLEerazh+SbyMDaxGe9SSEa6BolJ/tFRTdS7v8xLiNioFllHUHtgwRMSA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708468842; c=relaxed/simple; bh=X1ODGiav0Vne3qV9C0n6t3FDPsqqP9idzZxGgMBXT2M=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=Qw2PbQQqgbaCSF/2tS1GzI9BpnMitlSuCvheasvXk+TFCWD/vI6udEL785pis4uwheugH3axU2FMUCCWhAMd4304WdhhD47hlJOcpqc6xji+HGHLvA28X3NkHREZjWCqUwwxyU6Li5OciQEGwjCVkzqOLSKefP3o31YeHI0I1Aw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=B4bN5/3K; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41KMaWOp006858; Tue, 20 Feb 2024 22:40:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=DzgSSjiF7MER59HcHRdD0KQPa4VTP7amKqzcZKrkGcE=; b=B4 bN5/3Ko+uKUY4iWdMcs0gjISPVK33vQAAyVl7udYyUZzp/oaDv3EQ+r9T48eAaGZ a7t5tlBuFBu5KQSRVX1wRZtEi3ETcOvRysP61X4LpxfiFu26exKMcWg+QX8CqMey kcQ4XbRQjTAuSa8+VYUaZXZuquHEi8/2oDG1Y8u75alp99YbD/VDBwYhMdXebB7m zhXZvcERFTaCgy+RrvuQDTOno4QekBMgThIaB/Ow8k+NkaYZQ5PFKhpWUy8YVQAw /fT24ofbN3cdTnzmwdJlta+NYClIKa0j+NonYSBLqfhuBx1aRq6HPq7KN2NlKsX4 RM2VsRnfG0+/U/A824PA== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wd21s8cd0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 20 Feb 2024 22:40:32 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 41KMeVAd007363 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 20 Feb 2024 22:40:31 GMT Received: from [10.110.62.85] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Tue, 20 Feb 2024 14:40:31 -0800 Message-ID: <69d152d2-6a25-9ff4-ce6b-c4790247a661@quicinc.com> Date: Tue, 20 Feb 2024 14:40:30 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v2] drm/msm/dpu: make "vblank timeout" more useful Content-Language: en-US To: Dmitry Baryshkov CC: Rob Clark , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter , , , , References: <20240208-fd-dpu-debug-timeout-v2-1-9f907f1bdd87@linaro.org> <1cb90bff-ce5b-c6d1-a3df-24f6306f833a@quicinc.com> <63bba15b-6d8d-5ba8-d99d-8cd2dd763262@quicinc.com> From: Abhinav Kumar In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: t9crU5pOJDLNHXaEgNhV7Rf5up6tcKsS X-Proofpoint-GUID: t9crU5pOJDLNHXaEgNhV7Rf5up6tcKsS X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-20_06,2024-02-20_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 impostorscore=0 priorityscore=1501 adultscore=0 spamscore=0 lowpriorityscore=0 bulkscore=0 clxscore=1015 mlxscore=0 suspectscore=0 mlxlogscore=910 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2402200163 On 2/19/2024 3:52 AM, Dmitry Baryshkov wrote: > On Wed, 14 Feb 2024 at 22:36, Abhinav Kumar wrote: >> >> >> >> On 2/14/2024 11:20 AM, Dmitry Baryshkov wrote: >>> On Wed, 14 Feb 2024 at 20:02, Abhinav Kumar wrote: >>>> >>>> >>>> >>>> On 2/8/2024 6:50 AM, Dmitry Baryshkov wrote: >>>>> We have several reports of vblank timeout messages. However after some >>>>> debugging it was found that there might be different causes to that. >>>>> To allow us to identify the DPU block that gets stuck, include the >>>>> actual CTL_FLUSH value into the timeout message and trigger the devcore >>>>> snapshot capture. >>>>> >>>>> Signed-off-by: Dmitry Baryshkov >>>>> --- >>>>> Changes in v2: >>>>> - Added a call to msm_disp_snapshot_state() to trigger devcore dump >>>>> (Abhinav) >>>>> - Link to v1: https://lore.kernel.org/r/20240106-fd-dpu-debug-timeout-v1-1-6d9762884641@linaro.org >>>>> --- >>>>> drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 3 ++- >>>>> 1 file changed, 2 insertions(+), 1 deletion(-) >>>>> >>>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c >>>>> index d0f56c5c4cce..a8d6165b3c0a 100644 >>>>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c >>>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c >>>>> @@ -489,7 +489,8 @@ static int dpu_encoder_phys_vid_wait_for_commit_done( >>>>> (hw_ctl->ops.get_flush_register(hw_ctl) == 0), >>>>> msecs_to_jiffies(50)); >>>>> if (ret <= 0) { >>>>> - DPU_ERROR("vblank timeout\n"); >>>>> + DPU_ERROR("vblank timeout: %x\n", hw_ctl->ops.get_flush_register(hw_ctl)); >>>>> + msm_disp_snapshot_state(phys_enc->parent->dev); >>>> >>>> >>>> There is no rate limiting in this piece of code unfortunately. So this >>>> will flood the number of snapshots. >>> >>> Well... Yes and no. The devcoredump will destroy other snapshots if >>> there is a pending one. So only the console will be flooded and only >>> in case when MSM_DISP_SNAPSHOT_DUMP_IN_CONSOLE is enabled. >>> >> >> Yes, true but at the same time this makes it hard to capture a good dump >> as potentially every vblank you could timeout so this destroy/create >> cycle wont end. > > Excuse me, maybe I miss something. On the first timeout the snapshot > is created. It is held by the kernel until it is fully read out from > the userspace. Other snapshots will not interfere with this snapshot. > For every new snapshot a new devcoredump device will be created which should remain till it has been read. But now this will be created every blank. IMO, this is really too much data for no reason. Subsequent vblank timeouts are not going to give any new information compared to the existing snapshot of the first vblank timeout thats why we should just create the snapshot when the first error happens and stop. For other frame done timeouts, infact subsequent timeouts without any sort of recovery in between are quite misleading because hardware was already not able to fetch the previous frame so it will most likely not fetch the next one either till it has recovered. Typically thats why these vblank timeouts happen in a flurry as the hardware never really recovered from the first timeout. > Or are you worried that snapshotting takes time, so taking a snapshot > will also interfere with the vblank timings for the next vblank? > Yes this is another point.