On Tue, Oct 22, 2024 at 01:48:25PM +0530, Sibi Sankar wrote: > > Hi Sibi, one more thing down below... > On 10/7/24 23:27, Dmitry Baryshkov wrote: > > On Mon, Oct 07, 2024 at 11:40:22AM GMT, Sibi Sankar wrote: > > > Introduce a client driver that uses the memlat algorithm string > > > hosted on QCOM SCMI Generic Extension Protocol to detect memory > > > latency workloads and control frequency/level of the various > > > memory buses (DDR/LLCC/DDR_QOS). [snip] > > > + } > > > + info->memory[info->memory_cnt++] = memory; > > > + > > > + do { > > > + snprintf(name, sizeof(name), "monitor-%d", memory->monitor_cnt); > > > + struct device_node *monitor_np __free(device_node) = > > > + of_get_child_by_name(memory_np, name); > > > + > > > + if (!monitor_np) > > > + break; > > > + > > > + if (memory->monitor_cnt >= MAX_MONITOR_CNT) > > > > Why do you need to limit it? Is it a protocol limitation or an > > artificial driver limitation? Can monitors be allocated dynamically? > > Yeah, they are limited to a max of 5 in firmware. Similarly as I already commented elsewhere, in an SCMI-based platform this is something you should be able to discover at run-time with a query command of some kind (or using some bits of the existing cmds) ....so that you dont have this dependency on constants defined and built into the platform fw....what if your fw evolves to allow more monitors ? Thanks, Cristian