@@ -4118,7 +4118,7 @@ done:
static struct drm_property_blob *
drm_property_create_blob(struct drm_device *dev, size_t length,
- const void *data)
+ const void *data, bool global)
{
struct drm_property_blob *blob;
int ret;
@@ -4140,7 +4140,10 @@ drm_property_create_blob(struct drm_device *dev, size_t length,
memcpy(blob->data, data, length);
- list_add_tail(&blob->head, &dev->mode_config.property_blob_list);
+ if (global)
+ list_add_tail(&blob->head,
+ &dev->mode_config.property_blob_list);
+
return blob;
}
@@ -4233,7 +4236,7 @@ int drm_mode_connector_set_path_property(struct drm_connector *connector,
int ret;
connector->path_blob_ptr = drm_property_create_blob(connector->dev,
- size, path);
+ size, path, true);
if (!connector->path_blob_ptr)
return -EINVAL;
@@ -4279,7 +4282,7 @@ int drm_mode_connector_set_tile_property(struct drm_connector *connector)
size = strlen(tile) + 1;
connector->tile_blob_ptr = drm_property_create_blob(connector->dev,
- size, tile);
+ size, tile, true);
if (!connector->tile_blob_ptr)
return -EINVAL;
@@ -4324,7 +4327,7 @@ int drm_mode_connector_update_edid_property(struct drm_connector *connector,
size = EDID_LENGTH * (1 + edid->extensions);
connector->edid_blob_ptr = drm_property_create_blob(connector->dev,
- size, edid);
+ size, edid, true);
if (!connector->edid_blob_ptr)
return -EINVAL;
All blob properties currently go on the device-global property list, which is reaped at device exit. Make the addition to the list optional, to allow for user properties whose lifetime will be tied to their drm_file. Signed-off-by: Daniel Stone <daniels@collabora.com> --- drivers/gpu/drm/drm_crtc.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)