diff options
author | Simon Ser <contact@emersion.fr> | 2022-02-07 11:59:54 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2022-06-09 11:44:38 +0200 |
commit | f83ad09dc04c9f918ee8836bac9d88dac5de6745 (patch) | |
tree | 3d230ebf642dbda2e572334245f2cff5f7041914 | |
parent | 3bede5dbbcd307d9fb675562f780bf9525efb3d4 (diff) | |
download | libdrm-f83ad09dc04c9f918ee8836bac9d88dac5de6745.tar.gz libdrm-f83ad09dc04c9f918ee8836bac9d88dac5de6745.tar.bz2 libdrm-f83ad09dc04c9f918ee8836bac9d88dac5de6745.zip |
xf86drmMode: constify drmModeAtomicReq functions
This acts as an additional ABI guarantee, and improves
documentation for users.
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-rw-r--r-- | xf86drmMode.c | 8 | ||||
-rw-r--r-- | xf86drmMode.h | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/xf86drmMode.c b/xf86drmMode.c index 87e96603..6b79d768 100644 --- a/xf86drmMode.c +++ b/xf86drmMode.c @@ -1348,7 +1348,7 @@ drm_public drmModeAtomicReqPtr drmModeAtomicAlloc(void) return req; } -drm_public drmModeAtomicReqPtr drmModeAtomicDuplicate(drmModeAtomicReqPtr old) +drm_public drmModeAtomicReqPtr drmModeAtomicDuplicate(const drmModeAtomicReqPtr old) { drmModeAtomicReqPtr new; @@ -1378,7 +1378,7 @@ drm_public drmModeAtomicReqPtr drmModeAtomicDuplicate(drmModeAtomicReqPtr old) } drm_public int drmModeAtomicMerge(drmModeAtomicReqPtr base, - drmModeAtomicReqPtr augment) + const drmModeAtomicReqPtr augment) { uint32_t i; @@ -1411,7 +1411,7 @@ drm_public int drmModeAtomicMerge(drmModeAtomicReqPtr base, return 0; } -drm_public int drmModeAtomicGetCursor(drmModeAtomicReqPtr req) +drm_public int drmModeAtomicGetCursor(const drmModeAtomicReqPtr req) { if (!req) return -EINVAL; @@ -1480,7 +1480,7 @@ static int sort_req_list(const void *misc, const void *other) return first->cursor - second->cursor; } -drm_public int drmModeAtomicCommit(int fd, drmModeAtomicReqPtr req, +drm_public int drmModeAtomicCommit(int fd, const drmModeAtomicReqPtr req, uint32_t flags, void *user_data) { drmModeAtomicReqPtr sorted; diff --git a/xf86drmMode.h b/xf86drmMode.h index 19bf91dd..08557642 100644 --- a/xf86drmMode.h +++ b/xf86drmMode.h @@ -433,18 +433,18 @@ extern int drmModeObjectSetProperty(int fd, uint32_t object_id, typedef struct _drmModeAtomicReq drmModeAtomicReq, *drmModeAtomicReqPtr; extern drmModeAtomicReqPtr drmModeAtomicAlloc(void); -extern drmModeAtomicReqPtr drmModeAtomicDuplicate(drmModeAtomicReqPtr req); +extern drmModeAtomicReqPtr drmModeAtomicDuplicate(const drmModeAtomicReqPtr req); extern int drmModeAtomicMerge(drmModeAtomicReqPtr base, - drmModeAtomicReqPtr augment); + const drmModeAtomicReqPtr augment); extern void drmModeAtomicFree(drmModeAtomicReqPtr req); -extern int drmModeAtomicGetCursor(drmModeAtomicReqPtr req); +extern int drmModeAtomicGetCursor(const drmModeAtomicReqPtr req); extern void drmModeAtomicSetCursor(drmModeAtomicReqPtr req, int cursor); extern int drmModeAtomicAddProperty(drmModeAtomicReqPtr req, uint32_t object_id, uint32_t property_id, uint64_t value); extern int drmModeAtomicCommit(int fd, - drmModeAtomicReqPtr req, + const drmModeAtomicReqPtr req, uint32_t flags, void *user_data); |