Module Name: src Committed By: nat Date: Fri Jun 7 02:51:45 UTC 2024
Modified Files: src/sys/arch/mac68k/mac68k: machdep.c Log Message: Relax the video size sanity check. If stride and height are defined, compute the required size. Fixes external video on my Powerbook 160. A similar approach is done for macfb - should the mv_len == 0 an appropriate value is calculated. To generate a diff of this commit: cvs rdiff -u -r1.368 -r1.369 src/sys/arch/mac68k/mac68k/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/mac68k/mac68k/machdep.c diff -u src/sys/arch/mac68k/mac68k/machdep.c:1.368 src/sys/arch/mac68k/mac68k/machdep.c:1.369 --- src/sys/arch/mac68k/mac68k/machdep.c:1.368 Sun Jun 2 13:28:44 2024 +++ src/sys/arch/mac68k/mac68k/machdep.c Fri Jun 7 02:51:45 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.368 2024/06/02 13:28:44 andvar Exp $ */ +/* $NetBSD: machdep.c,v 1.369 2024/06/07 02:51:45 nat Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -74,7 +74,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.368 2024/06/02 13:28:44 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.369 2024/06/07 02:51:45 nat Exp $"); #include "opt_adb.h" #include "opt_compat_netbsd.h" @@ -2619,7 +2619,7 @@ get_mapping(void) } /* mv_len sanity check */ int reqsize = mac68k_video.mv_height * mac68k_video.mv_stride; - if (mac68k_video.mv_len != 0 && mac68k_video.mv_len < reqsize) + if (mac68k_video.mv_len < reqsize) mac68k_video.mv_len = reqsize; return load_addr; /* Return physical address of logical 0 */