Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp793692pxb; Thu, 23 Sep 2021 10:40:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWN6tYWbA1zm7jTo9CET8cTj79Xt2AG2gABnTmnw5yby3Kehe6fqnqhVS1903vv6M+J4w8 X-Received: by 2002:a17:906:cd19:: with SMTP id oz25mr6579788ejb.404.1632418829883; Thu, 23 Sep 2021 10:40:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632418829; cv=none; d=google.com; s=arc-20160816; b=TuEGFNj6eDwoNx12jDpzt25rE5fpuX1QWtR0i/lgcu2SSzQAmwyqRUiY3sB7rwnw5Y LbRhemdSIswsbwumsoO7ZPM4ZKyBM/idic0OaMTykaMCcD8Xd14Ptg7C72Nuf0QvjHo1 liMw7AzzIegHnb/rhPzQ47a0DH4e28dGTDTbmKrDZKHOtgtGl94t6TAvS/WXPuHlmy9a 2f86s6l5apdGWGdXFkT5eM7d6HJEUUcfx5psTR0miJsw5R+n6KvXU0f/oHsGXKKjUbxp Qt7CojWOZtlUmcMYcUAqDS97T31vJFTYI3FiPhX1Vncexn3YEwJVR/VGoA58aogcqoZz Wpqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=EgkHI1/87WDfYzGJHVb9uSE8ondAm9IZ1p7rxtfYoTA=; b=PiHF2D7KD5IzCtyJIS3GVjAowtF4017ZN8bcHtt6ntg1VzQmM8da4idFKBgdhX9J9Z w6eMXhtSb05iqWbw8a/BZ7QEcpFPrLLEHH5gut0glJO0pfOulgDPzinDbNsNGLTTjZgC Y1B7HKwKcDQ1fAPWh3FcYz3S7MJyd/ttqI8t0zcmexzY9ncyFYocWeMZTNAf33SQRkz3 Qm7m3QwtxyCChBkdPevO1BOmvgv0G9LI0R7bFGh6OrEH5s5FhG1PSLcW56OP1JKmepiD gxLp6z8orooXX5FzOT2zyp5JmWgoIrQcKf/YlDlhz2LRo+t8CenxbTs3TmhqABSxbgYz t1DQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=idG49OCy; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b21si7027009ejl.336.2021.09.23.10.40.04; Thu, 23 Sep 2021 10:40:29 -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=@gmail.com header.s=20210112 header.b=idG49OCy; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242148AbhIWQiD (ORCPT + 99 others); Thu, 23 Sep 2021 12:38:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242031AbhIWQh6 (ORCPT ); Thu, 23 Sep 2021 12:37:58 -0400 Received: from mail-oi1-x234.google.com (mail-oi1-x234.google.com [IPv6:2607:f8b0:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB91BC061574 for ; Thu, 23 Sep 2021 09:36:26 -0700 (PDT) Received: by mail-oi1-x234.google.com with SMTP id v10so10391664oic.12 for ; Thu, 23 Sep 2021 09:36:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=EgkHI1/87WDfYzGJHVb9uSE8ondAm9IZ1p7rxtfYoTA=; b=idG49OCyvw2XsrxgeWp7JIYA5MIGDaQADtUR/XHYoXs21cqMY7Ja0Sf5vm+n94vsYW E125f//+lcVc+h/6jjy+QPlyyma7fvCBoMPOjVq0R+oePyikDMpcGGvRcsMhe3re3ERl YNiLG7aOKJdgeh9JrhTR6Ch8qlhc87rX+VcR8AB9brCFih06yF5Xtm4JfAh2WCqOWgdH ZPFYmqsOj/1ioMkTasvEv1AE9XSHpjtuLDu8gkQ0ig5TREtT63mw8bK1no3cosNfsjj9 OjQr3fqVDmJp+em0WtdNSHOF55fuKUttxhJGc6yrRSlEHUxn93K3yyQ0JxMDmGFCG6NJ tLzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=EgkHI1/87WDfYzGJHVb9uSE8ondAm9IZ1p7rxtfYoTA=; b=OFgaL8nbS6S16Db/cC/35MSCaEeilDW3qsygj+v9e2KLZkZ2tHIfPUNiKFc1N3N29U EUeh0aOsj1qufAVeyar2iwDKY09OYBvXmgwxa262rK0Shz0FxhCf+4zaDQy+OR9eDytP WKVeZQU6Rg2SCbSH4pw4L2VnOANfhuK+PySPK8fESwr+j5PLtgF4ep97zzI+/bQKZSt8 Abz5WCTbWLq4aaXQyQmNJk76rrQlDx+H3vcqaJI4HbfsFGLXA5hrAqIGFSsubRS1NfjQ HfglmD9GDPH6nEa6YFzLLdSr5EC88msI9uwZzhGC+qTVVO9kcCKGgutBiv/o6lhIHFP3 2OEw== X-Gm-Message-State: AOAM5302isloKVBMLrfQ/7nG16mzlVdp4ixe3x8PmE8jMhExAadHsbca AhIQ1KVhFsKXO8LcncM37Q7OAraBL+jTPx2gz4i+XDbGO8k= X-Received: by 2002:a05:6808:1787:: with SMTP id bg7mr13811452oib.39.1632414985961; Thu, 23 Sep 2021 09:36:25 -0700 (PDT) MIME-Version: 1.0 References: <20210808234733.14782-1-chunkuang.hu@kernel.org> In-Reply-To: From: Enric Balletbo Serra Date: Thu, 23 Sep 2021 18:36:14 +0200 Message-ID: Subject: Re: [PATCH v2 0/4] CMDQ refinement of Mediatek DRM driver To: Chun-Kuang Hu Cc: Philipp Zabel , David Airlie , Daniel Vetter , Yongqiang Niu , linux-kernel , DRI Development , "moderated list:ARM/Mediatek SoC support" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Chun-Kuang, Missatge de Chun-Kuang Hu del dia dt., 21 de set. 2021 a les 15:15: > > Hi, Enric: > > Enric Balletbo Serra =E6=96=BC 2021=E5=B9=B49=E6=9C= =8821=E6=97=A5 =E9=80=B1=E4=BA=8C =E4=B8=8B=E5=8D=884:36=E5=AF=AB=E9=81=93= =EF=BC=9A > > > > Hi Chun-Kuang, > > > > (again without html format, sorry for the noise) > > > > Missatge de Chun-Kuang Hu del dia dj., 12 > > d=E2=80=99ag. 2021 a les 2:13: > > > > > > Chun-Kuang Hu =E6=96=BC 2021=E5=B9=B48=E6= =9C=889=E6=97=A5 =E9=80=B1=E4=B8=80 =E4=B8=8A=E5=8D=887:47=E5=AF=AB=E9=81= =93=EF=BC=9A > > > > > > > > These refinements include using standard mailbox callback interface= , > > > > timeout detection, and a fixed cmdq_handle. > > > > > > For this series, applied to mediatek-drm-next [1]. > > > > > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linu= x.git/log/?h=3Dmediatek-drm-next > > > > > > > These patches seem to break the display on the Acer Chromebook R 13 > > (MT8173) in the current mainline. After running a bisection it pointed > > me to the following commit > > > > commit f4be17cd5b14dd73545b0e014a63ebe9ab5ef837 > > Author: Chun-Kuang Hu > > Date: Sun Jul 4 15:36:48 2021 +0800 > > > > drm/mediatek: Remove struct cmdq_client > > > > Reverting this patch alone is not trivial, so I ended up reverting the > > full series, and I can confirm that reverting the full series makes > > the display work again. > > I think you could not just revert "drm/mediatek: Remove struct > cmdq_client", you should also revert the patches after it, such as > > "drm/mediatek: Clear pending flag when cmdq packet is done" > "drm/mediatek: Add cmdq_handle in mtk_crtc" > "drm/mediatek: Detect CMDQ execution timeout" > Yes, in fact I reverted: 9efb16c2fdd6 drm/mediatek: Clear pending flag when cmdq packet is done bc9241be73d9 drm/mediatek: Add cmdq_handle in mtk_crtc 8cdcb3653424 drm/mediatek: Detect CMDQ execution timeout f4be17cd5b14 drm/mediatek: Remove struct cmdq_client c1ec54b7b5af drm/mediatek: Use mailbox rx_callback instead of cmdq_task_cb Without these patches 5.15-rc2 works again on my platform. The commit 'c1ec54b7b5af drm/mediatek: Use mailbox rx_callback instead of cmdq_task_cb' alone introduces lots of warnings in the kernel WARNING: CPU: 0 PID: 0 at drivers/mailbox/mtk-cmdq-mailbox.c:198 cmdq_task_exec_done+0xb8/0xe0 I think is just a leftover or the mentioned warning, but that confused me a bit doing the bisection. Then, after commit 'f4be17cd5b14 drm/mediatek: Remove struct cmdq_client' my system simply gets stuck. For now I don't see any obvious mistake but will dig further. Can I ask you in which platform did you test? And if you can double check if your platform is broken too in current mainline? Thanks, Enric > If "drm/mediatek: Remove struct cmdq_client" is the patch cause > display abnormal, I think you could compare code w/ and w/o this > patch. Focus on the value accuracy, such as cmdq_cl and cmdq_chan. And > focus on the flow accuracy, such as mtk_drm_crtc_update_config() and > ddp_cmdq_cb(). If this could not find the problem, I think the latest > way is to break this patch into small patches, changes little in each > small patches and we could finally find out the problem. > > Regards, > Chun-Kuang. > > > > > Unfortunately, after the merge window, different things broke for this > > device, and I didn't finish isolating them, and it is not clear to me > > yet whether the logs I'm getting are useful for this specific issue or > > not. Basically with this series merged the kernel seems to be stuck, > > and the display is not working. Latest message is > > > > [ 12.329173] mtk-iommu 10205000.iommu: Partial TLB flush timed out, > > falling back to full flush > > > > Without the series, the kernel goes far and display works, however > > there are other issues affecting the cros-ec, but I think that's > > another issue. > > > > I'll try to dig a bit more, but, meanwhile, if you have any idea > > please let me know. > > > > Thanks, > > Enric > > > > > > > Regards, > > > Chun-Kuang. > > > > > > > > > > > Changes in v2: > > > > 1. Define mtk_drm_cmdq_pkt_create() and mtk_drm_cmdq_pkt_destroy() > > > > when CONFIG_MTK_CMDQ is reachable. > > > > > > > > Chun-Kuang Hu (4): > > > > drm/mediatek: Use mailbox rx_callback instead of cmdq_task_cb > > > > drm/mediatek: Remove struct cmdq_client > > > > drm/mediatek: Detect CMDQ execution timeout > > > > drm/mediatek: Add cmdq_handle in mtk_crtc > > > > > > > > drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 110 ++++++++++++++++++++= ---- > > > > 1 file changed, 91 insertions(+), 19 deletions(-) > > > > > > > > -- > > > > 2.25.1 > > > >