|
@@ -745,13 +745,17 @@ static void tegra_dsi_soft_reset(struct tegra_dsi *dsi)
|
|
|
|
|
|
static void tegra_dsi_connector_reset(struct drm_connector *connector)
|
|
static void tegra_dsi_connector_reset(struct drm_connector *connector)
|
|
{
|
|
{
|
|
- struct tegra_dsi_state *state =
|
|
|
|
- kzalloc(sizeof(*state), GFP_KERNEL);
|
|
|
|
|
|
+ struct tegra_dsi_state *state = kzalloc(sizeof(*state), GFP_KERNEL);
|
|
|
|
|
|
- if (state) {
|
|
|
|
|
|
+ if (!state)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ if (connector->state) {
|
|
|
|
+ __drm_atomic_helper_connector_destroy_state(connector->state);
|
|
kfree(connector->state);
|
|
kfree(connector->state);
|
|
- __drm_atomic_helper_connector_reset(connector, &state->base);
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ __drm_atomic_helper_connector_reset(connector, &state->base);
|
|
}
|
|
}
|
|
|
|
|
|
static struct drm_connector_state *
|
|
static struct drm_connector_state *
|
|
@@ -764,6 +768,9 @@ tegra_dsi_connector_duplicate_state(struct drm_connector *connector)
|
|
if (!copy)
|
|
if (!copy)
|
|
return NULL;
|
|
return NULL;
|
|
|
|
|
|
|
|
+ __drm_atomic_helper_connector_duplicate_state(connector,
|
|
|
|
+ ©->base);
|
|
|
|
+
|
|
return ©->base;
|
|
return ©->base;
|
|
}
|
|
}
|
|
|
|
|