From 3f47b93dce7330e346a8c804cc4a76cc4069f84d Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Fri, 15 Jul 2022 17:57:28 +0000 Subject: Implement support for framebuffers that don't start on a page boundary. This happens on the new 14" and 16" Macbook Pro where we deliberately use a framebuffer that skips the first few lines to avoid "the notch". The offset of the first pixel is added to struct wsdisplay_fbinfo. The stride is added as well, mirroring the value returned by the WSDISPLAYIO_LINEBYTES ioctl, such that we can retire that one in the future. A compat ioctl is implemented to help the transition. The compat code will be removed after OpenBSD 7.3 has been released. ok miod@ --- sys/arch/powerpc64/dev/astfb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/arch/powerpc64') diff --git a/sys/arch/powerpc64/dev/astfb.c b/sys/arch/powerpc64/dev/astfb.c index 398b9288ad7..450acbd743b 100644 --- a/sys/arch/powerpc64/dev/astfb.c +++ b/sys/arch/powerpc64/dev/astfb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: astfb.c,v 1.4 2022/04/06 18:59:27 naddy Exp $ */ +/* $OpenBSD: astfb.c,v 1.5 2022/07/15 17:57:26 kettenis Exp $ */ /* * Copyright (c) 2020 Mark Kettenis. @@ -201,6 +201,8 @@ astfb_wsioctl(void *v, u_long cmd, caddr_t data, int flags, struct proc *p) wdf->width = ri->ri_width; wdf->height = ri->ri_height; wdf->depth = ri->ri_depth; + wdf->stride = ri->ri_stride; + wdf->offset = 0; wdf->cmsize = 0; /* color map is unavailable */ break; case WSDISPLAYIO_LINEBYTES: -- cgit v1.2.3