Re: [PATCH 09/11] media: iris: Add support to select core for dual core platforms

Vishnu Reddy
2026-04-17T15:37:09Z

On 4/14/2026 3:21 PM, Konrad Dybcio wrote:
> On 4/14/26 7:00 AM, Vishnu Reddy wrote:
>> Select the hardware core (vcodec) for a session, based on load when the
>> platform supports dual vcodec cores. Assign the session to vcodec if its
>> MBPF/MBPS capacity allows it, otherwise assign to vcodec1. Communicate
>> the selected vcodec core to firmware using new HFI_PROP_CORE_ID property.
>>
>> Signed-off-by: Vishnu Reddy<busanna.reddy@oss.qualcomm.com>
>> ---
> [...]
>
>> + if (core_mbpf[0] + new_mbpf <= max_core_mbpf)
>> + inst->core_id = BIT(0);
>> + else if (dual_core && core_mbpf[1] + new_mbpf <= max_core_mbpf)
>> + inst->core_id = BIT(1);
> Let's store the core ID as an index and only wrap it in BIT() where
> necessary to pass into the firmware

For the current instance, I'm marking the inst->core_id = 0 at initial
to skip that current inst
for the calculation of current load. If we store index in core_id, then
need to pass the current
inst to iris_get_core_load() and additional check required in that
function for proper core load.

Thanks,
Vishnu Reddy.

> Konrad