Change some obviously wrong things about property blobs, still broken though.

- I do not fully understand these blobs, so i'm leaving it at this for the moment.
This commit is contained in:
Maarten Maathuis 2008-06-27 18:45:08 +02:00
parent 71906e86e8
commit 9f28da80f6
2 changed files with 2 additions and 3 deletions

View file

@ -495,7 +495,7 @@ drmModePropertyPtr drmModeGetProperty(int fd, uint32_t property_id)
if (prop.flags & DRM_MODE_PROP_ENUM) {
r->count_enums = prop.count_enum_blobs;
r->enums = drmAllocCpy(U642VOID(prop.enum_blob_ptr), prop.count_enum_blobs, sizeof(struct drm_mode_property_enum));
} else if (prop.flags & DRM_MODE_PROP_ENUM) {
} else if (prop.flags & DRM_MODE_PROP_BLOB) {
r->values = drmAllocCpy(U642VOID(prop.values_ptr), prop.count_enum_blobs, sizeof(uint32_t));
r->blob_ids = drmAllocCpy(U642VOID(prop.enum_blob_ptr), prop.count_enum_blobs, sizeof(uint32_t));
r->count_blobs = prop.count_enum_blobs;

View file

@ -1837,7 +1837,6 @@ int drm_mode_getproperty_ioctl(struct drm_device *dev,
out_resp->count_values = value_count;
if (property->flags & DRM_MODE_PROP_ENUM) {
if ((out_resp->count_enum_blobs >= enum_count) && enum_count) {
copied = 0;
enum_ptr = (struct drm_mode_property_enum *)(unsigned long)out_resp->enum_blob_ptr;
@ -1879,7 +1878,7 @@ int drm_mode_getproperty_ioctl(struct drm_device *dev,
copied++;
}
}
out_resp->count_enum_blobs = enum_count;
out_resp->count_enum_blobs = blob_count;
}
done:
mutex_unlock(&dev->mode_config.mutex);