Hi Sakari, On 01/08/2012 12:01 AM, Sakari Ailus wrote: >>> +/* >>> + * >>> + * V4L2 Controls handling >>> + * >>> + */ >>> + >>> +static void __smiapp_update_exposure_limits(struct smiapp_sensor *sensor) >>> +{ >>> + struct v4l2_ctrl *ctrl = sensor->exposure; >>> + int max; >>> + >>> + max = sensor->pixel_array->compose[SMIAPP_PAD_SOURCE].height >>> + + sensor->vblank->val - >>> + sensor->limits[SMIAPP_LIMIT_COARSE_INTEGRATION_TIME_MAX_MARGIN]; >>> + >>> + ctrl->maximum = max; >>> + if (ctrl->default_value> max) >>> + ctrl->default_value = max; >>> + if (ctrl->val> max) >>> + ctrl->val = max; >>> + if (ctrl->cur.val> max) >>> + ctrl->cur.val = max; >>> +} >> >> One more driver that needs control value range update. :) > > :-) > > Are there other drivers that would need something like that, too? > Anything in the control framework that I have missed related to this? Yes, I needed that in s5p-fimc driver for the alpha component control. The alpha channel value range depends on colour format and the control needs to be updated accordingly to changes done with VIDIOC_S_FMT. And no, there is yet nothing in the control framework to support this. Hans just prepared some proof-of-concept patch [1], but the decision was to hold on until there appear more drivers needing control value range update, due to hight complication of life in the userland. [1] http://www.mail-archive.com/linux-media@xxxxxxxxxxxxxxx/msg39674.html -- Regards, Sylwester -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html