Lines Matching defs:property

1082  * drm_mode_create_scaling_mode_property - create scaling mode property
1106 * drm_mode_create_dithering_property - create dithering property
1129 * drm_mode_create_dirty_property - create dirty property
2700 struct drm_property *property = NULL;
2703 property = kzalloc(sizeof(struct drm_property), GFP_KERNEL);
2704 if (!property)
2708 property->values = kzalloc(sizeof(uint64_t)*num_values, GFP_KERNEL);
2709 if (!property->values)
2713 ret = drm_mode_object_get(dev, &property->base, DRM_MODE_OBJECT_PROPERTY);
2717 property->flags = flags;
2718 property->num_values = num_values;
2719 INIT_LIST_HEAD(&property->enum_blob_list);
2722 (void) strncpy(property->name, name, DRM_PROP_NAME_LEN);
2723 property->name[DRM_PROP_NAME_LEN-1] = '\0';
2726 list_add_tail(&property->head, &dev->mode_config.property_list, (caddr_t)property);
2727 return property;
2729 kfree(property->values, sizeof(uint64_t)*num_values);
2730 kfree(property, sizeof(struct drm_property));
2738 struct drm_property *property;
2743 property = drm_property_create(dev, flags, name, num_values);
2744 if (!property)
2748 ret = drm_property_add_enum(property, i,
2752 drm_property_destroy(dev, property);
2757 return property;
2764 struct drm_property *property;
2769 property = drm_property_create(dev, flags, name, num_values);
2770 if (!property)
2774 ret = drm_property_add_enum(property, i,
2778 drm_property_destroy(dev, property);
2783 return property;
2790 struct drm_property *property;
2794 property = drm_property_create(dev, flags, name, 2);
2795 if (!property)
2798 property->values[0] = min;
2799 property->values[1] = max;
2801 return property;
2804 int drm_property_add_enum(struct drm_property *property, int index,
2809 if (!(property->flags & (DRM_MODE_PROP_ENUM | DRM_MODE_PROP_BITMASK)))
2816 if ((property->flags & DRM_MODE_PROP_BITMASK) && (value > 63))
2819 if (!list_empty(&property->enum_blob_list)) {
2820 list_for_each_entry(prop_enum, struct drm_property_enum, &property->enum_blob_list, head) {
2837 property->values[index] = value;
2838 list_add_tail(&prop_enum->head, &property->enum_blob_list, (caddr_t)prop_enum);
2842 void drm_property_destroy(struct drm_device *dev, struct drm_property *property)
2846 list_for_each_entry_safe(prop_enum, pt, struct drm_property_enum, &property->enum_blob_list, head) {
2851 if (property->num_values)
2852 kfree(property->values, sizeof(uint64_t) * property->num_values);
2853 drm_mode_object_put(dev, &property->base);
2854 list_del(&property->head);
2855 kfree(property, sizeof(struct drm_property));
2860 struct drm_property *property,
2866 DRM_ERROR("Failed to attach object property (type: 0x%x). Please "
2873 obj->properties->ids[count] = property->base.id;
2879 struct drm_property *property, uint64_t val)
2884 if (obj->properties->ids[i] == property->base.id) {
2894 struct drm_property *property, uint64_t *val)
2899 if (obj->properties->ids[i] == property->base.id) {
2913 struct drm_property *property;
2935 property = obj_to_property(obj);
2937 if (property->flags & (DRM_MODE_PROP_ENUM | DRM_MODE_PROP_BITMASK)) {
2938 list_for_each_entry(prop_enum, struct drm_property_enum, &property->enum_blob_list, head)
2940 } else if (property->flags & DRM_MODE_PROP_BLOB) {
2941 list_for_each_entry(prop_blob, struct drm_property_blob, &property->enum_blob_list, head)
2945 value_count = property->num_values;
2947 (void) strncpy(out_resp->name, property->name, DRM_PROP_NAME_LEN);
2949 out_resp->flags = property->flags;
2954 if (DRM_COPY_TO_USER(values_ptr + i, &property->values[i], sizeof(uint64_t))) {
2962 if (property->flags & (DRM_MODE_PROP_ENUM | DRM_MODE_PROP_BITMASK)) {
2966 list_for_each_entry(prop_enum, struct drm_property_enum, &property->enum_blob_list, head) {
2984 if (property->flags & DRM_MODE_PROP_BLOB) {
2990 list_for_each_entry(prop_blob, struct drm_property_blob, &property->enum_blob_list, head) {
3109 static bool drm_property_change_is_valid(struct drm_property *property,
3112 if (property->flags & DRM_MODE_PROP_IMMUTABLE)
3114 if (property->flags & DRM_MODE_PROP_RANGE) {
3115 if (value < property->values[0] || value > property->values[1])
3118 } else if (property->flags & DRM_MODE_PROP_BITMASK) {
3121 for (i = 0; i < property->num_values; i++)
3122 valid_mask |= (1ULL << property->values[i]);
3124 } else if (property->flags & DRM_MODE_PROP_BLOB) {
3129 for (i = 0; i < property->num_values; i++)
3130 if (property->values[i] == value)
3151 struct drm_property *property,
3158 if (property == connector->dev->mode_config.dpms_property) {
3163 ret = connector->funcs->set_property(connector, property, value);
3165 /* store the property value if successful */
3167 ret = drm_object_property_set_value(&connector->base, property, value);
3172 struct drm_property *property,
3179 ret = crtc->funcs->set_property(crtc, property, value);
3181 ret = drm_object_property_set_value(obj, property, value);
3187 struct drm_property *property,
3194 ret = plane->funcs->set_property(plane, property, value);
3196 ret = drm_object_property_set_value(obj, property, value);
3263 struct drm_property *property;
3289 property = obj_to_property(prop_obj);
3291 if (!drm_property_change_is_valid(property, arg->value))
3296 ret = drm_mode_connector_set_obj_prop(arg_obj, property,
3300 ret = drm_mode_crtc_set_obj_prop(arg_obj, property, arg->value);
3303 ret = drm_mode_plane_set_obj_prop(arg_obj, property, arg->value);
3897 struct drm_property *property, *pt;
3911 list_for_each_entry_safe(property, pt, struct drm_property, &dev->mode_config.property_list,
3913 drm_property_destroy(dev, property);