On (21/03/17 08:58), Ricardo Ribalda Delgado wrote: [..] > > > > GET_CUR? > yep > > > > > > https://www.kernel.org/doc/html/v4.13/media/uapi/v4l/vidioc-g-selection.html?highlight=vidioc_s_selection > > > On success the struct v4l2_rect r field contains the adjusted > > > rectangle. > > > > What is the adjusted rectangle here? Does this mean that firmware can > > successfully apply SET_CUR and return 0, but in reality it was not happy > > with the rectangle dimensions so it modified it behind the scenes? > > I can imagine that some hw might have spooky requirements for the roi > rectangle (multiple of 4, not crossing the bayer filter, odd/even > line...) so they might be able to go the closest valid config. Hmm. Honestly, I'm very unsure about it. ROI::SET_CUR can be a very hot path, depending on what user-space considers to be of interest and how frequently that object of interest changes its position/shape/etc. Doing GET_CUR after every SET_CUR doubles the number of firmware calls we issue, that's for sure; is it worth it - that's something that I'm not sure of. May I please ask for more opinions on this? -ss