You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
drm: add signed-range property type
Like range, but values are signed. Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
This commit is contained in:
@@ -65,6 +65,15 @@ struct drm_object_properties {
|
||||
uint64_t values[DRM_OBJECT_MAX_PROPERTY];
|
||||
};
|
||||
|
||||
static inline int64_t U642I64(uint64_t val)
|
||||
{
|
||||
return (int64_t)*((int64_t *)&val);
|
||||
}
|
||||
static inline uint64_t I642U64(int64_t val)
|
||||
{
|
||||
return (uint64_t)*((uint64_t *)&val);
|
||||
}
|
||||
|
||||
enum drm_connector_force {
|
||||
DRM_FORCE_UNSPECIFIED,
|
||||
DRM_FORCE_OFF,
|
||||
@@ -982,6 +991,9 @@ struct drm_property *drm_property_create_bitmask(struct drm_device *dev,
|
||||
struct drm_property *drm_property_create_range(struct drm_device *dev, int flags,
|
||||
const char *name,
|
||||
uint64_t min, uint64_t max);
|
||||
struct drm_property *drm_property_create_signed_range(struct drm_device *dev,
|
||||
int flags, const char *name,
|
||||
int64_t min, int64_t max);
|
||||
struct drm_property *drm_property_create_object(struct drm_device *dev,
|
||||
int flags, const char *name, uint32_t type);
|
||||
extern void drm_property_destroy(struct drm_device *dev, struct drm_property *property);
|
||||
|
||||
Reference in New Issue
Block a user