diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2022-07-15 17:57:28 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2022-07-15 17:57:28 +0000 |
commit | 3f47b93dce7330e346a8c804cc4a76cc4069f84d (patch) | |
tree | 8df0e9b525b0b79b6c4af50dc7538c9940812896 /sys/arch/sparc64/dev/raptor.c | |
parent | a293620c322495162cd11778c11d765cda80455b (diff) |
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@
Diffstat (limited to 'sys/arch/sparc64/dev/raptor.c')
-rw-r--r-- | sys/arch/sparc64/dev/raptor.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/sparc64/dev/raptor.c b/sys/arch/sparc64/dev/raptor.c index fbd60381563..86c0abbbfcc 100644 --- a/sys/arch/sparc64/dev/raptor.c +++ b/sys/arch/sparc64/dev/raptor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: raptor.c,v 1.11 2021/10/24 17:05:04 mpi Exp $ */ +/* $OpenBSD: raptor.c,v 1.12 2022/07/15 17:57:26 kettenis Exp $ */ /* * Copyright (c) 2009 Mark Kettenis. @@ -257,6 +257,8 @@ raptor_ioctl(void *v, u_long cmd, caddr_t data, int flags, struct proc *p) wdf->height = sc->sc_sunfb.sf_height; wdf->width = sc->sc_sunfb.sf_width; wdf->depth = sc->sc_sunfb.sf_depth; + wdf->stride = sc->sc_sunfb.sf_linebytes; + wdf->offset = 0; wdf->cmsize = 256; break; case WSDISPLAYIO_LINEBYTES: |