[Intel-gfx] [v11 02/12] drm: Add reference counting on HDR metadata blob
Uma Shankar
uma.shankar at intel.com
Thu May 16 14:10:07 UTC 2019
From: Jonas Karlman <jonas at kwiboo.se>
This adds reference count for HDR metadata blob,
handled as part of duplicate and destroy connector
state functions.
v2: Removed the hdr_metadata_changed initialization as
the variable is dropped and not required.
Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
Signed-off-by: Uma Shankar <uma.shankar at intel.com>
---
drivers/gpu/drm/drm_atomic_state_helper.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/drm_atomic_state_helper.c b/drivers/gpu/drm/drm_atomic_state_helper.c
index ac929f6..ec13823 100644
--- a/drivers/gpu/drm/drm_atomic_state_helper.c
+++ b/drivers/gpu/drm/drm_atomic_state_helper.c
@@ -391,6 +391,9 @@ void drm_atomic_helper_connector_reset(struct drm_connector *connector)
drm_connector_get(connector);
state->commit = NULL;
+ if (state->hdr_output_metadata)
+ drm_property_blob_get(state->hdr_output_metadata);
+
/* Don't copy over a writeback job, they are used only once */
state->writeback_job = NULL;
}
@@ -438,6 +441,8 @@ struct drm_connector_state *
if (state->writeback_job)
drm_writeback_cleanup_job(state->writeback_job);
+
+ drm_property_blob_put(state->hdr_output_metadata);
}
EXPORT_SYMBOL(__drm_atomic_helper_connector_destroy_state);
--
1.9.1
More information about the Intel-gfx
mailing list