[PATCH 0/3] hw/display/exynos4210_find: Clamp windows to screen

Peter Maydell posted 3 patches 2 weeks, 5 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260706173324.804340-1-peter.maydell@linaro.org
Maintainers: Peter Maydell <peter.maydell@linaro.org>
hw/display/exynos4210_fimd.c | 54 ++++++++++++++++++++++++++----------
1 file changed, 39 insertions(+), 15 deletions(-)
[PATCH 0/3] hw/display/exynos4210_find: Clamp windows to screen
Posted by Peter Maydell 2 weeks, 5 days ago
The exynos4210_fimd device has a setup where the guest can program
both the overall size of the LCD screen and also the corners of
"windows" that define where the guest memory should appear on that
screen. The current code assumes that the guest is sensible and
puts the corners of windows inside the overall screen. If it doesn't
then we will try to copy data to an address that is outside the
interfal framebuffer memory that we allocate to be the size of the
screen.

This patchset clamps the window coordinates to be within the screen
size. Patches 1 and 2 are simple refactorings to make the third
patch easier to read.

This fixes https://gitlab.com/qemu-project/qemu/-/work_items/3795

thanks
-- PMM

Peter Maydell (3):
  hw/display/exynos4210_fimd: Factor out finding screen width/height
  hw/display/exynos4210_fimd: Pass width to draw_line functions
  hw/display/exynos4210_fimd: Clamp windows to screen size

 hw/display/exynos4210_fimd.c | 54 ++++++++++++++++++++++++++----------
 1 file changed, 39 insertions(+), 15 deletions(-)

-- 
2.43.0
Re: [PATCH 0/3] hw/display/exynos4210_find: Clamp windows to screen
Posted by Peter Maydell 6 days, 1 hour ago
Ping for code review, please?

thanks
-- PMM

On Mon, 6 Jul 2026 at 18:33, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> The exynos4210_fimd device has a setup where the guest can program
> both the overall size of the LCD screen and also the corners of
> "windows" that define where the guest memory should appear on that
> screen. The current code assumes that the guest is sensible and
> puts the corners of windows inside the overall screen. If it doesn't
> then we will try to copy data to an address that is outside the
> interfal framebuffer memory that we allocate to be the size of the
> screen.
>
> This patchset clamps the window coordinates to be within the screen
> size. Patches 1 and 2 are simple refactorings to make the third
> patch easier to read.
>
> This fixes https://gitlab.com/qemu-project/qemu/-/work_items/3795
>
> thanks
> -- PMM
>
> Peter Maydell (3):
>   hw/display/exynos4210_fimd: Factor out finding screen width/height
>   hw/display/exynos4210_fimd: Pass width to draw_line functions
>   hw/display/exynos4210_fimd: Clamp windows to screen size
>
>  hw/display/exynos4210_fimd.c | 54 ++++++++++++++++++++++++++----------
>  1 file changed, 39 insertions(+), 15 deletions(-)