diff mbox series

[v3,5/7] efi_loader: GOP: Add damage notification on BLT

Message ID 20221230195828.88134-6-agraf@csgraf.de
State Superseded
Delegated to: Anatolij Gustschin
Headers show
Series Add video damage tracking | expand

Commit Message

Alexander Graf Dec. 30, 2022, 7:58 p.m. UTC
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 <agraf@csgraf.de>
Reported-by: Da Xue <da@libre.computer>

---

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(+)

Comments

Heinrich Schuchardt Dec. 30, 2022, 8:20 p.m. UTC | #1
On 12/30/22 20:58, Alexander Graf wrote:
> 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 <agraf@csgraf.de>
> Reported-by: Da Xue <da@libre.computer>
>
> ---
>
> 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;
>   	}
>

Hello Alexander,

Please, do not call video_damage() for EfiBltVideoToBltBuffer. Otherwise
looks good to me.

You somehow missed to CC Ilias, cf. scripts/get_maintainer.pl.

Best regards

Heinrich

> +	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;
>   }
diff mbox series

Patch

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;
 }