diff options
| author | Bruce Evans <bde@FreeBSD.org> | 2019-04-16 15:31:23 +0000 |
|---|---|---|
| committer | Bruce Evans <bde@FreeBSD.org> | 2019-04-16 15:31:23 +0000 |
| commit | 63df3a344ee54c7abf2b51b83f525a0cf66e7086 (patch) | |
| tree | 611e202115d4e81bec83cfe1ca9762683a29fc0a /lib/libvgl | |
| parent | 9db56319d1c4f360a1a5addd3890057b8ca5a016 (diff) | |
Notes
Diffstat (limited to 'lib/libvgl')
| -rw-r--r-- | lib/libvgl/main.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/libvgl/main.c b/lib/libvgl/main.c index d0d7442e32f2..a4fffadcc287 100644 --- a/lib/libvgl/main.c +++ b/lib/libvgl/main.c @@ -264,6 +264,19 @@ VGLInit(int mode) else VGLBufSize = max(VGLAdpInfo.va_line_width*VGLModeInfo.vi_height, VGLAdpInfo.va_window_size)*VGLModeInfo.vi_planes; + /* + * The above is for old -CURRENT. Current -CURRENT since r203535 and/or + * r248799 restricts va_buffer_size to the displayed size in VESA modes to + * avoid wasting kva for mapping unused parts of the frame buffer. But all + * parts were usable here. Applying the same restriction to user mappings + * makes our virtualization useless and breaks our panning, but large frame + * buffers are also difficult for us to manage (clearing and switching may + * be too slow, and malloc() may fail). Restrict ourselves similarly to + * get the same efficiency and bugs for all kernels. + */ + if (0 && VGLModeInfo.vi_mode >= M_VESA_BASE) + VGLBufSize = 2*VGLAdpInfo.va_line_width*VGLModeInfo.vi_height* + VGLModeInfo.vi_planes; VGLBuf = malloc(VGLBufSize); if (VGLBuf == NULL) { VGLEnd(); |
