Add drmModePageFlipTarget

It supports the DRM_MODE_PAGE_FLIP_TARGET_* flags.

Acked-by: Daniel Vetter <daniel@ffwll.ch>
main
Michel Dänzer 2016-06-29 18:07:25 +09:00 committed by Michel Dänzer
parent 9433b702fc
commit 7dd28475f1
2 changed files with 19 additions and 0 deletions

View File

@ -948,6 +948,22 @@ int drmModePageFlip(int fd, uint32_t crtc_id, uint32_t fb_id,
return DRM_IOCTL(fd, DRM_IOCTL_MODE_PAGE_FLIP, &flip); return DRM_IOCTL(fd, DRM_IOCTL_MODE_PAGE_FLIP, &flip);
} }
int drmModePageFlipTarget(int fd, uint32_t crtc_id, uint32_t fb_id,
uint32_t flags, void *user_data,
uint32_t target_vblank)
{
struct drm_mode_crtc_page_flip_target flip_target;
memclear(flip_target);
flip_target.fb_id = fb_id;
flip_target.crtc_id = crtc_id;
flip_target.user_data = VOID2U64(user_data);
flip_target.flags = flags;
flip_target.sequence = target_vblank;
return DRM_IOCTL(fd, DRM_IOCTL_MODE_PAGE_FLIP, &flip_target);
}
int drmModeSetPlane(int fd, uint32_t plane_id, uint32_t crtc_id, int drmModeSetPlane(int fd, uint32_t plane_id, uint32_t crtc_id,
uint32_t fb_id, uint32_t flags, uint32_t fb_id, uint32_t flags,
int32_t crtc_x, int32_t crtc_y, int32_t crtc_x, int32_t crtc_y,

View File

@ -473,6 +473,9 @@ extern int drmModeCrtcGetGamma(int fd, uint32_t crtc_id, uint32_t size,
uint16_t *red, uint16_t *green, uint16_t *blue); uint16_t *red, uint16_t *green, uint16_t *blue);
extern int drmModePageFlip(int fd, uint32_t crtc_id, uint32_t fb_id, extern int drmModePageFlip(int fd, uint32_t crtc_id, uint32_t fb_id,
uint32_t flags, void *user_data); uint32_t flags, void *user_data);
extern int drmModePageFlipTarget(int fd, uint32_t crtc_id, uint32_t fb_id,
uint32_t flags, void *user_data,
uint32_t target_vblank);
extern drmModePlaneResPtr drmModeGetPlaneResources(int fd); extern drmModePlaneResPtr drmModeGetPlaneResources(int fd);
extern drmModePlanePtr drmModeGetPlane(int fd, uint32_t plane_id); extern drmModePlanePtr drmModeGetPlane(int fd, uint32_t plane_id);