[PATCH 0/9] drm/simpledrm: Enable damage clips and virtual screens
Sam Ravnborg
sam at ravnborg.org
Sat Oct 23 07:44:54 UTC 2021
Hi Thomas,
On Fri, Oct 22, 2021 at 03:28:20PM +0200, Thomas Zimmermann wrote:
> Enable FB_DAMAGE_CLIPS with simpledrm for improved performance and/or
> less overhead. With this in place, add support for virtual screens
> (i.e., framebuffers that are larger than the display resolution). This
> also enables fbdev panning and page flipping.
>
> After the discussion and bug fixing wrt to fbdev overallocation, I
> decided to add full support for this to simpledrm. Patches #1 to #5
> change the format-helper functions accordingly. Destination buffers
> are now clipped by the caller and all functions support a similar
> feature set. This has some fallout in various drivers.
>
> Patch #6 change fbdev emulation to support overallocation with
> shadow buffers, even if the hardware buffer would be too small.
This change is very welcome - I hope it will solve the problem
Alistair experience - see:
https://lore.kernel.org/all/CAKmqyKPCP45O5_gjCFwUs8jU4NrDnjAeLs7OYAE4j-LEUw+Hzg@mail.gmail.com/
Sam
>
> Patch #7 and #8 update simpledrm to enable damage clipping and virtual
> screen sizes. Both feature go hand in hand, sort of. For shadow-
> buffered planes, the DRM framebuffer lives in system memory. So the
> maximum size of the virtual screen is somewhat arbitrary. We add two
> constants for resonable maximum width and height of 4096 each.
>
> Patch #9 adds documentation and a TODO item.
>
> Tested with simpledrm. I also ran the recently posted fbdev panning
> tests to make sure that the fbdev overallocation works correctly. [1]
>
> [1] https://lists.freedesktop.org/archives/igt-dev/2021-October/036642.html
>
> Thomas Zimmermann (9):
> drm/format-helper: Export drm_fb_clip_offset()
> drm/format-helper: Rework format-helper memcpy functions
> drm/format-helper: Add destination-buffer pitch to drm_fb_swab()
> drm/format-helper: Rework format-helper conversion functions
> drm/format-helper: Streamline blit-helper interface
> drm/fb-helper: Allocate shadow buffer of surface height
> drm/simpledrm: Enable FB_DAMAGE_CLIPS property
> drm/simpledrm: Support virtual screen sizes
> drm: Clarify semantics of struct
> drm_mode_config.{min,max}_{width,height}
>
> Documentation/gpu/todo.rst | 15 ++
> drivers/gpu/drm/drm_fb_helper.c | 2 +-
> drivers/gpu/drm/drm_format_helper.c | 236 ++++++++++----------
> drivers/gpu/drm/drm_mipi_dbi.c | 6 +-
> drivers/gpu/drm/gud/gud_pipe.c | 14 +-
> drivers/gpu/drm/hyperv/hyperv_drm_modeset.c | 5 +-
> drivers/gpu/drm/mgag200/mgag200_mode.c | 4 +-
> drivers/gpu/drm/tiny/cirrus.c | 24 +-
> drivers/gpu/drm/tiny/repaper.c | 2 +-
> drivers/gpu/drm/tiny/simpledrm.c | 41 +++-
> drivers/gpu/drm/tiny/st7586.c | 2 +-
> include/drm/drm_format_helper.h | 58 ++---
> include/drm/drm_gem_atomic_helper.h | 18 ++
> include/drm/drm_mode_config.h | 13 ++
> 14 files changed, 254 insertions(+), 186 deletions(-)
>
> --
> 2.33.0
More information about the dri-devel
mailing list