From patchwork Mon Oct 6 16:54:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 517 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759769756; bh=vulnzYL65Sh8881Yin2dtxaJ8hKPNnUK//V+p0NB0e0=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Z9Ei3xI2Uc75pXCtJY7KkWdD+mPGicqDaFV2QONGYjyIQe4MhOSQ2ZbDLLJvF87Vo yZxgd7hCxN3HlYIsqywJoUwNXwBur9iJLJFtUO2nxOrH+OfxQQXmKu68TUTedlb/RD 5ArGJRtABm+NDcz7jQ82r9avWGffFzxfa4o9RaDsnFXpdq1UMSg2WJfEIdL3FkfNmZ k+INxCcLlwT1S4dKnJ3/LSrHnalU7kxRkf6CnCg4nthV2H5TRKxTihCUGtrLcqaazQ CGFFReEzpQtohZYoRjoAfrpt+rsF4B1Xzu1spzuccnJ+TA4Ar/U8QriVUyt4R8Ugi4 ruId68A7TgwQQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A287D67F10 for ; Mon, 6 Oct 2025 10:55:56 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id av_nq-M3li2B for ; Mon, 6 Oct 2025 10:55:56 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759769756; bh=vulnzYL65Sh8881Yin2dtxaJ8hKPNnUK//V+p0NB0e0=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Z9Ei3xI2Uc75pXCtJY7KkWdD+mPGicqDaFV2QONGYjyIQe4MhOSQ2ZbDLLJvF87Vo yZxgd7hCxN3HlYIsqywJoUwNXwBur9iJLJFtUO2nxOrH+OfxQQXmKu68TUTedlb/RD 5ArGJRtABm+NDcz7jQ82r9avWGffFzxfa4o9RaDsnFXpdq1UMSg2WJfEIdL3FkfNmZ k+INxCcLlwT1S4dKnJ3/LSrHnalU7kxRkf6CnCg4nthV2H5TRKxTihCUGtrLcqaazQ CGFFReEzpQtohZYoRjoAfrpt+rsF4B1Xzu1spzuccnJ+TA4Ar/U8QriVUyt4R8Ugi4 ruId68A7TgwQQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 909E267EE5 for ; Mon, 6 Oct 2025 10:55:56 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759769754; bh=DTdyGq2Y6Xsnuv3xpN5eBr4AQliSMfqTKD8XX0oOdaE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gKvcf24nRrK75gDZOhNfVGiHxcCsQHE7LyvR0MRVK+382nG5UWlwYBWFGcI6rKpA2 rQSciP4MGox9qZAvx4Ua+WRvK4WP43GMGwfVsMG7bB9B9PpiGBI4DN0GUpCYMbN5DC 5R3mxeHiu/AOf02cz6ZW+1rWOTfc3ts5TeaFFQweUDOPtybrR9MzglpwGG1byDexaB V5wdnWCXleIA/PNFIDIBDvrN1OofeSWY05Atrn64dAJUDi2GTptPX+1fzA0vsYOPn6 8iEU4G0Loc8FLO5YrO+enQ5YBtJ1gC0uFtTvfQ0F7YCIJ4BGfm+gWDRkZDfU3S0ewm pyjmA/uMtwh3w== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 90E3867EE5; Mon, 6 Oct 2025 10:55:54 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id 7iyaCdTT-JwH; Mon, 6 Oct 2025 10:55:54 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759769748; bh=u/HHM/CyquY38FTF12wN3HapCqszGJr2BMlSceolB4E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tKYMMihLxmVlBt+XaNnd4IUi79iQz3raygKsNzafMWu4WidtYD3OXqoe4ezS0SEYT 2W/TZ/rwcIKFRUpCflkTZ/bjIkie2u7qMXO0a0VOzti6eUCyUF2OA1JcOY1BuBgzTd eENvL83CGSAXLbF9HpQsTy4ugQDTnbxyc6uQP1DAmDkuK4nCCrTjV/GOkoRCAOuEn9 fZLk73S8we/Y0wHGnxmUTzcNSh3kkc5Fljgan4cWsPsXbrf5YhqROXllK8iJGPFbaZ M/PULEAusu+9kX/2NUutGHUlm1akfqt9CwdC9a/qTvWCegz2/QuiKCRJAallnH77VJ f6txnqqzbWM9A== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 9C34567ECE; Mon, 6 Oct 2025 10:55:48 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Mon, 6 Oct 2025 10:54:46 -0600 Message-ID: <20251006165452.1675349-15-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251006165452.1675349-1-sjg@u-boot.org> References: <20251006165452.1675349-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: JTYKZPHFLXECAJ5MSMILNO5NDBLYCHRG X-Message-ID-Hash: JTYKZPHFLXECAJ5MSMILNO5NDBLYCHRG X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 14/14] expo: Support drawing only the dirty portion of an expo List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass To optimise drawing on the display, provide a new function which draws only the part of the display which is marked as dirty. Signed-off-by: Simon Glass --- boot/expo.c | 14 ++++++++++++-- include/expo.h | 12 ++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/boot/expo.c b/boot/expo.c index 8423a304eb0..8ec301d4dcf 100644 --- a/boot/expo.c +++ b/boot/expo.c @@ -300,7 +300,7 @@ static int render_mouse_pointer(struct expo *exp) return 0; } -int expo_render(struct expo *exp) +static int expo_render_(struct expo *exp, bool dirty_only) { struct udevice *dev = exp->display; struct video_priv *vid_priv = dev_get_uclass_priv(dev); @@ -320,7 +320,7 @@ int expo_render(struct expo *exp) if (!scn) return log_msg_ret("scn", -ENOENT); - ret = scene_render(scn, false); + ret = scene_render(scn, dirty_only); if (ret) return log_msg_ret("ren", ret); } @@ -335,6 +335,16 @@ int expo_render(struct expo *exp) return scn ? 0 : -ECHILD; } +int expo_render(struct expo *exp) +{ + return expo_render_(exp, false); +} + +int expo_render_dirty(struct expo *exp) +{ + return expo_render_(exp, true); +} + int expo_send_key(struct expo *exp, int key) { struct scene *scn = NULL; diff --git a/include/expo.h b/include/expo.h index fcc090d54f1..8ad7415b5a4 100644 --- a/include/expo.h +++ b/include/expo.h @@ -668,6 +668,18 @@ int expo_first_scene_id(struct expo *exp); */ int expo_render(struct expo *exp); +/** + * expo_render_dirty() - render the dirty portion of expo on the display + * + * Only the objects within the damage bbox are rendered. The others are + * assumed to be up-to-date. + * + * @exp: Expo to render + * Return: 0 if OK, -ECHILD if there is no current scene, -ENOENT if the + * current scene is not found, other error if something else goes wrong + */ +int expo_render_dirty(struct expo *exp); + /** * expo_arrange() - Arrange the current scene to deal with object sizes *