Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp212249rdb; Fri, 6 Oct 2023 00:40:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHD9yoDOdNCJw17rnKgZM48xvOMRiynn8lmkHxyE37QJYUsLlytk19wM8WWxCWO+pDTbfXh X-Received: by 2002:a17:902:e885:b0:1b0:f8:9b2d with SMTP id w5-20020a170902e88500b001b000f89b2dmr9294702plg.29.1696578039505; Fri, 06 Oct 2023 00:40:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696578039; cv=none; d=google.com; s=arc-20160816; b=zVDSY0FJeNcrjJv0mG6C+qm0QO1L418RN04oHlml74OGsdezsEcVYYWJPVvepG1Evr yac9/EX20jdKgJyKhvpW1N1eiCgAjUz/M7EjVDYob5BLXkX70BcLavX7ZqvfKUORJWur C8E+uLoMQSYk3zHJsww5gTJ04PbNVevrSMj2kareYKcQswxvfNLYNakwm20o4Z2nyJ6c rQ2q1fskDy3BGIDLkcwPMejBO2ynIAlog8g9zxN/k0qgrvr7OdyHE70ZBaBnPBW7OfzB F5EDqriw0SZseL7uVJ/0ctGV3vFrNUtlMMdJHZaIE8IDbKcuIga30KA3qkTX3vCCFBkv e1ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=93orfpqZDdf36gAkqWIQODvWhDa0xsK8NTO91hVC3Mg=; fh=kY3/KDC2qEzU7tuRfKV0Ke/m2LpBFtrYwW4wOL/Oepc=; b=kWks8rO62sUtvO8Iuy14KK2LZk1ymFzoVLz/6XsAgZSkJOKROY64cHP5JmAMlr/N9V aHg7xdweMn5YFqZewttZYvUzGIc5ScDvqZto8rY0RBPPDpZz8gZducjRJfHyluLUn3ue RbhnECjikOtA6xKlrHvBuv2D6moU9ZASRVLirbxHNOMVirXLjYUfAglUIjTu9u6hX+MW JgmDqPvjo6NxuZdTXjqZx+/nG7E4d6OZROVxXGGWdFuud9mF1VUfJSo+gEDA3yKxjgL3 eqaHX76RQ4Coe3Jned3a5lom+WMT2tIJFQT+2bs7f831j5VMSj3ropEYY7W6Bqz4k/Mc V2sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=gBfkQ0vu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id q16-20020a170902edd000b001c746bca05dsi2993655plk.69.2023.10.06.00.40.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 00:40:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=gBfkQ0vu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 109E2806532C; Fri, 6 Oct 2023 00:40:35 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231259AbjJFHkA (ORCPT + 99 others); Fri, 6 Oct 2023 03:40:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230439AbjJFHjA (ORCPT ); Fri, 6 Oct 2023 03:39:00 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9BBEED; Fri, 6 Oct 2023 00:38:49 -0700 (PDT) X-UUID: 6025e944641b11eea33bb35ae8d461a2-20231006 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=93orfpqZDdf36gAkqWIQODvWhDa0xsK8NTO91hVC3Mg=; b=gBfkQ0vukrIp1fR6jrvJ8S72u3QlBYZPOJeMpVMLpRiRAbgEc+UWMRPZcKQ2fz0qS2UU2RcoQjpqgFeEbFwG+OJB1TW8oUfcDQ9/irgjYLgpS2hSDEoTzg4ckWsQRnphaVirgQhxLVFSjCwY3mPA2fJSrru8pk7JtVuGzP6+Hnc=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.32,REQID:734278b8-25fa-4f96-8bce-d59aa5b8f9a6,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:5f78ec9,CLOUDID:036ba6bf-14cc-44ca-b657-2d2783296e72,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1,SPR:NO, DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: 6025e944641b11eea33bb35ae8d461a2-20231006 Received: from mtkmbs14n1.mediatek.inc [(172.21.101.75)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 2108080839; Fri, 06 Oct 2023 15:38:43 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by MTKMBS14N2.mediatek.inc (172.21.101.76) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Fri, 6 Oct 2023 15:38:40 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Fri, 6 Oct 2023 15:38:40 +0800 From: Hsiao Chien Sung To: AngeloGioacchino Del Regno , "CK Hu" , Krzysztof Kozlowski , Matthias Brugger , Rob Herring CC: Conor Dooley , Philipp Zabel , David Airlie , Daniel Vetter , Chun-Kuang Hu , "Mauro Carvalho Chehab" , , , , , , Singo Chang , "Nancy . Lin" , "Jason-JH . Lin" , "Hsiao Chien Sung" Subject: [PATCH v7 21/23] drm/mediatek: Fix underrun in VDO1 when switches off the layer Date: Fri, 6 Oct 2023 15:38:29 +0800 Message-ID: <20231006073831.10402-22-shawn.sung@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20231006073831.10402-1-shawn.sung@mediatek.com> References: <20231006073831.10402-1-shawn.sung@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-AS-Result: No-10--1.397400-8.000000 X-TMASE-MatchedRID: r15/GZU7YAxQlz7zzALRPqKa0xB73sAA7yWPaQc4INS0rcU5V/oSe8Ht HEmxq9+Y8G/bfvdFXyUnOAFYLaUTjVm72EsAF82QA9lly13c/gGSiza26cvwNH5h6y4KCSJcje0 jgce+svLi8zVgXoAltsYlDcGKIsCCC24oEZ6SpSmb4wHqRpnaDhEa9sDDkr22LbG6i7W98dbd1i 4KTSE2f89R4TWA696sOygFfwAQBHQ1pTQn8aCaylDADnj2lwwmQemDxUAjl6nn/SfPR3Dh3Ema3 zYT97IFAYfQIAUhBayZvmCbKVb49sZL6x5U/HridGByp+zdaDg= X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--1.397400-8.000000 X-TMASE-Version: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-SNTS-SMTP: 873682982834D8809BE0F82F0A91BE21551E3F3F614D78253E6819C916A67B552000:8 X-MTK: N X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Fri, 06 Oct 2023 00:40:36 -0700 (PDT) Do not reset Merge while using CMDQ because it doesn't wait for frame done event as CMDQ does and could lead to underrun when the layer is switching off. Fixes: aaf94f7c3ae6 ("drm/mediatek: Add display merge async reset control") Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_disp_merge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_disp_merge.c b/drivers/gpu/drm/mediatek/mtk_disp_merge.c index e525a6b9e5b0..22f768d923d5 100644 --- a/drivers/gpu/drm/mediatek/mtk_disp_merge.c +++ b/drivers/gpu/drm/mediatek/mtk_disp_merge.c @@ -103,7 +103,7 @@ void mtk_merge_stop_cmdq(struct device *dev, struct cmdq_pkt *cmdq_pkt) mtk_ddp_write(cmdq_pkt, 0, &priv->cmdq_reg, priv->regs, DISP_REG_MERGE_CTRL); - if (priv->async_clk) + if (!cmdq_pkt && priv->async_clk) reset_control_reset(priv->reset_ctl); } -- 2.18.0