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 60ADDC4167B for ; Fri, 30 Dec 2022 20:00:24 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9027B85557; Fri, 30 Dec 2022 20:59:34 +0100 (CET) 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 BA7E68510E; Fri, 30 Dec 2022 20:58:43 +0100 (CET) Received: from zulu616.server4you.de (mail.csgraf.de [85.25.223.15]) by phobos.denx.de (Postfix) with ESMTP id CBF7F85553 for ; Fri, 30 Dec 2022 20:58:31 +0100 (CET) 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-095-117-127-254.95.117.pool.telefonica.de [95.117.127.254]) by csgraf.de (Postfix) with ESMTPSA id 78CEF60805C8; Fri, 30 Dec 2022 20:58:31 +0100 (CET) From: Alexander Graf To: u-boot@lists.denx.de Cc: Matthias Brugger , Heinrich Schuchardt , Anatolij Gustschin , Simon Glass , Da Xue Subject: [PATCH v3 5/7] efi_loader: GOP: Add damage notification on BLT Date: Fri, 30 Dec 2022 20:58:26 +0100 Message-Id: <20221230195828.88134-6-agraf@csgraf.de> X-Mailer: git-send-email 2.37.1 (Apple Git-137.1) In-Reply-To: <20221230195828.88134-1-agraf@csgraf.de> References: <20221230195828.88134-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.6 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 v2 -> v3: - Adapt to always assume DM is used --- lib/efi_loader/efi_gop.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/efi_loader/efi_gop.c b/lib/efi_loader/efi_gop.c index d1dc2f22d0..c80d307cbf 100644 --- a/lib/efi_loader/efi_gop.c +++ b/lib/efi_loader/efi_gop.c @@ -32,6 +32,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; @@ -243,6 +244,8 @@ static __always_inline efi_status_t gop_blt_int(struct efi_gop *this, dlineoff += dwidth; } + video_damage(gopobj->vdev, dx, dy, width, height); + return EFI_SUCCESS; } @@ -547,6 +550,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.37.1 (Apple Git-137.1)