Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp163665rdb; Wed, 14 Feb 2024 16:51:46 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW7v0Sm1lwz3oQAa68Lr05pmcIYantug82li37xChataQIL5sg2cT10T7JlbkdoygomypqG6hQESqdtsfPDW4lGW5d0mMSPI5J/KpH0vg== X-Google-Smtp-Source: AGHT+IFuaCnyE5HrYBx2YFo2HhXL7EF/XavH5MQwfdqkzfHP+m4lkXh1/ZX/w0/+0DfJL3SCMK1C X-Received: by 2002:a17:90b:f85:b0:298:993e:9857 with SMTP id ft5-20020a17090b0f8500b00298993e9857mr4904856pjb.22.1707958306362; Wed, 14 Feb 2024 16:51:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707958306; cv=pass; d=google.com; s=arc-20160816; b=LTW3xSPBY8fu1yWDnNN1GNLeo5OKojiHUgRjlKvQaK76aUJlTU6V52tjrAbQ2vnkCT kt9nmxPuGAX2AfrJ0d+qvMkQit6tWiZPwlhLyeMZPth7cSZBniTKOjAUfqjXw2jopBlO lmv9fWG3FV8UtUzUhP22MF4XvFxesv0xAhQsKP6J0D8UXUR80otCyfawwivj4kyHovs7 DK5y5O5uRE35UQ2hmHe5aXl6R9qsBRmwmCVXjlTCpidr4iOr4cCeimNqIeUW7oZq50kC 114dOWpNdMb5nyN/hVSr9KLd8UM0dNJfRMwzzuCTjw2057hXizTGYMZayB8IoX3DQA9i wOKw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=VmU5djMcZq3un9NXE8bxt+eQx9GKGrESkVjr84+O68E=; fh=5fJ5HuOhQ8tDYrJs098Y1CAol/Fv56LtamixBAqCzME=; b=f2RgS24FAhJDgKUSvLd8uL9WUzcIZTqfnoa2K2ioWCR9oKOUPfw0LEJI+RKVxaoazm AMfswOwdWSsFGTuej0ZlM/HyM/jdotp2If/Z/GB01by90oln6rv1vywpkKWRSS4NwiW5 i0Ppv7K708GbAKbq6W+lS81tvae7F91zOAU33tAQGCiohthERz0SuuuBT5QKmSiT9PqW Y61wZbxnCpBkm2yi5FESmORyx0DZAViKpSLZN7W1Kbt/nrSx9y0v0kZGqFIxpqCRjhEh wO2uZaZ4zhATQ3LwVTB3VSQcZO6uhKDv9DgBlQPA1EJtldJGgdHxdttjI/UI9riRhoXE VAtg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bqp3Z+5F; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-66200-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66200-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id u6-20020a17090ae00600b00298ae73fd38si2020814pjy.134.2024.02.14.16.51.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 16:51:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66200-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bqp3Z+5F; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-66200-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66200-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 8B7AC2872F8 for ; Thu, 15 Feb 2024 00:51:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 48317D2E0; Thu, 15 Feb 2024 00:50:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bqp3Z+5F" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 70D4ABA4B; Thu, 15 Feb 2024 00:50:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707958213; cv=none; b=G1gi+CJZAZd8+MmEo9Gi+I19eP2RByxVNMGHsXM3NHZqTdWwUnl/PX4sh26WXB2K0Dfn2e5X+OsYwRldWy/c16Vi/IY3Uyx0C0+kag150Pa/RVvmZh8yXwfe4Emqea7UIXBtcJ9W53dKobTuXQidzg2cmN74XyW09aoe2F+tz0Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707958213; c=relaxed/simple; bh=TyYfmOPE/p3NSd8TeId10uLJdlRXk+ZcnArj63ZnB78=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=L0F30FFHcIqLr9ZzfCzG4qqtvWA04D2YLDVDOGSeguG5VOKYQ3sZnoJRP/wlTl+Rg4ESaOk1cklblT1hEPPABaSg5JJfjEUTL5T3yAHchcg/fcBOJD2tCmAOTXpsK8L+woFoAtLn82Wt7w/WcMN/kDETm44cOD36WFLt9GKSis8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bqp3Z+5F; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 52FCAC433F1; Thu, 15 Feb 2024 00:50:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707958213; bh=TyYfmOPE/p3NSd8TeId10uLJdlRXk+ZcnArj63ZnB78=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bqp3Z+5F53mWZq048afnxrfe7nQprPLQu+KBQWmQOH2mkqI5soXwZfsv99yhXWWta tb3QXoONODumGhTKQw1KTG+7Wo4q0nB/ywNPFI3f63X1ZzP7JW51J4MMGlt6HsNq4P 6nz7CMPGf4tG/tB119Sg0av2sKA7Opvr6vVclFqutXXz5KPsfgLGl4qigdh1LdIhJH NIq1RPhRv7OQZNNhTHK76OSiOSaLdQ8MOMKhV4Xyv7Ya4K65hDpLW3IxgpXfDIXCAp BDJjBTB9O9x0iwIlkX8tQlYVApISqlTPIAnmKKwY/1Eyz91MyxaCFXc/XTp3XbpsW9 kXm/K4qhZZD4g== From: Chun-Kuang Hu To: Matthias Brugger , AngeloGioacchino Del Regno , Mauro Carvalho Chehab , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Cc: Chun-Kuang Hu Subject: [PATCH 5/9] drm/mediatek: Drop calling cmdq_pkt_finalize() Date: Thu, 15 Feb 2024 00:49:27 +0000 Message-Id: <20240215004931.3808-6-chunkuang.hu@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240215004931.3808-1-chunkuang.hu@kernel.org> References: <20240215004931.3808-1-chunkuang.hu@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit For some client driver, it want to reduce latency between excuting previous packet command and next packet command, so append jump command to the end of previous packet and the jump destination address is the start address of next packet command buffer. Before next packet exist, the previous packet has no information of where to jump to, so append nop command first. When next packet exist, change nop command to jump command. For mediatek drm driver, it never has next packet, so appending nop command is redundant. Because cmdq_pkt_finalize() would append nop command, so change calling cmdq_pkt_finalize() to cmdq_pkt_eoc() to prevent append redundant nop command. Signed-off-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c index c729af3b9822..df693fa268ce 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c @@ -593,7 +593,7 @@ static void mtk_drm_crtc_update_config(struct mtk_drm_crtc *mtk_crtc, cmdq_pkt_clear_event(cmdq_handle, mtk_crtc->cmdq_event); cmdq_pkt_wfe(cmdq_handle, mtk_crtc->cmdq_event, false); mtk_crtc_ddp_config(crtc, cmdq_handle); - cmdq_pkt_finalize(cmdq_handle); + cmdq_pkt_eoc(cmdq_handle); dma_sync_single_for_device(mtk_crtc->cmdq_client.chan->mbox->dev, cmdq_handle->pa_base, cmdq_handle->cmd_buf_size, -- 2.34.1