Loading drivers/gpu/msm/kgsl_gmu.c +15 −5 Original line number Diff line number Diff line Loading @@ -1241,22 +1241,30 @@ static void gmu_aop_send_acd_state(struct kgsl_device *device) { struct adreno_device *adreno_dev = ADRENO_DEVICE(device); struct gmu_device *gmu = KGSL_GMU_DEVICE(device); struct kgsl_mailbox *mailbox = &gmu->mailbox; struct mbox_message msg; char msg_buf[33]; bool state = test_bit(ADRENO_ACD_CTRL, &adreno_dev->pwrctrl_flag); int ret; if (!gmu->mailbox.client) if (!mailbox->client) return; if (state == mailbox->enabled) return; msg.len = scnprintf(msg_buf, sizeof(msg_buf), "{class: gpu, res: acd, value: %d}", state); msg.msg = msg_buf; ret = mbox_send_message(gmu->mailbox.channel, &msg); if (ret < 0) ret = mbox_send_message(mailbox->channel, &msg); if (ret < 0) { dev_err(&gmu->pdev->dev, "AOP mbox send message failed: %d\n", ret); return; } mailbox->enabled = state; } static void gmu_aop_mailbox_destroy(struct kgsl_device *device) Loading @@ -1268,13 +1276,15 @@ static void gmu_aop_mailbox_destroy(struct kgsl_device *device) if (!mailbox->client) return; /* Turn off ACD in AOP */ clear_bit(ADRENO_ACD_CTRL, &adreno_dev->pwrctrl_flag); gmu_aop_send_acd_state(device); mbox_free_channel(mailbox->channel); mailbox->channel = NULL; kfree(mailbox->client); mailbox->client = NULL; clear_bit(ADRENO_ACD_CTRL, &adreno_dev->pwrctrl_flag); } static int gmu_aop_mailbox_init(struct kgsl_device *device, Loading drivers/gpu/msm/kgsl_gmu.h +1 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,7 @@ enum gmu_load_mode { }; struct kgsl_mailbox { bool enabled; struct mbox_client *client; struct mbox_chan *channel; }; Loading Loading
drivers/gpu/msm/kgsl_gmu.c +15 −5 Original line number Diff line number Diff line Loading @@ -1241,22 +1241,30 @@ static void gmu_aop_send_acd_state(struct kgsl_device *device) { struct adreno_device *adreno_dev = ADRENO_DEVICE(device); struct gmu_device *gmu = KGSL_GMU_DEVICE(device); struct kgsl_mailbox *mailbox = &gmu->mailbox; struct mbox_message msg; char msg_buf[33]; bool state = test_bit(ADRENO_ACD_CTRL, &adreno_dev->pwrctrl_flag); int ret; if (!gmu->mailbox.client) if (!mailbox->client) return; if (state == mailbox->enabled) return; msg.len = scnprintf(msg_buf, sizeof(msg_buf), "{class: gpu, res: acd, value: %d}", state); msg.msg = msg_buf; ret = mbox_send_message(gmu->mailbox.channel, &msg); if (ret < 0) ret = mbox_send_message(mailbox->channel, &msg); if (ret < 0) { dev_err(&gmu->pdev->dev, "AOP mbox send message failed: %d\n", ret); return; } mailbox->enabled = state; } static void gmu_aop_mailbox_destroy(struct kgsl_device *device) Loading @@ -1268,13 +1276,15 @@ static void gmu_aop_mailbox_destroy(struct kgsl_device *device) if (!mailbox->client) return; /* Turn off ACD in AOP */ clear_bit(ADRENO_ACD_CTRL, &adreno_dev->pwrctrl_flag); gmu_aop_send_acd_state(device); mbox_free_channel(mailbox->channel); mailbox->channel = NULL; kfree(mailbox->client); mailbox->client = NULL; clear_bit(ADRENO_ACD_CTRL, &adreno_dev->pwrctrl_flag); } static int gmu_aop_mailbox_init(struct kgsl_device *device, Loading
drivers/gpu/msm/kgsl_gmu.h +1 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,7 @@ enum gmu_load_mode { }; struct kgsl_mailbox { bool enabled; struct mbox_client *client; struct mbox_chan *channel; }; Loading