Home
last modified time | relevance | path

Searched refs:rect (Results 1 – 25 of 156) sorted by relevance

1234567

/Linux-v4.19/drivers/media/platform/soc_camera/
Dsoc_scale_crop.c41 int soc_camera_client_g_rect(struct v4l2_subdev *sd, struct v4l2_rect *rect) in soc_camera_client_g_rect() argument
51 *rect = sdsel.r; in soc_camera_client_g_rect()
58 *rect = sdsel.r; in soc_camera_client_g_rect()
65 static void move_and_crop_subrect(struct v4l2_rect *rect, in move_and_crop_subrect() argument
68 if (rect->width < subrect->width) in move_and_crop_subrect()
69 subrect->width = rect->width; in move_and_crop_subrect()
71 if (rect->height < subrect->height) in move_and_crop_subrect()
72 subrect->height = rect->height; in move_and_crop_subrect()
74 if (rect->left > subrect->left) in move_and_crop_subrect()
75 subrect->left = rect->left; in move_and_crop_subrect()
[all …]
/Linux-v4.19/drivers/video/fbdev/sis/
Dsis_accel.c318 void fbcon_sis_fillrect(struct fb_info *info, const struct fb_fillrect *rect) in fbcon_sis_fillrect() argument
331 cfb_fillrect(info, rect); in fbcon_sis_fillrect()
335 if(!rect->width || !rect->height || rect->dx >= vxres || rect->dy >= vyres) in fbcon_sis_fillrect()
339 width = ((rect->dx + rect->width) > vxres) ? (vxres - rect->dx) : rect->width; in fbcon_sis_fillrect()
340 height = ((rect->dy + rect->height) > vyres) ? (vyres - rect->dy) : rect->height; in fbcon_sis_fillrect()
343 case 8: col = rect->color; in fbcon_sis_fillrect()
346 case 32: col = ((u32 *)(info->pseudo_palette))[rect->color]; in fbcon_sis_fillrect()
353 SiS300SetupForSolidFill(ivideo, col, myrops[rect->rop]); in fbcon_sis_fillrect()
354 SiS300SubsequentSolidFillRect(ivideo, rect->dx, rect->dy, width, height); in fbcon_sis_fillrect()
360 SiS310SetupForSolidFill(ivideo, col, myrops[rect->rop]); in fbcon_sis_fillrect()
[all …]
/Linux-v4.19/drivers/staging/media/mt9t031/
Dmt9t031.c78 struct v4l2_rect rect; /* Sensor window */ member
202 struct v4l2_rect *rect, u16 xskip, u16 yskip) in mt9t031_set_params() argument
228 rect->left &= ~1; in mt9t031_set_params()
231 rect->left &= ~3; in mt9t031_set_params()
234 rect->left = rect->left > roundup(MT9T031_COLUMN_SKIP, 6) ? in mt9t031_set_params()
235 (rect->left / 6) * 6 : roundup(MT9T031_COLUMN_SKIP, 6); in mt9t031_set_params()
238 rect->top &= ~1; in mt9t031_set_params()
241 xskip, yskip, rect->width, rect->height, rect->left, rect->top); in mt9t031_set_params()
263 rect->left, rect->top); in mt9t031_set_params()
270 ret = reg_write(client, MT9T031_COLUMN_START, rect->left); in mt9t031_set_params()
[all …]
/Linux-v4.19/drivers/media/i2c/
Dmt9m111.c212 struct v4l2_rect rect; /* cropping rectangle */ member
325 struct mt9m111_context *ctx, struct v4l2_rect *rect, in mt9m111_setup_rect_ctx() argument
329 int ret = mt9m111_reg_write(client, ctx->reducer_xzoom, rect->width); in mt9m111_setup_rect_ctx()
331 ret = mt9m111_reg_write(client, ctx->reducer_yzoom, rect->height); in mt9m111_setup_rect_ctx()
339 static int mt9m111_setup_geometry(struct mt9m111 *mt9m111, struct v4l2_rect *rect, in mt9m111_setup_geometry() argument
345 ret = reg_write(COLUMN_START, rect->left); in mt9m111_setup_geometry()
347 ret = reg_write(ROW_START, rect->top); in mt9m111_setup_geometry()
350 ret = reg_write(WINDOW_WIDTH, rect->width); in mt9m111_setup_geometry()
352 ret = reg_write(WINDOW_HEIGHT, rect->height); in mt9m111_setup_geometry()
358 rect, width, height); in mt9m111_setup_geometry()
[all …]
Dov6650.c201 struct v4l2_rect rect; /* sensor cropping window */ member
459 sel->r = priv->rect; in ov6650_get_selection()
472 struct v4l2_rect rect = sel->r; in ov6650_set_selection() local
479 v4l_bound_align_image(&rect.width, 2, W_CIF, 1, in ov6650_set_selection()
480 &rect.height, 2, H_CIF, 1, 0); in ov6650_set_selection()
481 v4l_bound_align_image(&rect.left, DEF_HSTRT << 1, in ov6650_set_selection()
482 (DEF_HSTRT << 1) + W_CIF - (__s32)rect.width, 1, in ov6650_set_selection()
483 &rect.top, DEF_VSTRT << 1, in ov6650_set_selection()
484 (DEF_VSTRT << 1) + H_CIF - (__s32)rect.height, 1, in ov6650_set_selection()
487 ret = ov6650_reg_write(client, REG_HSTRT, rect.left >> 1); in ov6650_set_selection()
[all …]
Dtvp5150.c49 struct v4l2_rect rect; member
779 decoder->rect.height = TVP5150_V_MAX_525_60; in tvp5150_s_std()
781 decoder->rect.height = TVP5150_V_MAX_OTHERS; in tvp5150_s_std()
874 f->width = decoder->rect.width; in tvp5150_fill_fmt()
875 f->height = decoder->rect.height / 2; in tvp5150_fill_fmt()
891 struct v4l2_rect rect = sel->r; in tvp5150_set_selection() local
900 __func__, rect.left, rect.top, rect.width, rect.height); in tvp5150_set_selection()
903 rect.left = clamp(rect.left, 0, TVP5150_MAX_CROP_LEFT); in tvp5150_set_selection()
904 rect.width = clamp_t(unsigned int, rect.width, in tvp5150_set_selection()
905 TVP5150_H_MAX - TVP5150_MAX_CROP_LEFT - rect.left, in tvp5150_set_selection()
[all …]
/Linux-v4.19/drivers/gpu/drm/exynos/
Dexynos_drm_ipp.c267 task->src.rect.w = task->dst.rect.w = UINT_MAX; in exynos_drm_ipp_task_alloc()
268 task->src.rect.h = task->dst.rect.h = UINT_MAX; in exynos_drm_ipp_task_alloc()
293 offsetof(struct exynos_drm_ipp_task, src.rect),
298 offsetof(struct exynos_drm_ipp_task, dst.rect),
492 if (!__size_limit_check(buf->rect.w, lh) || in exynos_drm_ipp_check_size_limits()
493 !__align_check(buf->rect.x, lh->align) || in exynos_drm_ipp_check_size_limits()
494 !__size_limit_check(buf->rect.h, lv) || in exynos_drm_ipp_check_size_limits()
495 !__align_check(buf->rect.y, lv->align)) in exynos_drm_ipp_check_size_limits()
590 ret = exynos_drm_ipp_check_scale_limits(&src->rect, &dst->rect, in exynos_drm_ipp_check_format()
608 if (src->rect.w == UINT_MAX) in exynos_drm_ipp_task_check()
[all …]
Dexynos_drm_fimc.c477 h1 = buf->rect.x; in fimc_set_window()
478 h2 = real_width - buf->rect.w - buf->rect.x; in fimc_set_window()
479 v1 = buf->rect.y; in fimc_set_window()
480 v2 = buf->buf.height - buf->rect.h - buf->rect.y; in fimc_set_window()
483 buf->rect.x, buf->rect.y, buf->rect.w, buf->rect.h, in fimc_set_window()
518 DRM_DEBUG_KMS("x[%d]y[%d]w[%d]h[%d]\n", buf->rect.x, buf->rect.y, in fimc_src_set_size()
519 buf->rect.w, buf->rect.h); in fimc_src_set_size()
525 cfg |= (EXYNOS_CIREAL_ISIZE_WIDTH(buf->rect.w) | in fimc_src_set_size()
526 EXYNOS_CIREAL_ISIZE_HEIGHT(buf->rect.h)); in fimc_src_set_size()
539 cfg = (EXYNOS_CIIYOFF_HORIZONTAL(buf->rect.x) | in fimc_src_set_size()
[all …]
/Linux-v4.19/drivers/media/i2c/soc_camera/
Dmt9m001.c96 struct v4l2_rect rect; /* Sensor window */ member
180 struct v4l2_rect rect = sel->r; in mt9m001_set_selection() local
193 rect.height = ALIGN(rect.height, 2); in mt9m001_set_selection()
196 rect.width = ALIGN(rect.width, 2); in mt9m001_set_selection()
197 rect.left = ALIGN(rect.left, 2); in mt9m001_set_selection()
199 soc_camera_limit_side(&rect.left, &rect.width, in mt9m001_set_selection()
202 soc_camera_limit_side(&rect.top, &rect.height, in mt9m001_set_selection()
205 mt9m001->total_h = rect.height + mt9m001->y_skip_top + vblank; in mt9m001_set_selection()
217 ret = reg_write(client, MT9M001_COLUMN_START, rect.left); in mt9m001_set_selection()
219 ret = reg_write(client, MT9M001_ROW_START, rect.top); in mt9m001_set_selection()
[all …]
Dmt9v022.c156 struct v4l2_rect rect; /* Sensor window */ member
285 struct v4l2_rect rect = sel->r; in mt9v022_set_selection() local
295 rect.width = ALIGN(rect.width, 2); in mt9v022_set_selection()
296 rect.height = ALIGN(rect.height, 2); in mt9v022_set_selection()
300 soc_camera_limit_side(&rect.left, &rect.width, in mt9v022_set_selection()
303 soc_camera_limit_side(&rect.top, &rect.height, in mt9v022_set_selection()
311 rect.height + mt9v022->y_skip_top + 43); in mt9v022_set_selection()
323 ret = reg_write(client, MT9V022_COLUMN_START, rect.left); in mt9v022_set_selection()
325 ret = reg_write(client, MT9V022_ROW_START, rect.top); in mt9v022_set_selection()
339 rect.width > min_row - min_blank ? in mt9v022_set_selection()
[all …]
Dov772x.c390 struct v4l2_rect rect; member
489 .rect = {
498 .rect = {
669 u32 diff = abs(width - ov772x_win_sizes[i].rect.width) in ov772x_select_win()
670 + abs(height - ov772x_win_sizes[i].rect.height); in ov772x_select_win()
761 ret = ov772x_write(client, HSTART, win->rect.left >> 2); in ov772x_set_params()
764 ret = ov772x_write(client, HSIZE, win->rect.width >> 2); in ov772x_set_params()
767 ret = ov772x_write(client, VSTART, win->rect.top >> 1); in ov772x_set_params()
770 ret = ov772x_write(client, VSIZE, win->rect.height >> 1); in ov772x_set_params()
773 ret = ov772x_write(client, HOUTSIZE, win->rect.width >> 2); in ov772x_set_params()
[all …]
/Linux-v4.19/drivers/video/fbdev/savage/
Dsavagefb_accel.c65 void savagefb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) in savagefb_fillrect() argument
70 if (!rect->width || !rect->height) in savagefb_fillrect()
74 color = rect->color; in savagefb_fillrect()
76 color = ((u32 *)info->pseudo_palette)[rect->color]; in savagefb_fillrect()
83 BCI_CMD_SET_ROP(cmd, savagefb_rop[rect->rop]); in savagefb_fillrect()
88 BCI_SEND( BCI_X_Y(rect->dx, rect->dy) ); in savagefb_fillrect()
89 BCI_SEND( BCI_W_H(rect->width, rect->height) ); in savagefb_fillrect()
/Linux-v4.19/drivers/gpu/ipu-v3/
Dipu-cpmem.c734 ipu_cpmem_set_resolution(ch, image->rect.width, image->rect.height); in ipu_cpmem_set_image()
741 offset = Y_OFFSET(pix, image->rect.left, image->rect.top); in ipu_cpmem_set_image()
742 u_offset = U_OFFSET(pix, image->rect.left, in ipu_cpmem_set_image()
743 image->rect.top) - offset; in ipu_cpmem_set_image()
744 v_offset = V_OFFSET(pix, image->rect.left, in ipu_cpmem_set_image()
745 image->rect.top) - offset; in ipu_cpmem_set_image()
751 offset = Y_OFFSET(pix, image->rect.left, image->rect.top); in ipu_cpmem_set_image()
752 u_offset = U_OFFSET(pix, image->rect.left, in ipu_cpmem_set_image()
753 image->rect.top) - offset; in ipu_cpmem_set_image()
754 v_offset = V_OFFSET(pix, image->rect.left, in ipu_cpmem_set_image()
[all …]
/Linux-v4.19/drivers/video/fbdev/mb862xx/
Dmb862xxfb_accel.c257 const struct fb_fillrect *rect) in mb86290fb_fillrect() argument
266 if (!rect->width || !rect->height || rect->dx > vxres in mb86290fb_fillrect()
267 || rect->dy > vyres) in mb86290fb_fillrect()
272 x2 = rect->dx + rect->width; in mb86290fb_fillrect()
273 y2 = rect->dy + rect->height; in mb86290fb_fillrect()
276 width = x2 - rect->dx; in mb86290fb_fillrect()
277 height = y2 - rect->dy; in mb86290fb_fillrect()
280 fg = ((u32 *) (info->pseudo_palette))[rect->color]; in mb86290fb_fillrect()
282 fg = rect->color; in mb86290fb_fillrect()
284 switch (rect->rop) { in mb86290fb_fillrect()
[all …]
/Linux-v4.19/drivers/video/fbdev/core/
Dtileblit.c37 struct fb_tilerect rect; in tile_clear() local
41 rect.index = vc->vc_video_erase_char & in tile_clear()
43 rect.fg = attr_fgcol_ec(fgshift, vc, info); in tile_clear()
44 rect.bg = attr_bgcol_ec(bgshift, vc, info); in tile_clear()
45 rect.sx = sx; in tile_clear()
46 rect.sy = sy; in tile_clear()
47 rect.width = width; in tile_clear()
48 rect.height = height; in tile_clear()
49 rect.rop = ROP_COPY; in tile_clear()
51 info->tileops->fb_tilefill(info, &rect); in tile_clear()
/Linux-v4.19/drivers/gpu/drm/nouveau/
Dnv50_fbcon.c31 nv50_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect) in nv50_fbcon_fillrect() argument
38 ret = RING_SPACE(chan, rect->rop == ROP_COPY ? 7 : 11); in nv50_fbcon_fillrect()
42 if (rect->rop != ROP_COPY) { in nv50_fbcon_fillrect()
49 OUT_RING(chan, ((uint32_t *)info->pseudo_palette)[rect->color]); in nv50_fbcon_fillrect()
51 OUT_RING(chan, rect->color); in nv50_fbcon_fillrect()
53 OUT_RING(chan, rect->dx); in nv50_fbcon_fillrect()
54 OUT_RING(chan, rect->dy); in nv50_fbcon_fillrect()
55 OUT_RING(chan, rect->dx + rect->width); in nv50_fbcon_fillrect()
56 OUT_RING(chan, rect->dy + rect->height); in nv50_fbcon_fillrect()
57 if (rect->rop != ROP_COPY) { in nv50_fbcon_fillrect()
Dnvc0_fbcon.c31 nvc0_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect) in nvc0_fbcon_fillrect() argument
38 ret = RING_SPACE(chan, rect->rop == ROP_COPY ? 7 : 11); in nvc0_fbcon_fillrect()
42 if (rect->rop != ROP_COPY) { in nvc0_fbcon_fillrect()
49 OUT_RING (chan, ((uint32_t *)info->pseudo_palette)[rect->color]); in nvc0_fbcon_fillrect()
51 OUT_RING (chan, rect->color); in nvc0_fbcon_fillrect()
53 OUT_RING (chan, rect->dx); in nvc0_fbcon_fillrect()
54 OUT_RING (chan, rect->dy); in nvc0_fbcon_fillrect()
55 OUT_RING (chan, rect->dx + rect->width); in nvc0_fbcon_fillrect()
56 OUT_RING (chan, rect->dy + rect->height); in nvc0_fbcon_fillrect()
57 if (rect->rop != ROP_COPY) { in nvc0_fbcon_fillrect()
/Linux-v4.19/drivers/media/platform/qcom/camss/
Dcamss-vfe.c1554 struct v4l2_rect *rect; in vfe_try_format() local
1556 rect = __vfe_get_crop(line, cfg, which); in vfe_try_format()
1558 fmt->width = rect->width; in vfe_try_format()
1559 fmt->height = rect->height; in vfe_try_format()
1577 struct v4l2_rect *rect, in vfe_try_compose() argument
1584 if (rect->width > fmt->width) in vfe_try_compose()
1585 rect->width = fmt->width; in vfe_try_compose()
1587 if (rect->height > fmt->height) in vfe_try_compose()
1588 rect->height = fmt->height; in vfe_try_compose()
1590 if (fmt->width > rect->width * SCALER_RATIO_MAX) in vfe_try_compose()
[all …]
/Linux-v4.19/drivers/gpu/drm/qxl/
Dqxl_draw.c73 const struct qxl_rect *rect, in make_drawable() argument
104 if (rect) in make_drawable()
105 drawable->bbox = *rect; in make_drawable()
158 struct qxl_rect rect; in qxl_draw_opaque_fb() local
195 rect.left = x; in qxl_draw_opaque_fb()
196 rect.right = x + width; in qxl_draw_opaque_fb()
197 rect.top = y; in qxl_draw_opaque_fb()
198 rect.bottom = y + height; in qxl_draw_opaque_fb()
200 ret = make_drawable(qdev, 0, QXL_DRAW_COPY, &rect, release); in qxl_draw_opaque_fb()
407 struct qxl_rect rect; in qxl_draw_copyarea() local
[all …]
/Linux-v4.19/drivers/media/platform/
Dsh_vou.c81 struct v4l2_rect rect; member
435 struct v4l2_rect *rect = &vou_dev->rect; in sh_vou_configure_geometry() local
448 frame_out_height = rect->height / 2; in sh_vou_configure_geometry()
449 frame_out_top = rect->top / 2; in sh_vou_configure_geometry()
473 dsr_h = rect->width + rect->left; in sh_vou_configure_geometry()
479 rect->left, frame_out_top, dsr_h, dsr_v); in sh_vou_configure_geometry()
484 sh_vou_reg_ab_write(vou_dev, VOUDPR, (rect->left << 16) | frame_out_top); in sh_vou_configure_geometry()
723 geo.output = vou_dev->rect; in sh_vou_set_fmt_vid_out()
758 vou_dev->rect = geo.output; in sh_vou_set_fmt_vid_out()
845 vou_dev->rect.top = vou_dev->rect.left = 0; in sh_vou_s_std()
[all …]
/Linux-v4.19/drivers/video/fbdev/
Dwmt_ge_rops.c49 void wmt_ge_fillrect(struct fb_info *p, const struct fb_fillrect *rect) in wmt_ge_fillrect() argument
58 fg = ((u32 *) (p->pseudo_palette))[rect->color]; in wmt_ge_fillrect()
60 fg = rect->color; in wmt_ge_fillrect()
73 writel(rect->dx, regbase + GE_DESTAREAX_OFF); in wmt_ge_fillrect()
74 writel(rect->dy, regbase + GE_DESTAREAY_OFF); in wmt_ge_fillrect()
75 writel(rect->width - 1, regbase + GE_DESTAREAW_OFF); in wmt_ge_fillrect()
76 writel(rect->height - 1, regbase + GE_DESTAREAH_OFF); in wmt_ge_fillrect()
80 writel(rect->rop == ROP_XOR ? 0x5a : 0xf0, regbase + GE_ROPCODE_OFF); in wmt_ge_fillrect()
Dhitfb.c125 static void hitfb_fillrect(struct fb_info *p, const struct fb_fillrect *rect) in hitfb_fillrect() argument
127 if (rect->rop != ROP_COPY) in hitfb_fillrect()
128 cfb_fillrect(p, rect); in hitfb_fillrect()
135 fb_writew(((u32 *) (p->pseudo_palette))[rect->color], in hitfb_fillrect()
137 hitfb_accel_set_dest(1, rect->dx, rect->dy, rect->width, in hitfb_fillrect()
138 rect->height); in hitfb_fillrect()
141 fb_writew(rect->color, HD64461_GRSCR); in hitfb_fillrect()
142 hitfb_accel_set_dest(0, rect->dx, rect->dy, rect->width, in hitfb_fillrect()
143 rect->height); in hitfb_fillrect()
/Linux-v4.19/drivers/video/fbdev/matrox/
Dmatroxfb_accel.c105 static void matroxfb_fillrect(struct fb_info* info, const struct fb_fillrect* rect);
107 static void matroxfb_cfb4_fillrect(struct fb_info* info, const struct fb_fillrect* rect);
326 static void matroxfb_fillrect(struct fb_info* info, const struct fb_fillrect* rect) { in matroxfb_fillrect() argument
329 switch (rect->rop) { in matroxfb_fillrect()
331 …_clear(minfo, ((u_int32_t *)info->pseudo_palette)[rect->color], rect->dy, rect->dx, rect->height, in matroxfb_fillrect()
394 static void matroxfb_cfb4_fillrect(struct fb_info* info, const struct fb_fillrect* rect) { in matroxfb_cfb4_fillrect() argument
397 switch (rect->rop) { in matroxfb_cfb4_fillrect()
399 …_clear(minfo, ((u_int32_t *)info->pseudo_palette)[rect->color], rect->dy, rect->dx, rect->height, in matroxfb_cfb4_fillrect()
/Linux-v4.19/tools/perf/ui/gtk/
Dbrowser.c20 GdkRectangle rect; in perf_gtk__resize_window() local
30 gdk_screen_get_monitor_geometry(screen, monitor, &rect); in perf_gtk__resize_window()
32 width = rect.width * 3 / 4; in perf_gtk__resize_window()
33 height = rect.height * 3 / 4; in perf_gtk__resize_window()
/Linux-v4.19/drivers/video/fbdev/nvidia/
Dnv_accel.c318 void nvidiafb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) in nvidiafb_fillrect() argument
327 cfb_fillrect(info, rect); in nvidiafb_fillrect()
332 color = rect->color; in nvidiafb_fillrect()
334 color = ((u32 *) info->pseudo_palette)[rect->color]; in nvidiafb_fillrect()
336 if (rect->rop != ROP_COPY) in nvidiafb_fillrect()
337 NVSetRopSolid(info, rect->rop, ~0); in nvidiafb_fillrect()
343 NVDmaNext(par, (rect->dx << 16) | rect->dy); in nvidiafb_fillrect()
344 NVDmaNext(par, (rect->width << 16) | rect->height); in nvidiafb_fillrect()
348 if (rect->rop != ROP_COPY) in nvidiafb_fillrect()

1234567