msm: kgsl: Update the mailbox message and length for ACD QMP message

Update the message string and adjust the message length as mailbox
controller expects 4-byte aligned buffer.

Change-Id: Ifc357a27b63d1d04f5d0149f637814e5d35262f4
Signed-off-by: Mohammed Mirza Mandayappurath Manzoor <mmandaya@codeaurora.org>
This commit is contained in:
Mohammed Mirza Mandayappurath Manzoor 2020-08-27 13:58:55 -07:00
commit cdc6ef1ba1

View file

@ -14,6 +14,7 @@
#include <linux/regulator/consumer.h>
#include <linux/slab.h>
#include <linux/soc/qcom/llcc-qcom.h>
#include <linux/mailbox/qmp.h>
#include <soc/qcom/cmd-db.h>
#include "adreno.h"
@ -2093,19 +2094,20 @@ void a6xx_gmu_snapshot(struct adreno_device *adreno_dev,
void a6xx_gmu_aop_send_acd_state(struct a6xx_gmu_device *gmu, bool flag)
{
char msg_buf[33];
struct qmp_pkt msg;
char msg_buf[36];
u32 size;
int ret;
struct {
u32 len;
void *msg;
} msg;
if (IS_ERR_OR_NULL(gmu->mailbox.channel))
return;
msg.len = scnprintf(msg_buf, sizeof(msg_buf),
"{class: gpu, res: acd, value: %d}", flag);
msg.msg = msg_buf;
size = scnprintf(msg_buf, sizeof(msg_buf),
"{class: gpu, res: acd, val: %d}", flag);
/* mailbox controller expects 4-byte aligned buffer */
msg.size = ALIGN((size + 1), SZ_4);
msg.data = msg_buf;
ret = mbox_send_message(gmu->mailbox.channel, &msg);