linux-stable/drivers/gpu/drm/ast
Thomas Zimmermann f2fa5a99ca drm/ast: Convert ast to SHMEM
Replace GEM VRAM helpers with GEM SHMEM helpers in ast. Avoids OOM
errors when allocating video memory. Also adds support for dma-buf
functionality.

Aspeed display hardware supports display resolutions of FullHD and
higher at 32-bit pixel depth. But the amount of video memory is in
the range of 8 MiB to 32 MiB, which adds constraints to the actually
available resolutions. As atomic modesetting with VRAM helpers
requires double buffering in video memory, ast fails to pageflip
in some configurations. For example, FullHD with an active cursor
plane does not work on devices with 16 MiB of video memory.

Resolve this problem by converting the ast driver to GEM SHMEM helpers.
Keep the buffer objects in system memory and copy to video memory
on pageflips via shadow-plane helpers. Userspace used to require shadow
planes for decent performance, but that's now provided by the driver.
To replace the memory management, the patch also implements damage
handling for the primary plane.

With GEM SHMEM helpers, dma-buf import and export is now supported
by ast. This allows easier screen mirroring across devices or with
an Aspeed-based BMC. A corresponding feature request is available
at [1].

v2:
	* fix typos in commit message (Jocelyn)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Tested-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://lore.kernel.org/dri-devel/20220901124451.2523077-1-oushixiong@kylinos.cn/ # [1]
Link: https://patchwork.freedesktop.org/patch/msgid/20221013112923.769-8-tzimmermann@suse.de
2022-10-16 11:16:50 +02:00
..
ast_dp.c drm/ast: Fixed the casting issue reported by sparse 2022-06-24 09:37:32 +02:00
ast_dp501.c drm/ast: Support multiple outputs 2022-06-08 13:16:15 +02:00
ast_dram_tables.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ast_drv.c drm/ast: Convert ast to SHMEM 2022-10-16 11:16:50 +02:00
ast_drv.h drm/ast: Convert ast to SHMEM 2022-10-16 11:16:50 +02:00
ast_i2c.c drm/ast: Move I2C code into separate source file 2021-12-16 12:29:22 +01:00
ast_main.c drm/ast: Convert ast to SHMEM 2022-10-16 11:16:50 +02:00
ast_mm.c drm/ast: Convert ast to SHMEM 2022-10-16 11:16:50 +02:00
ast_mode.c drm/ast: Convert ast to SHMEM 2022-10-16 11:16:50 +02:00
ast_post.c drm/ast: Support multiple outputs 2022-06-08 13:16:15 +02:00
ast_tables.h drm/ast: Add resolution support for 1152x864@75 2022-09-20 10:19:32 +02:00
Kconfig drm/ast: Convert ast to SHMEM 2022-10-16 11:16:50 +02:00
Makefile drm/ast: Create the driver for ASPEED proprietory Display-Port 2022-05-03 16:04:03 +02:00