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

Commit 3ef19c0b authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drm/msm/dsi-staging: free pps command transmit buffer" into dev/msm-4.14-display

parents f8e08441 93c87372
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -1518,7 +1518,7 @@ static int dsi_panel_create_cmd_packets(const char *data,
	return rc;
}

void dsi_panel_destroy_cmd_packets(struct dsi_panel_cmd_set *set)
static void dsi_panel_destroy_cmd_packets(struct dsi_panel_cmd_set *set)
{
	u32 i = 0;
	struct dsi_cmd_desc *cmd;
@@ -1527,7 +1527,10 @@ void dsi_panel_destroy_cmd_packets(struct dsi_panel_cmd_set *set)
		cmd = &set->cmds[i];
		kfree(cmd->msg.tx_buf);
	}
}

static void dsi_panel_dealloc_cmd_packets(struct dsi_panel_cmd_set *set)
{
	kfree(set->cmds);
}

@@ -3128,8 +3131,10 @@ void dsi_panel_put_mode(struct dsi_display_mode *mode)
	if (!mode->priv_info)
		return;

	for (i = 0; i < DSI_CMD_SET_MAX; i++)
	for (i = 0; i < DSI_CMD_SET_MAX; i++) {
		dsi_panel_destroy_cmd_packets(&mode->priv_info->cmd_sets[i]);
		dsi_panel_dealloc_cmd_packets(&mode->priv_info->cmd_sets[i]);
	}

	kfree(mode->priv_info);
}
@@ -3327,9 +3332,9 @@ int dsi_panel_update_pps(struct dsi_panel *panel)
	if (rc) {
		pr_err("[%s] failed to send DSI_CMD_SET_PPS cmds, rc=%d\n",
			panel->name, rc);
		goto error;
	}

	dsi_panel_destroy_cmd_packets(set);
error:
	mutex_unlock(&panel->panel_lock);
	return rc;