From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9DF3BC43334 for ; Thu, 9 Jun 2022 14:57:37 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1AB2E84407; Thu, 9 Jun 2022 16:56:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=csgraf.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 460E3843E1; Thu, 9 Jun 2022 16:56:25 +0200 (CEST) Received: from zulu616.server4you.de (mail.csgraf.de [85.25.223.15]) by phobos.denx.de (Postfix) with ESMTP id F198C843E2 for ; Thu, 9 Jun 2022 16:56:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=csgraf.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=agraf@csgraf.de Received: from [192.168.106.118] (dynamic-077-004-116-159.77.4.pool.telefonica.de [77.4.116.159]) by csgraf.de (Postfix) with ESMTPSA id 274AD60801E4; Thu, 9 Jun 2022 16:56:18 +0200 (CEST) Message-ID: <0de24f67-407b-c66f-c2b7-c0dfa87a7597@csgraf.de> Date: Thu, 9 Jun 2022 16:56:17 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH 6/6] video: Only dcache flush damaged lines Content-Language: en-US To: Heinrich Schuchardt Cc: Anatolij Gustschin , Simon Glass , Matthias Brugger , Da Xue , u-boot@lists.denx.de References: <20220606234336.5021-1-agraf@csgraf.de> <20220606234336.5021-7-agraf@csgraf.de> <9f526b53-ba84-c8ef-c94a-a921be3bcc10@canonical.com> From: Alexander Graf In-Reply-To: <9f526b53-ba84-c8ef-c94a-a921be3bcc10@canonical.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean On 07.06.22 10:00, Heinrich Schuchardt wrote: > On 6/7/22 01:43, Alexander Graf wrote: >> Now that we have a damage area tells us which parts of the frame buffer >> actually need updating, let's only dcache flush those on video_sync() >> calls. With this optimization in place, frame buffer updates - >> especially >> on large screen such as 4k displays - speed up significantly. >> >> Signed-off-by: Alexander Graf >> Reported-by: Da Xue >> --- >>   drivers/video/video-uclass.c | 49 ++++++++++++++++++++++++++++++------ >>   1 file changed, 42 insertions(+), 7 deletions(-) >> >> diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c >> index 9ac1974670..5661beea38 100644 >> --- a/drivers/video/video-uclass.c >> +++ b/drivers/video/video-uclass.c >> @@ -222,6 +222,39 @@ int video_damage(struct udevice *vid, int x, int >> y, int width, int height) >>   } >>   #endif >>   +#if defined(CONFIG_ARM) && !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) > > Why should this be ARM specific? I don't believe it should - and that's what the existing comment also says. But currently it is because the dcache API isn't available on all platforms; I'm merely preserving the existing logic :). Thanks, Alex