Hi Ezequiel, On Fri, 2019-11-15 at 12:44 -0300, Ezequiel Garcia wrote: > Hello Philipp, > > Thanks for reviewing. > > On Thu, 2019-11-14 at 10:48 +0100, Philipp Zabel wrote: [...] > > Why isn't PP enabled in prepare_run? Does this mean the first frame is > > not post-processed? > > > > No, because hantro_finish_run is called (despite its name) > before the decoding operation is actually triggered. > > I guess this hantro_finish_run name adds some confusion: > prepare_run and finish_run should be something along > start_prepare_run, end_prepare_run. Ah, ok then. I was confused because I just came from looking at coda-vpu code, where finish_run is a callback called after the device has finished processing. Maybe I should rename that as well. > And also, perhaps disabling the post-processor in prepare_run > works just fine. I need to check that. Ok. [...] > > > +#define HANTRO_PP_REG_WRITE_S(vpu, reg_name, val) \ > > > + do { \ > > > + if ((vpu)->variant->postproc_regs->(reg_name).base) \ > > > + hantro_reg_write((vpu), \ > > > + &(vpu)->variant->postproc_regs->(reg_name), \ > > > + (val)); \ > > > + } while (0) > > > > Why all these checks, are any of the register fields optional? > > > > That was the plan. Perhaps now it makes less sense, > but maybe it's safer this way, if it's extended? > > OTOH, we might want to make sure the driver fails (or warns). I think that would be better than silently ignoring them. Although I don't quite see the point in repeatedly checking the presence of mandatory register fields at runtime. regards Philipp