25#include <xf86drmMode.h>
54 drmModeObjectProperties *props = drmModeObjectGetProperties(fd,
GetId(), DRM_MODE_OBJECT_PLANE);
56 LOGERROR(
"drmplane: %s: could not get %u properties: %s", __FUNCTION__,
GetId(), strerror(errno));
63 for (uint32_t i = 0; i <
m_props->count_props; i++) {
79 for (uint32_t i = 0; i <
m_props->count_props; i++) {
84 drmModeFreeObjectProperties(
m_props);
105 uint64_t crtcX, uint64_t crtcY, uint64_t crtcW, uint64_t crtcH,
106 uint64_t srcX, uint64_t srcY, uint64_t srcW, uint64_t srcH)
139 LOGERROR(
"drmplane: %s: Unable to find value for property \'%s\'.",
140 __FUNCTION__, propName);
144 return drmModeAtomicAddProperty(ModeReq,
GetId(),
id, value);
198 drmModeAtomicReqPtr ModeReq;
199 const uint32_t flags = DRM_MODE_ATOMIC_ALLOW_MODESET;
201 if (!(ModeReq = drmModeAtomicAlloc())) {
202 LOGERROR(
"drmplane: %s: cannot allocate atomic request (%d): %m", __FUNCTION__, errno);
208 if (drmModeAtomicCommit(fdDrm, ModeReq, flags, NULL) != 0) {
209 LOGDEBUG2(
L_DRM,
"drmplane: %s: cannot set atomic mode (%d), don't use zpos change: %m",
210 __FUNCTION__, errno);
211 drmModeAtomicFree(ModeReq);
215 drmModeAtomicFree(ModeReq);
225 LOGERROR(
"DumpParameters (plane_id = %d | %s):",
GetId(),
id);
void SetParams(uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t)
Set the modesetting parameters of a plane.
void ClearPlane(drmModeAtomicReqPtr)
Clear plane from drm.
uint64_t m_crtcId
CRTC_ID.
void SetProps(drmModeObjectProperties *props)
uint32_t GetPropsInfoPropId(int prop)
int SetPropertyRequest(drmModeAtomicReqPtr, const char *, uint64_t)
Add the properties to the mode setting request.
int HasZpos(int)
Check, if the plane is able to set the zpos property.
void FillProperties(int)
Fill the plane properties.
char * GetPropsInfoName(int prop)
drmModeObjectProperties * m_props
drmModePropertyRes ** GetPropsInfo(void)
void FreeProperties(void)
Free the previously filled plane properties.
void SetPlane(drmModeAtomicReqPtr)
Set all other plane properties.
drmModePropertyRes ** m_propsInfo
void SetPlaneZpos(drmModeAtomicReqPtr)
Set the plane zpos property.
uint32_t m_planeId
the plane's ID
drmModeObjectProperties * GetProps(void)
void DumpParameters(const char *)
Dump the plane parameter modesetting values.
Logger class header file.