mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 14:41:39 +00:00
b09069046d
This function can be used by drivers that use damage clips and have CMA GEM objects backed by non-coherent memory. Calling this function in a plane's .atomic_update ensures that all the data in the backing memory have been written to RAM. v3: - Only sync data if using GEM objects backed by non-coherent memory. - Use a drm_device pointer instead of device pointer in prototype v5: - Rename to drm_fb_cma_sync_non_coherent - Invert loops for better cache locality - Only sync BOs that have the non-coherent flag - Move to drm_fb_cma_helper.c to avoid circular dependency Signed-off-by: Paul Cercueil <paul@crapouillou.net> Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20210523170415.90410-3-paul@crapouillou.net
24 lines
575 B
C
24 lines
575 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __DRM_FB_CMA_HELPER_H__
|
|
#define __DRM_FB_CMA_HELPER_H__
|
|
|
|
#include <linux/types.h>
|
|
|
|
struct drm_device;
|
|
struct drm_framebuffer;
|
|
struct drm_plane_state;
|
|
|
|
struct drm_gem_cma_object *drm_fb_cma_get_gem_obj(struct drm_framebuffer *fb,
|
|
unsigned int plane);
|
|
|
|
dma_addr_t drm_fb_cma_get_gem_addr(struct drm_framebuffer *fb,
|
|
struct drm_plane_state *state,
|
|
unsigned int plane);
|
|
|
|
void drm_fb_cma_sync_non_coherent(struct drm_device *drm,
|
|
struct drm_plane_state *old_state,
|
|
struct drm_plane_state *state);
|
|
|
|
#endif
|
|
|