Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1053703rbb; Sun, 25 Feb 2024 17:36:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXg+UMtR/L1sP/jektI2C9FDfMfbcNUnEqqu+ViWTpG/RQOoSyY7gZ/KkUrrN36oSVEMLvkOO7LN7WiVjtGjMiZYR745YTc4P5FkGAz3g== X-Google-Smtp-Source: AGHT+IFfQq7ec2mg6Tq//9Ro0lqGRo9D2kAA3O2bBfqsa+jIPHTgX78wp0K64U5KnxBYTKCwJq22 X-Received: by 2002:ac8:4b70:0:b0:42e:71bf:fb01 with SMTP id g16-20020ac84b70000000b0042e71bffb01mr5380470qts.11.1708911375581; Sun, 25 Feb 2024 17:36:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708911375; cv=pass; d=google.com; s=arc-20160816; b=pcZohDXy9RdJSO46YtmQbcXcMZW1u0NR9hqydDGmiiYMJBiK69R9C2Cf0fRDEYSRjn xe2jHBsTvayux9HdVh6eS0GhflTbdA137rR+3BS6hovz6uUhHUMVYzbheS0JZJuXtybX xP5GRVgVfRku7lzg/rCn4aOzS+HEJwHE4hEZ0N7LpJfCgp5rCrxGl+65mB16cOeaqFfV ExS17FLM5GzPP9pDj/iWGMe4iaMoLq4jl1n14IgjE5nrCkrd+3d84fokK16CqbSXjlM5 IrIeCmPNI0i5Ol2pBGNejhyZnEJEZr4WjTOklzevkWCyoKoL/xzMfblCAZhtYMH0H7W0 h6tQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=IewfBOrPUxGnXhkfxZXG51CRbI5sZJWyaKDgJYLyteY=; fh=cAUhcFK1RCCxerqm6qDeI0+rOAY1wM41W2h4lc+6SHM=; b=RaNnfp0IxM/jGeLj5u/zvuyug6gGhpDFn0qzXClLQVpOMPyzRtSgb9CQMt1yu8JdT1 kq9M97isoiBTHX1ab0sgJ42MyiHs9EyfN8jyGWwwjeZ++aQ9MB6C3lAqDkcRYV3wgvYl ke2WMuJ3anTgSsb6dkltRyKEAOmlQkkG3yQEaZMt5DcyA/rRBBxZrHJjVALuBPjzn/kg XOkMT7FbDKHLLInSqVY5d9xmZBN8/kmpcIHza/RjntFqlSxUEK7QodF8f3P9EtfnYVyY VtD80/G/U5ojDlE3tbhmnA+E1XfOxB/40CcDbyYQ2Jw4CLyMXEJv85fsnrHtLyepcRpR Pxtg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=CQZAf5fN; 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-80383-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80383-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id b28-20020a05620a119c00b00787acdc4a56si4085815qkk.549.2024.02.25.17.36.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 17:36:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80383-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=CQZAf5fN; 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-80383-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80383-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 577781C210E5 for ; Mon, 26 Feb 2024 01:36:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E6137D53C; Mon, 26 Feb 2024 01:36:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="CQZAf5fN" 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 845B11C02; Mon, 26 Feb 2024 01:36:06 +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=1708911368; cv=none; b=VdpNmKzyNXZk8cM9kKKGE796BoReAc69aNlRWJJAWp4dWYUMmu2RS2kRqXNKpG0bDanyjzvPWXx+aHZCArIfbTtxjZ+5kVWUYqHbSi0CdsIzUBe3zxadDenYhr0X7Fs68jniVX4nnc09hjU6f1MfAxRBhP37x6pzAd2IcPdEazc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708911368; c=relaxed/simple; bh=pIL77mnn/86sOmS6cx8O/zi7Oig/gz4CTJF9Dejd9Yg=; h=Message-ID:Date:MIME-Version:Subject:From:To:CC:References: In-Reply-To:Content-Type; b=XmwLJtkzZftc7zLvz088a+Qpt+3cngWYIXnULnmnBz+Vgpyf8FuGRKTOqUxeBgxlTZSMzKgAUZK8Z33JZV7bfByDZUY0FmKO2BgKqd+Zhkmrlg2bGDcWQbqL0bXIcYt6XrLF65glPoIMHF2M4s06WCosVhCEeHpjgL/z2AjANCQ= 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=CQZAf5fN; 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 (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41Q0iWRZ003713; Mon, 26 Feb 2024 01:35:59 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:from:to:cc:references :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=IewfBOrPUxGnXhkfxZXG51CRbI5sZJWyaKDgJYLyteY=; b=CQ ZAf5fNiVapy9N7S26+7JIGucr7GykzpDSsujIlwll6yfwpEdzEVvO824cZoS5t/q MjohNa3MX9WUub/Dx5k0wBz21UXrhtprvNQhX10Pu4/uf2+vQkfNzVxH/uwb3GM5 QdDURZEL9W57zczRq8p8jNsXcOQoZvKFRbMgOuoQDoz/kEeyMMKRmblHAp7AY3FB w+49AawJxuUxUmVEJlGIPaUAtohbrUnFg5/ZGGQuiPL3+XauhcBVLdvS7CZelu+3 /xx9YSsZl3+arruf3VT/TN/6TZR39UMojuugSagwva3KbeoN1KGKqQJEREApZLCi I1ZWGlR1IDC3K7s7PO7A== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wf8p7jmfe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 26 Feb 2024 01:35:58 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 41Q1Zw8q006981 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 26 Feb 2024 01:35:58 GMT Received: from [10.110.76.211] (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; Sun, 25 Feb 2024 17:35:57 -0800 Message-ID: <3dd62c7e-e419-9ea2-b383-4c1c0959fecf@quicinc.com> Date: Sun, 25 Feb 2024 17:35:56 -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 v3 3/3] drm/msm/dpu: capture snapshot on the first commit_done timeout Content-Language: en-US From: Abhinav Kumar To: Dmitry Baryshkov , Rob Clark , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter CC: Steev Klimaszewski , , , , References: <20240225-fd-dpu-debug-timeout-v3-0-252f2b21cdcc@linaro.org> <20240225-fd-dpu-debug-timeout-v3-3-252f2b21cdcc@linaro.org> <33e38ac8-f41e-ca66-0b75-e72990691a80@quicinc.com> In-Reply-To: <33e38ac8-f41e-ca66-0b75-e72990691a80@quicinc.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit 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: vscv7Qt20e2p-cYt2sgrR05dFsyzW_Jz X-Proofpoint-GUID: vscv7Qt20e2p-cYt2sgrR05dFsyzW_Jz 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-25_29,2024-02-23_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 spamscore=0 impostorscore=0 lowpriorityscore=0 priorityscore=1501 suspectscore=0 adultscore=0 malwarescore=0 bulkscore=0 mlxlogscore=999 clxscore=1015 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2402260010 On 2/25/2024 11:57 AM, Abhinav Kumar wrote: > > > On 2/25/2024 6:12 AM, Dmitry Baryshkov wrote: >> 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(+) >> > > This looks fine now. Once we discuss patch 2, I can ack this. > Not entirely onboard with patch 2, but lets see how that code evolves Reviewed-by: Abhinav Kumar >> 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; >>           } >>