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 73E7AC43334 for ; Thu, 9 Jun 2022 23:00:46 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 31F57843FF; Fri, 10 Jun 2022 00:59:46 +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 25864843DD; Fri, 10 Jun 2022 00:59:34 +0200 (CEST) Received: from zulu616.server4you.de (mail.csgraf.de [85.25.223.15]) by phobos.denx.de (Postfix) with ESMTP id 0197D843A1 for ; Fri, 10 Jun 2022 00:59:25 +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-004-116-159.77.4.pool.telefonica.de [77.4.116.159]) by csgraf.de (Postfix) with ESMTPSA id 559566080235; Fri, 10 Jun 2022 00:59:25 +0200 (CEST) From: Alexander Graf To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Anatolij Gustschin , Simon Glass , Matthias Brugger , Da Xue Subject: [PATCH v2 5/7] efi_loader: GOP: Add damage notification on BLT Date: Fri, 10 Jun 2022 00:59:19 +0200 Message-Id: <20220609225921.62462-6-agraf@csgraf.de> X-Mailer: git-send-email 2.32.1 (Apple Git-133) In-Reply-To: <20220609225921.62462-1-agraf@csgraf.de> References: <20220609225921.62462-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 --- v1 -> v2: - Remove ifdefs from gop --- lib/efi_loader/efi_gop.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/efi_loader/efi_gop.c b/lib/efi_loader/efi_gop.c index 2c81859807..ff08e97d93 100644 --- a/lib/efi_loader/efi_gop.c +++ b/lib/efi_loader/efi_gop.c @@ -33,6 +33,7 @@ struct efi_gop_obj { struct efi_gop ops; struct efi_gop_mode_info info; struct efi_gop_mode mode; + struct udevice *vdev; /* Fields we only have access to during init */ u32 bpix; void *fb; @@ -244,6 +245,9 @@ static __always_inline efi_status_t gop_blt_int(struct efi_gop *this, dlineoff += dwidth; } + if (IS_ENABLED(CONFIG_DM_VIDEO)) + video_damage(gopobj->vdev, dx, dy, width, height); + return EFI_SUCCESS; } @@ -481,9 +485,9 @@ efi_status_t efi_gop_register(void) u64 fb_base, fb_size; void *fb; efi_status_t ret; + struct udevice *vdev = NULL; #ifdef CONFIG_DM_VIDEO - struct udevice *vdev; struct video_priv *priv; /* We only support a single video output device for now */ @@ -582,6 +586,7 @@ efi_status_t efi_gop_register(void) gopobj->info.pixels_per_scanline = col; gopobj->bpix = bpix; gopobj->fb = fb; + gopobj->vdev = vdev; return EFI_SUCCESS; } -- 2.32.1 (Apple Git-133)