On 7/28/2023 9:17 PM, Bryan O'Donoghue wrote: > On 28/07/2023 14:23, Vikash Garodia wrote: >> +#define call_iris_op(d, op, ...) \ >> + (((d) && (d)->iris_ops && (d)->iris_ops->op) ? \ >> + ((d)->iris_ops->op(__VA_ARGS__)) : 0) >> + >> +struct msm_vidc_iris_ops { >> + int (*boot_firmware)(struct msm_vidc_core *core); >> + int (*raise_interrupt)(struct msm_vidc_core *core); >> + int (*clear_interrupt)(struct msm_vidc_core *core); >> + int (*prepare_pc)(struct msm_vidc_core *core); >> + int (*power_on)(struct msm_vidc_core *core); >> + int (*power_off)(struct msm_vidc_core *core); >> + int (*watchdog)(struct msm_vidc_core *core, u32 intr_status); >> +}; > > So I don't see how this code supports booting the venus firmware, is that > not required on 8550 ? > > I've applied the full patchset to -next > > We don't appear to have enumerated callbacks for booting, clearing > interrupts.. Hi Bryan, Seems you are looking in the incorrect folder, these APIs are implemented in variant specific folder, i.e. iris/variant/iris3 Thanks, Dikshita > > grep -r clear_interrupt drivers/media/platform/qcom/iris/vidc/src/* > drivers/media/platform/qcom/iris/vidc/src/venus_hfi.c: call_iris_op(core, > clear_interrupt, core); > > grep -r boot_firmware drivers/media/platform/qcom/iris/vidc/src/* > drivers/media/platform/qcom/iris/vidc/src/venus_hfi.c: rc = > call_iris_op(core, boot_firmware, core); > drivers/media/platform/qcom/iris/vidc/src/venus_hfi.c: rc = > call_iris_op(core, boot_firmware, core); > > There is dead code @ raise_interrupt.. > > grep -r raise_interrupt drivers/media/platform/qcom/iris/vidc/src/* > drivers/media/platform/qcom/iris/vidc/src/venus_hfi_queue.c: > call_iris_op(core, raise_interrupt, core); > drivers/media/platform/qcom/iris/vidc/src/venus_hfi_queue.c: > //call_iris_op(core, raise_interrupt, core); > drivers/media/platform/qcom/iris/vidc/src/venus_hfi_queue.c: > //call_iris_op(core, raise_interrupt, core); > > grep -r clear_interrupt drivers/media/platform/qcom/iris/vidc/src/* > drivers/media/platform/qcom/iris/vidc/src/venus_hfi.c: call_iris_op(core, > clear_interrupt, core); > > grep -r prepare_pc drivers/media/platform/qcom/iris/vidc/src/* > drivers/media/platform/qcom/iris/vidc/src/venus_hfi.c:int > __prepare_pc(struct msm_vidc_core *core) > drivers/media/platform/qcom/iris/vidc/src/venus_hfi.c: rc = > call_iris_op(core, prepare_pc, core); > > > Here we have an admixture of the new name "Iris" with the old name "venus" > > grep -r power_on drivers/media/platform/qcom/iris/vidc/src/* > drivers/media/platform/qcom/iris/vidc/src/venus_hfi.c:static int > __venus_power_on(struct msm_vidc_core *core) > drivers/media/platform/qcom/iris/vidc/src/venus_hfi.c: rc = > call_iris_op(core, power_on, core); > drivers/media/platform/qcom/iris/vidc/src/venus_hfi.c: rc = > __venus_power_on(core); > drivers/media/platform/qcom/iris/vidc/src/venus_hfi.c: goto > err_venus_power_on; > drivers/media/platform/qcom/iris/vidc/src/venus_hfi.c:err_venus_power_on: > drivers/media/platform/qcom/iris/vidc/src/venus_hfi.c: rc = > __venus_power_on(core); > > grep -r power_off drivers/media/platform/qcom/iris/vidc/src/* > drivers/media/platform/qcom/iris/vidc/src/venus_hfi.c: goto > skip_power_off; > drivers/media/platform/qcom/iris/vidc/src/venus_hfi.c:skip_power_off: > drivers/media/platform/qcom/iris/vidc/src/venus_hfi.c:static int > __venus_power_off(struct msm_vidc_core *core) > drivers/media/platform/qcom/iris/vidc/src/venus_hfi.c: rc = > call_iris_op(core, power_off, core); > drivers/media/platform/qcom/iris/vidc/src/venus_hfi.c: > __venus_power_off(core); > drivers/media/platform/qcom/iris/vidc/src/venus_hfi.c: > __venus_power_off(core); > drivers/media/platform/qcom/iris/vidc/src/venus_hfi.c: > __venus_power_off(core); > drivers/media/platform/qcom/iris/vidc/src/venus_hfi.c: > __venus_power_off(core); > > Lending credence to the argument we could incorporate all of some of the is > logic in the existing venus driver. > > --- > bod