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>main
parent
3bede5dbbc
commit
f83ad09dc0
|
@ -1348,7 +1348,7 @@ drm_public drmModeAtomicReqPtr drmModeAtomicAlloc(void)
|
||||||
return req;
|
return req;
|
||||||
}
|
}
|
||||||
|
|
||||||
drm_public drmModeAtomicReqPtr drmModeAtomicDuplicate(drmModeAtomicReqPtr old)
|
drm_public drmModeAtomicReqPtr drmModeAtomicDuplicate(const drmModeAtomicReqPtr old)
|
||||||
{
|
{
|
||||||
drmModeAtomicReqPtr new;
|
drmModeAtomicReqPtr new;
|
||||||
|
|
||||||
|
@ -1378,7 +1378,7 @@ drm_public drmModeAtomicReqPtr drmModeAtomicDuplicate(drmModeAtomicReqPtr old)
|
||||||
}
|
}
|
||||||
|
|
||||||
drm_public int drmModeAtomicMerge(drmModeAtomicReqPtr base,
|
drm_public int drmModeAtomicMerge(drmModeAtomicReqPtr base,
|
||||||
drmModeAtomicReqPtr augment)
|
const drmModeAtomicReqPtr augment)
|
||||||
{
|
{
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
|
|
||||||
|
@ -1411,7 +1411,7 @@ drm_public int drmModeAtomicMerge(drmModeAtomicReqPtr base,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
drm_public int drmModeAtomicGetCursor(drmModeAtomicReqPtr req)
|
drm_public int drmModeAtomicGetCursor(const drmModeAtomicReqPtr req)
|
||||||
{
|
{
|
||||||
if (!req)
|
if (!req)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -1480,7 +1480,7 @@ static int sort_req_list(const void *misc, const void *other)
|
||||||
return first->cursor - second->cursor;
|
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)
|
uint32_t flags, void *user_data)
|
||||||
{
|
{
|
||||||
drmModeAtomicReqPtr sorted;
|
drmModeAtomicReqPtr sorted;
|
||||||
|
|
|
@ -433,18 +433,18 @@ extern int drmModeObjectSetProperty(int fd, uint32_t object_id,
|
||||||
typedef struct _drmModeAtomicReq drmModeAtomicReq, *drmModeAtomicReqPtr;
|
typedef struct _drmModeAtomicReq drmModeAtomicReq, *drmModeAtomicReqPtr;
|
||||||
|
|
||||||
extern drmModeAtomicReqPtr drmModeAtomicAlloc(void);
|
extern drmModeAtomicReqPtr drmModeAtomicAlloc(void);
|
||||||
extern drmModeAtomicReqPtr drmModeAtomicDuplicate(drmModeAtomicReqPtr req);
|
extern drmModeAtomicReqPtr drmModeAtomicDuplicate(const drmModeAtomicReqPtr req);
|
||||||
extern int drmModeAtomicMerge(drmModeAtomicReqPtr base,
|
extern int drmModeAtomicMerge(drmModeAtomicReqPtr base,
|
||||||
drmModeAtomicReqPtr augment);
|
const drmModeAtomicReqPtr augment);
|
||||||
extern void drmModeAtomicFree(drmModeAtomicReqPtr req);
|
extern void drmModeAtomicFree(drmModeAtomicReqPtr req);
|
||||||
extern int drmModeAtomicGetCursor(drmModeAtomicReqPtr req);
|
extern int drmModeAtomicGetCursor(const drmModeAtomicReqPtr req);
|
||||||
extern void drmModeAtomicSetCursor(drmModeAtomicReqPtr req, int cursor);
|
extern void drmModeAtomicSetCursor(drmModeAtomicReqPtr req, int cursor);
|
||||||
extern int drmModeAtomicAddProperty(drmModeAtomicReqPtr req,
|
extern int drmModeAtomicAddProperty(drmModeAtomicReqPtr req,
|
||||||
uint32_t object_id,
|
uint32_t object_id,
|
||||||
uint32_t property_id,
|
uint32_t property_id,
|
||||||
uint64_t value);
|
uint64_t value);
|
||||||
extern int drmModeAtomicCommit(int fd,
|
extern int drmModeAtomicCommit(int fd,
|
||||||
drmModeAtomicReqPtr req,
|
const drmModeAtomicReqPtr req,
|
||||||
uint32_t flags,
|
uint32_t flags,
|
||||||
void *user_data);
|
void *user_data);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue