Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2721480pxb; Tue, 21 Sep 2021 06:19:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzq/S/Yry9jyhpyiQSXXuHiaCsNmsLbTwWqgnHVp6gZkLxp+PVJ+HqaFVSCx8vi/5s0R55r X-Received: by 2002:aa7:d796:: with SMTP id s22mr35050529edq.244.1632230398573; Tue, 21 Sep 2021 06:19:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632230398; cv=none; d=google.com; s=arc-20160816; b=ZOIU0QHHLwgZWy2cldA6i60YRs1qa+RlmEHeFpGjcLrDhRZfB2xKJ6gdJIijWGFw8x 6QVa8h3/l/jUfDaFk2GbSHhP1nPTWsz5D1p86FwB1ssJ0iyKUdEi/nx0V6sX4tPLN+ph ZupJYuJMsLbc7dwZJZ0ivgUhax+6bAs3sthGQXdzwKtM/stZpBO9pIj5I3/yT7oSb5ZA dGUuh+grKSM0UndeOWxl41hG3Fvf3AI5W32BvKpM1LW9wrf5ZqozqLlNQjq3IWxANkRP dKSMWZepMhgpx+soPolaz39N3ntCKBfN68U12jh6cDxufZBLSRbxH8GJfAMOUC6INEt0 3A3A== 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=K9nzRjkPcT6tyjh5OxoapjObehuySF8AuggkFb07qzE=; b=tWXgkAwoAUrQHDlAAiWynRXOawuvCQGTrC5QSOxlr+YJMkRIHcphJbG48Svkts0Ftm Xpm3rmH8MsaSaS0Rp+iLWAosoUXR6bjkmBDZT7RkgdBWZN60oVk1/OnSBNafKuIE3jb6 hhNieiVDA97zfRN1QM1Acm7MghGVS/hp0PHQg6ZTHk7nr+4RcAAhI5TTXDkxlJciNyMA DNoSL+mCnVVu1wZpLYs1yQgUWvi2ShHWvXhRAhQcTkX0luZDthPPZiQWIcg9mywMKgYi A3Pi/vyIoJ95+d3XzzwPOusIq5GpYSesgHChzwgP3gBpNouWySMctWz0eqMaLWGTLkCt HV1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RiHl2+Ym; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z5si13297720ejl.639.2021.09.21.06.19.30; Tue, 21 Sep 2021 06:19:58 -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=@kernel.org header.s=k20201202 header.b=RiHl2+Ym; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232953AbhIUNRB (ORCPT + 99 others); Tue, 21 Sep 2021 09:17:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:45284 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231658AbhIUNRA (ORCPT ); Tue, 21 Sep 2021 09:17:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 47369611BD for ; Tue, 21 Sep 2021 13:15:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632230132; bh=iZqPsCMg2X8Aef7G1+KUsPh8b0qsPVUuFvS5wZqe3BM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=RiHl2+YmmS2iTLX8VB3ByxLW7a5rCW/rzAKFF3JQNG2I5c+o1rlvkMdZcx8yu+NYY ODGdkpsj9NigjFKSquD3f1TK/6DAx9ANUla+72pXsJvnLVDkLzjtHKYIoNGK+VbAPx HPSkUfRo94MOglM9BUe1mrAlwq/a9PFs7JRJeyIVi9T68Jh7QT+PWDF2Tyo7hLKaRg e4CYVXHpzp0hhmOo0SeCJP57AlAf7kLOsCk1STARc1EIHFiX7q/bq2HV0+PZ4Yxug9 3te0MpviijLkigJ3MASCBp8NCC9BnoujMHda+v2RCIgFcZ9opLC/HLB9/6N/AwfHKc URI+tHkN+Qd8Q== Received: by mail-ed1-f54.google.com with SMTP id v5so72613395edc.2 for ; Tue, 21 Sep 2021 06:15:32 -0700 (PDT) X-Gm-Message-State: AOAM5317oHIp6ReReW9Po5DH4BdUIc3YEneHgT1pJkjtCx1IPiPQv8nW Wy+sGywsA/eFeE3k8dYUm4fGHe70k0orYxjBWg== X-Received: by 2002:a17:907:995a:: with SMTP id kl26mr35090782ejc.6.1632230052399; Tue, 21 Sep 2021 06:14:12 -0700 (PDT) MIME-Version: 1.0 References: <20210808234733.14782-1-chunkuang.hu@kernel.org> In-Reply-To: From: Chun-Kuang Hu Date: Tue, 21 Sep 2021 21:14:01 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 0/4] CMDQ refinement of Mediatek DRM driver To: Enric Balletbo Serra Cc: Chun-Kuang Hu , 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, 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/linux.= 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" 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 > > >