From 6b570cd77961a61a33b753a412c984964a7ca660 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Mon, 21 Feb 2022 11:26:00 +0000 Subject: [PATCH] Reduce the maximum mapped size of the linear frame buffer. This is needed for subsequent changes. If we do ever get presented with a frame buffer larger than 8192x8192 pixels, we'll need to think again about how to manage it. --- system/screen.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/system/screen.c b/system/screen.c index 39abc70..fa275d0 100644 --- a/system/screen.c +++ b/system/screen.c @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 -// Copyright (C) 2020-2021 Martin Whitaker +// Copyright (C) 2020-2022 Martin Whitaker #include #include @@ -209,12 +209,12 @@ void screen_init(void) #endif lfb_stride = screen_info->lfb_linelength; - // Clip the framebuffer size to make sure we can map it into the 1GB device region. + // Clip the framebuffer size to make sure we can map it into the 0.5GB device region. // This will produce a garbled display, but that's better than nothing. - if (lfb_width > 16384) lfb_width = 16384; - if (lfb_height > 16384) lfb_height = 16384; + if (lfb_width > 8192) lfb_width = 8192; + if (lfb_height > 8192) lfb_height = 8192; - // This is the first device we map, so the above clipping should guarantee it never fails. + // The above clipping should guarantee the mapping never fails. lfb_base = map_device(lfb_base, lfb_height * lfb_width * lfb_bytes_per_pixel); // Blank the whole framebuffer.