Lines Matching refs:hgt
26 static inline u32 vsp1_hgt_read(struct vsp1_hgt *hgt, u32 reg) in vsp1_hgt_read() argument
28 return vsp1_read(hgt->histo.entity.vsp1, reg); in vsp1_hgt_read()
31 static inline void vsp1_hgt_write(struct vsp1_hgt *hgt, in vsp1_hgt_write() argument
43 struct vsp1_hgt *hgt = to_hgt(&entity->subdev); in vsp1_hgt_frame_end() local
49 buf = vsp1_histogram_buffer_get(&hgt->histo); in vsp1_hgt_frame_end()
55 *data++ = vsp1_hgt_read(hgt, VI6_HGT_MAXMIN); in vsp1_hgt_frame_end()
56 *data++ = vsp1_hgt_read(hgt, VI6_HGT_SUM); in vsp1_hgt_frame_end()
60 *data++ = vsp1_hgt_read(hgt, VI6_HGT_HISTO(m, n)); in vsp1_hgt_frame_end()
62 vsp1_histogram_buffer_complete(&hgt->histo, buf, HGT_DATA_SIZE); in vsp1_hgt_frame_end()
100 struct vsp1_hgt *hgt = container_of(ctrl->handler, struct vsp1_hgt, in hgt_hue_areas_s_ctrl() local
103 memcpy(hgt->hue_areas, ctrl->p_new.p_u8, sizeof(hgt->hue_areas)); in hgt_hue_areas_s_ctrl()
133 struct vsp1_hgt *hgt = to_hgt(&entity->subdev); in hgt_configure_stream() local
148 vsp1_hgt_write(hgt, dlb, VI6_HGT_REGRST, VI6_HGT_REGRST_RCLEA); in hgt_configure_stream()
150 vsp1_hgt_write(hgt, dlb, VI6_HGT_OFFSET, in hgt_configure_stream()
153 vsp1_hgt_write(hgt, dlb, VI6_HGT_SIZE, in hgt_configure_stream()
157 mutex_lock(hgt->ctrls.lock); in hgt_configure_stream()
159 lower = hgt->hue_areas[i*2 + 0]; in hgt_configure_stream()
160 upper = hgt->hue_areas[i*2 + 1]; in hgt_configure_stream()
161 vsp1_hgt_write(hgt, dlb, VI6_HGT_HUE_AREA(i), in hgt_configure_stream()
165 mutex_unlock(hgt->ctrls.lock); in hgt_configure_stream()
169 vsp1_hgt_write(hgt, dlb, VI6_HGT_MODE, in hgt_configure_stream()
189 struct vsp1_hgt *hgt; in vsp1_hgt_create() local
192 hgt = devm_kzalloc(vsp1->dev, sizeof(*hgt), GFP_KERNEL); in vsp1_hgt_create()
193 if (hgt == NULL) in vsp1_hgt_create()
197 v4l2_ctrl_handler_init(&hgt->ctrls, 1); in vsp1_hgt_create()
198 v4l2_ctrl_new_custom(&hgt->ctrls, &hgt_hue_areas, NULL); in vsp1_hgt_create()
200 hgt->histo.entity.subdev.ctrl_handler = &hgt->ctrls; in vsp1_hgt_create()
203 ret = vsp1_histogram_init(vsp1, &hgt->histo, VSP1_ENTITY_HGT, "hgt", in vsp1_hgt_create()
208 vsp1_entity_destroy(&hgt->histo.entity); in vsp1_hgt_create()
212 v4l2_ctrl_handler_setup(&hgt->ctrls); in vsp1_hgt_create()
214 return hgt; in vsp1_hgt_create()