disp: msm: dp: use base connector properties for mst connectors
When DRM property objects are created, the DRM framework attaches a dellocator which can eventually free the object when the last reference is removed from it. The framework can only do this before the driver is registered. If a property is created after the registration then the framework is unable to attach a deallocator causing a memory leak during tear down. The current DP driver creates a new colorspace property whenever a new dp connector is initialized. It creates a base connector at probe time prior to registration. But then it also creates new connectors, post registration, whenever a new MST dongle is attached to the topology, causing memory leaks. This change limits the property creation to the base connector and attaches the same object to MST connectors to avoid memory leak. Change-Id: Ib97dc7aac260b4f3f96c1097f58bd276c68501f8 Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
This commit is contained in:
@@ -351,6 +351,14 @@ struct sde_connector_ops {
|
||||
*/
|
||||
int (*prepare_commit)(void *display,
|
||||
struct msm_display_conn_params *params);
|
||||
|
||||
/**
|
||||
* install_properties - install connector properties
|
||||
* @display: Pointer to private display structure
|
||||
* @conn: Pointer to drm connector structure
|
||||
* Returns: Zero on success
|
||||
*/
|
||||
int (*install_properties)(void *display, struct drm_connector *conn);
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user