Lines Matching refs:gsc
36 CGscaler *gsc = new CGscaler(GSC_M2M_MODE); in exynos_gsc_create() local
37 if (!gsc) { in exynos_gsc_create()
41 if (gsc->m_gsc_find_and_create(gsc) == false) { in exynos_gsc_create()
43 delete gsc; in exynos_gsc_create()
47 return reinterpret_cast<void *>(gsc); in exynos_gsc_create()
64 CGscaler *gsc = new CGscaler(mode, out_mode, dev_num, allow_drm); in exynos_gsc_create_exclusive() local
65 if (!gsc) { in exynos_gsc_create_exclusive()
70 gsc->scaler = exynos_sc_create_exclusive(dev_num - HW_SCAL0, in exynos_gsc_create_exclusive()
72 if (!gsc->scaler) { in exynos_gsc_create_exclusive()
73 delete(gsc); in exynos_gsc_create_exclusive()
78 return reinterpret_cast<void *>(gsc); in exynos_gsc_create_exclusive()
86 CGscaler *gsc = new CGscaler(mode, out_mode, dev_num, allow_drm); in exynos_gsc_create_exclusive() local
87 if (!gsc) { in exynos_gsc_create_exclusive()
93 gsc->gsc_fd = gsc->m_gsc_m2m_create(dev_num); in exynos_gsc_create_exclusive()
94 if (gsc->gsc_fd < 0) { in exynos_gsc_create_exclusive()
105 return reinterpret_cast<void *>(gsc); in exynos_gsc_create_exclusive()
109 gsc->m_gsc_m2m_destroy(gsc); in exynos_gsc_create_exclusive()
113 delete(gsc); in exynos_gsc_create_exclusive()
124 CGscaler* gsc = GetGscaler(handle); in exynos_gsc_destroy() local
125 if (gsc == NULL) { in exynos_gsc_destroy()
130 if (gsc->mode == GSC_M2M_MODE) in exynos_gsc_destroy()
131 gsc->m_gsc_m2m_destroy(gsc); in exynos_gsc_destroy()
133 delete(gsc); in exynos_gsc_destroy()
146 CGscaler *gsc = GetGscaler(handle); in exynos_gsc_set_csc_property() local
147 if (gsc == NULL) { in exynos_gsc_set_csc_property()
152 if (gsc->gsc_id >= HW_SCAL0) { in exynos_gsc_set_csc_property()
154 ret = exynos_sc_csc_exclusive(gsc->scaler, in exynos_gsc_set_csc_property()
159 gsc->eq_auto = eq_auto; in exynos_gsc_set_csc_property()
160 gsc->range_full = range_full; in exynos_gsc_set_csc_property()
161 gsc->v4l2_colorspace = v4l2_colorspace; in exynos_gsc_set_csc_property()
182 CGscaler *gsc = GetGscaler(handle); in exynos_gsc_set_src_format() local
183 if (gsc == NULL) { in exynos_gsc_set_src_format()
187 gsc->src_info.width = width; in exynos_gsc_set_src_format()
188 gsc->src_info.height = height; in exynos_gsc_set_src_format()
189 gsc->src_info.crop_left = crop_left; in exynos_gsc_set_src_format()
190 gsc->src_info.crop_top = crop_top; in exynos_gsc_set_src_format()
191 gsc->src_info.crop_width = crop_width; in exynos_gsc_set_src_format()
192 gsc->src_info.crop_height = crop_height; in exynos_gsc_set_src_format()
193 gsc->src_info.v4l2_colorformat = v4l2_colorformat; in exynos_gsc_set_src_format()
194 gsc->src_info.cacheable = cacheable; in exynos_gsc_set_src_format()
195 gsc->src_info.mode_drm = mode_drm; in exynos_gsc_set_src_format()
196 gsc->src_info.dirty = true; in exynos_gsc_set_src_format()
217 CGscaler *gsc = GetGscaler(handle); in exynos_gsc_set_dst_format() local
218 if (gsc == NULL) { in exynos_gsc_set_dst_format()
223 gsc->dst_info.width = width; in exynos_gsc_set_dst_format()
224 gsc->dst_info.height = height; in exynos_gsc_set_dst_format()
225 gsc->dst_info.crop_left = crop_left; in exynos_gsc_set_dst_format()
226 gsc->dst_info.crop_top = crop_top; in exynos_gsc_set_dst_format()
227 gsc->dst_info.crop_width = crop_width; in exynos_gsc_set_dst_format()
228 gsc->dst_info.crop_height = crop_height; in exynos_gsc_set_dst_format()
229 gsc->dst_info.v4l2_colorformat = v4l2_colorformat; in exynos_gsc_set_dst_format()
230 gsc->dst_info.dirty = true; in exynos_gsc_set_dst_format()
231 gsc->dst_info.cacheable = cacheable; in exynos_gsc_set_dst_format()
232 gsc->dst_info.mode_drm = mode_drm; in exynos_gsc_set_dst_format()
245 CGscaler *gsc = GetGscaler(handle); in exynos_gsc_set_rotation() local
246 if (gsc == NULL) { in exynos_gsc_set_rotation()
262 gsc->dst_info.rotation = new_rotation; in exynos_gsc_set_rotation()
263 gsc->dst_info.flip_horizontal = flip_horizontal; in exynos_gsc_set_rotation()
264 gsc->dst_info.flip_vertical = flip_vertical; in exynos_gsc_set_rotation()
277 CGscaler* gsc = GetGscaler(handle); in exynos_gsc_set_src_addr() local
278 if (gsc == NULL) { in exynos_gsc_set_src_addr()
283 gsc->src_info.buf.addr[0] = addr[0]; in exynos_gsc_set_src_addr()
284 gsc->src_info.buf.addr[1] = addr[1]; in exynos_gsc_set_src_addr()
285 gsc->src_info.buf.addr[2] = addr[2]; in exynos_gsc_set_src_addr()
286 gsc->src_info.acquireFenceFd = acquireFenceFd; in exynos_gsc_set_src_addr()
287 gsc->src_info.buf.mem_type = (enum v4l2_memory)mem_type; in exynos_gsc_set_src_addr()
302 CGscaler* gsc = GetGscaler(handle); in exynos_gsc_set_dst_addr() local
303 if (gsc == NULL) { in exynos_gsc_set_dst_addr()
308 gsc->dst_info.buf.addr[0] = addr[0]; in exynos_gsc_set_dst_addr()
309 gsc->dst_info.buf.addr[1] = addr[1]; in exynos_gsc_set_dst_addr()
310 gsc->dst_info.buf.addr[2] = addr[2]; in exynos_gsc_set_dst_addr()
311 gsc->dst_info.acquireFenceFd = acquireFenceFd; in exynos_gsc_set_dst_addr()
312 gsc->dst_info.buf.mem_type = (enum v4l2_memory)mem_type; in exynos_gsc_set_dst_addr()
324 CGscaler* gsc = GetGscaler(handle); in exynos_gsc_convert() local
325 if (gsc == NULL) { in exynos_gsc_convert()
330 if (gsc->m_gsc_m2m_run_core(handle) < 0) { in exynos_gsc_convert()
335 if (gsc->m_gsc_m2m_wait_frame_done(handle) < 0) { in exynos_gsc_convert()
340 if (gsc->src_info.releaseFenceFd >= 0) { in exynos_gsc_convert()
341 close(gsc->src_info.releaseFenceFd); in exynos_gsc_convert()
342 gsc->src_info.releaseFenceFd = -1; in exynos_gsc_convert()
345 if (gsc->dst_info.releaseFenceFd >= 0) { in exynos_gsc_convert()
346 close(gsc->dst_info.releaseFenceFd); in exynos_gsc_convert()
347 gsc->dst_info.releaseFenceFd = -1; in exynos_gsc_convert()
350 if (gsc->m_gsc_m2m_stop(handle) < 0) { in exynos_gsc_convert()
367 CGscaler *gsc = GetGscaler(handle); in exynos_gsc_subdev_s_crop() local
368 if (gsc == NULL) { in exynos_gsc_subdev_s_crop()
380 return exynos_subdev_s_crop(gsc->mdev.gsc_sd_entity->fd, &sd_crop); in exynos_gsc_subdev_s_crop()
389 CGscaler* gsc = GetGscaler(handle); in exynos_gsc_config_exclusive() local
390 if (gsc == NULL) { in exynos_gsc_config_exclusive()
394 if (gsc->gsc_id >= HW_SCAL0) { in exynos_gsc_config_exclusive()
395 ret = exynos_sc_config_exclusive(gsc->scaler, in exynos_gsc_config_exclusive()
401 switch (gsc->mode) { in exynos_gsc_config_exclusive()
403 ret = gsc->m_gsc_m2m_config(handle, src_img, dst_img); in exynos_gsc_config_exclusive()
406 ret = gsc->m_gsc_out_config(handle, src_img, dst_img); in exynos_gsc_config_exclusive()
409 ret = gsc->m_gsc_cap_config(handle, src_img, dst_img); in exynos_gsc_config_exclusive()
426 CGscaler* gsc = GetGscaler(handle); in exynos_gsc_run_exclusive() local
432 if (gsc->gsc_id >= HW_SCAL0) { in exynos_gsc_run_exclusive()
433 ret = exynos_sc_run_exclusive(gsc->scaler, in exynos_gsc_run_exclusive()
439 switch (gsc->mode) { in exynos_gsc_run_exclusive()
441 ret = gsc->m_gsc_m2m_run(handle, src_img, dst_img); in exynos_gsc_run_exclusive()
444 ret = gsc->m_gsc_out_run(handle, src_img); in exynos_gsc_run_exclusive()
447 ret = gsc->m_gsc_cap_run(handle, dst_img); in exynos_gsc_run_exclusive()
469 CGscaler *gsc = new CGscaler(mode, out_mode, dev_num, allow_drm); in exynos_gsc_create_blend_exclusive() local
470 if (!gsc) { in exynos_gsc_create_blend_exclusive()
475 gsc->scaler = exynos_sc_create_blend_exclusive(dev_num - HW_SCAL0, allow_drm); in exynos_gsc_create_blend_exclusive()
476 if (!gsc->scaler) { in exynos_gsc_create_blend_exclusive()
478 delete(gsc); in exynos_gsc_create_blend_exclusive()
484 return reinterpret_cast<void *>(gsc); in exynos_gsc_create_blend_exclusive()
499 CGscaler* gsc = GetGscaler(handle); in exynos_gsc_config_blend_exclusive() local
500 if (gsc == NULL) { in exynos_gsc_config_blend_exclusive()
504 if (gsc->gsc_id >= HW_SCAL0) { in exynos_gsc_config_blend_exclusive()
505 ret = exynos_sc_config_blend_exclusive(gsc->scaler, in exynos_gsc_config_blend_exclusive()
521 CGscaler* gsc = GetGscaler(handle); in exynos_gsc_wait_frame_done_exclusive() local
527 if (gsc->gsc_id >= HW_SCAL0) { in exynos_gsc_wait_frame_done_exclusive()
528 ret = exynos_sc_wait_frame_done_exclusive(gsc->scaler); in exynos_gsc_wait_frame_done_exclusive()
533 if (gsc->mode == GSC_M2M_MODE) in exynos_gsc_wait_frame_done_exclusive()
534 ret = gsc->m_gsc_m2m_wait_frame_done(handle); in exynos_gsc_wait_frame_done_exclusive()
546 CGscaler* gsc = GetGscaler(handle); in exynos_gsc_stop_exclusive() local
552 if (gsc->gsc_id >= HW_SCAL0) { in exynos_gsc_stop_exclusive()
553 ret = exynos_sc_stop_exclusive(gsc->scaler); in exynos_gsc_stop_exclusive()
558 switch (gsc->mode) { in exynos_gsc_stop_exclusive()
560 ret = gsc->m_gsc_m2m_stop(handle); in exynos_gsc_stop_exclusive()
577 CGscaler* gsc = GetGscaler(handle); in exynos_gsc_free_and_close() local
578 if (gsc == NULL) { in exynos_gsc_free_and_close()
584 if (gsc->gsc_id >= HW_SCAL0) { in exynos_gsc_free_and_close()
585 ret = exynos_sc_free_and_close(gsc->scaler); in exynos_gsc_free_and_close()
591 if (gsc->mode == GSC_OUTPUT_MODE) in exynos_gsc_free_and_close()
599 if (ioctl(gsc->mdev.gsc_vd_entity->fd, VIDIOC_REQBUFS, &reqbuf) < 0) { in exynos_gsc_free_and_close()
604 exynos_gsc_destroy(gsc); in exynos_gsc_free_and_close()