Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b2c4fd66 authored by Clarence Ip's avatar Clarence Ip
Browse files

drm/msm/sde: take connector reference from conn state



Update the DRM connector state callbacks to call helper
functions provided by the DRM/KMS framework wherever
appropriate. This allows updated framework semantics
to be picked up automatically by our state handling
functions.

In particular, the current set of helper functions also
take a reference count on the DRM connector to account
for the fact that the connector state structures also
contain a pointer to the base connector object.

Change-Id: Ib890672c451b9bdec644be905449085040b8c758
Signed-off-by: default avatarClarence Ip <cip@codeaurora.org>
parent 8ee49957
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -559,6 +559,8 @@ static void sde_connector_atomic_destroy_state(struct drm_connector *connector,
	if (c_state->out_fb)
		_sde_connector_destroy_fb(c_conn, c_state);

	__drm_atomic_helper_connector_destroy_state(&c_state->base);

	if (!c_conn) {
		kfree(c_state);
	} else {
@@ -596,8 +598,7 @@ static void sde_connector_atomic_reset(struct drm_connector *connector)
			&c_state->property_state,
			c_state->property_values);

	c_state->base.connector = connector;
	connector->state = &c_state->base;
	__drm_atomic_helper_connector_reset(connector, &c_state->base);
}

static struct drm_connector_state *
@@ -624,6 +625,9 @@ sde_connector_atomic_duplicate_state(struct drm_connector *connector)
			c_oldstate, c_state,
			&c_state->property_state, c_state->property_values);

	__drm_atomic_helper_connector_duplicate_state(connector,
			&c_state->base);

	/* additional handling for drm framebuffer objects */
	if (c_state->out_fb)
		drm_framebuffer_reference(c_state->out_fb);