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

Commit b35001fe authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "slim-msm-ngd: Check current state of sub system restart notifier"

parents fbd0ef20 bac5b267
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -273,7 +273,7 @@ static int dsp_domr_notify_cb(struct notifier_block *n, unsigned long code,
		break;
	case SUBSYS_AFTER_POWERUP:
	case SERVREG_NOTIF_SERVICE_STATE_UP_V01:
		SLIM_INFO(dev, "SLIM DSP SSR notify cb:%lu\n", code);
		SLIM_INFO(dev, "SLIM DSP SSR notify cb:0x%x\n", code);
		/* Hold wake lock until notify slaves thread is done */
		pm_stay_awake(dev->dev);
		atomic_set(&dev->init_in_progress, 1);
@@ -303,9 +303,21 @@ static int dsp_domr_notify_cb(struct notifier_block *n, unsigned long code,
				&cur);
		SLIM_INFO(dev, "reg-PD client:%s with service:%s\n",
				reg->client_name, reg->service_name);
		SLIM_INFO(dev, "reg-PD dom:%s instance:%d, cur:%d\n",
		SLIM_INFO(dev, "reg-PD dom:%s instance:%d, cur:0x%x\n",
				reg->domain_list->name,
				reg->domain_list->instance_id, cur);

		if (cur == SERVREG_NOTIF_SERVICE_STATE_UP_V01) {
			pm_stay_awake(dev->dev);
			atomic_set(&dev->init_in_progress, 1);
			if (dev->lpass_mem_usage) {
				dev->lpass_mem->start = dev->lpass_phy_base;
				dev->lpass.base = dev->lpass_virt_base;
			}
			atomic_set(&dev->ssr_in_progress, 0);
			schedule_work(&dev->dsp.dom_up);
		}

		if (IS_ERR_OR_NULL(dev->dsp.domr))
			ngd_reg_ssr(dev);
		else