OpenCloudOS-Kernel/drivers/gpu/drm/xen
Gerd Hoffmann 707d561f77 drm: allow limiting the scatter list size.
Add drm_device argument to drm_prime_pages_to_sg(), so we can
call dma_max_mapping_size() to figure the segment size limit
and call into __sg_alloc_table_from_pages() with the correct
limit.

This fixes virtio-gpu with sev.  Possibly it'll fix other bugs
too given that drm seems to totaly ignore segment size limits
so far ...

v2: place max_segment in drm driver not gem object.
v3: move max_segment next to the other gem fields.
v4: just use dma_max_mapping_size().

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20200907112425.15610-2-kraxel@redhat.com
2020-09-09 07:58:56 +02:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile drm/xen-front: Use Xen common shared buffer implementation 2018-12-18 12:16:13 -05:00
xen_drm_front.c xen: branch for v5.9-rc1b 2020-08-14 13:34:37 -07:00
xen_drm_front.h drm/xen-front: Pass dumb buffer data offset to the backend 2020-08-13 17:15:21 +02:00
xen_drm_front_cfg.c drm/xen: drop use of drmP.h 2019-07-15 18:11:30 +02:00
xen_drm_front_cfg.h
xen_drm_front_conn.c drm/xen-front: Add YUYV to supported formats 2020-08-13 12:50:27 +02:00
xen_drm_front_conn.h drm/xen: drop use of drmP.h 2019-07-15 18:11:30 +02:00
xen_drm_front_evtchnl.c drm/xen: drop use of drmP.h 2019-07-15 18:11:30 +02:00
xen_drm_front_evtchnl.h
xen_drm_front_gem.c drm: allow limiting the scatter list size. 2020-09-09 07:58:56 +02:00
xen_drm_front_gem.h drm/xen: drop use of drmP.h 2019-07-15 18:11:30 +02:00
xen_drm_front_kms.c drm/xen-front: Fix misused IS_ERR_OR_NULL checks 2020-08-13 12:50:25 +02:00
xen_drm_front_kms.h