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 5ECE8C43334 for ; Mon, 6 Jun 2022 23:44:50 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BB541842BF; Tue, 7 Jun 2022 01:44:05 +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 29E20842A3; Tue, 7 Jun 2022 01:43:50 +0200 (CEST) Received: from zulu616.server4you.de (mail.csgraf.de [85.25.223.15]) by phobos.denx.de (Postfix) with ESMTP id A3AC8842C6 for ; Tue, 7 Jun 2022 01:43:41 +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 localhost.localdomain (dynamic-077-002-002-002.77.2.pool.telefonica.de [77.2.2.2]) by csgraf.de (Postfix) with ESMTPSA id 1AFD660806C6; Tue, 7 Jun 2022 01:43:41 +0200 (CEST) From: Alexander Graf To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Anatolij Gustschin , Simon Glass , Matthias Brugger , Da Xue Subject: [PATCH 5/6] efi_loader: GOP: Add damage notification on BLT Date: Tue, 7 Jun 2022 01:43:35 +0200 Message-Id: <20220606234336.5021-6-agraf@csgraf.de> X-Mailer: git-send-email 2.32.1 (Apple Git-133) In-Reply-To: <20220606234336.5021-1-agraf@csgraf.de> References: <20220606234336.5021-1-agraf@csgraf.de> MIME-Version: 1.0 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 Now that we have a damage tracking API, let's populate damage done by UEFI payloads when they BLT data onto the screen. Signed-off-by: Alexander Graf Reported-by: Da Xue --- lib/efi_loader/efi_gop.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/efi_loader/efi_gop.c b/lib/efi_loader/efi_gop.c index 2c81859807..67286c9a60 100644 --- a/lib/efi_loader/efi_gop.c +++ b/lib/efi_loader/efi_gop.c @@ -33,6 +33,9 @@ struct efi_gop_obj { struct efi_gop ops; struct efi_gop_mode_info info; struct efi_gop_mode mode; +#ifdef CONFIG_DM_VIDEO + struct udevice *vdev; +#endif /* Fields we only have access to during init */ u32 bpix; void *fb; @@ -244,6 +247,10 @@ static __always_inline efi_status_t gop_blt_int(struct efi_gop *this, dlineoff += dwidth; } +#ifdef CONFIG_DM_VIDEO + video_damage(gopobj->vdev, dx, dy, width, height); +#endif + return EFI_SUCCESS; } @@ -583,5 +590,9 @@ efi_status_t efi_gop_register(void) gopobj->bpix = bpix; gopobj->fb = fb; +#ifdef CONFIG_DM_VIDEO + gopobj->vdev = vdev; +#endif + return EFI_SUCCESS; } -- 2.32.1 (Apple Git-133)