mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-06-13 14:08:34 +02:00
drm: constify KMS property framework
I discovered there are things we can make const, so I decided to do it all over the place. Having things const has documentary value. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
parent
691c03858b
commit
630c8bbf2a
3 changed files with 12 additions and 12 deletions
|
|
@ -868,17 +868,17 @@ drm_output_set_mode(struct weston_output *base,
|
|||
const char *modeline);
|
||||
|
||||
void
|
||||
drm_property_info_populate(struct drm_device *device,
|
||||
drm_property_info_populate(const struct drm_device *device,
|
||||
const struct drm_property_info *src,
|
||||
struct drm_property_info *info,
|
||||
unsigned int num_infos,
|
||||
drmModeObjectProperties *props);
|
||||
const drmModeObjectProperties *props);
|
||||
uint64_t
|
||||
drm_property_get_value(struct drm_property_info *info,
|
||||
drm_property_get_value(const struct drm_property_info *info,
|
||||
const drmModeObjectProperties *props,
|
||||
uint64_t def);
|
||||
uint64_t *
|
||||
drm_property_get_range_values(struct drm_property_info *info,
|
||||
const uint64_t *
|
||||
drm_property_get_range_values(const struct drm_property_info *info,
|
||||
const drmModeObjectProperties *props);
|
||||
int
|
||||
drm_plane_populate_formats(struct drm_plane *plane, const drmModePlane *kplane,
|
||||
|
|
|
|||
|
|
@ -1428,8 +1428,8 @@ drm_plane_create(struct drm_device *device, const drmModePlane *kplane)
|
|||
struct weston_compositor *compositor = b->compositor;
|
||||
struct drm_plane *plane, *tmp;
|
||||
drmModeObjectProperties *props;
|
||||
uint64_t *zpos_range_values;
|
||||
uint64_t *alpha_range_values;
|
||||
const uint64_t *zpos_range_values;
|
||||
const uint64_t *alpha_range_values;
|
||||
|
||||
plane = zalloc(sizeof(*plane));
|
||||
if (!plane) {
|
||||
|
|
|
|||
|
|
@ -389,7 +389,7 @@ enum drm_state_apply_mode {
|
|||
* @param def Value to return if property is not found
|
||||
*/
|
||||
uint64_t
|
||||
drm_property_get_value(struct drm_property_info *info,
|
||||
drm_property_get_value(const struct drm_property_info *info,
|
||||
const drmModeObjectProperties *props,
|
||||
uint64_t def)
|
||||
{
|
||||
|
|
@ -437,8 +437,8 @@ drm_property_get_value(struct drm_property_info *info,
|
|||
* @param info Internal structure for property to look up
|
||||
* @param props Raw KMS properties for the target object
|
||||
*/
|
||||
uint64_t *
|
||||
drm_property_get_range_values(struct drm_property_info *info,
|
||||
const uint64_t *
|
||||
drm_property_get_range_values(const struct drm_property_info *info,
|
||||
const drmModeObjectProperties *props)
|
||||
{
|
||||
unsigned int i;
|
||||
|
|
@ -571,11 +571,11 @@ wdrm_vrr_enabled_from_output(struct drm_output *drm_output)
|
|||
* @param props DRM object properties for the object
|
||||
*/
|
||||
void
|
||||
drm_property_info_populate(struct drm_device *device,
|
||||
drm_property_info_populate(const struct drm_device *device,
|
||||
const struct drm_property_info *src,
|
||||
struct drm_property_info *info,
|
||||
unsigned int num_infos,
|
||||
drmModeObjectProperties *props)
|
||||
const drmModeObjectProperties *props)
|
||||
{
|
||||
drmModePropertyRes *prop;
|
||||
unsigned i, j;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue