Skip to content

Commit

Permalink
drm: Add reference counting on HDR metadata blob
Browse files Browse the repository at this point in the history
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@kwiboo.se>
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1558015817-12025-3-git-send-email-uma.shankar@intel.com
  • Loading branch information
Jonas Karlman authored and Ville Syrjälä committed May 22, 2019
1 parent fbb5d03 commit c0b0ebb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/gpu/drm/drm_atomic_state_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,9 @@ __drm_atomic_helper_connector_duplicate_state(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;
}
Expand Down Expand Up @@ -438,6 +441,8 @@ __drm_atomic_helper_connector_destroy_state(struct drm_connector_state *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);

Expand Down

0 comments on commit c0b0ebb

Please sign in to comment.