Lines Matching refs:frame
254 struct bdisp_frame *frame, dma_addr_t *paddr) in bdisp_get_addr() argument
256 if (!vb || !frame) in bdisp_get_addr()
261 if (frame->fmt->nb_planes > 1) in bdisp_get_addr()
264 frame->bytesperline * frame->height); in bdisp_get_addr()
266 if (frame->fmt->nb_planes > 2) in bdisp_get_addr()
269 (frame->bytesperline * frame->height) / 4); in bdisp_get_addr()
271 if (frame->fmt->nb_planes > 3) in bdisp_get_addr()
445 struct bdisp_frame *frame = ctx_get_frame(ctx, vq->type); in bdisp_queue_setup() local
447 if (IS_ERR(frame)) { in bdisp_queue_setup()
448 dev_err(ctx->bdisp_dev->dev, "Invalid frame (%p)\n", frame); in bdisp_queue_setup()
449 return PTR_ERR(frame); in bdisp_queue_setup()
452 if (!frame->fmt) { in bdisp_queue_setup()
458 return sizes[0] < frame->sizeimage ? -EINVAL : 0; in bdisp_queue_setup()
461 sizes[0] = frame->sizeimage; in bdisp_queue_setup()
469 struct bdisp_frame *frame = ctx_get_frame(ctx, vb->vb2_queue->type); in bdisp_buf_prepare() local
471 if (IS_ERR(frame)) { in bdisp_buf_prepare()
472 dev_err(ctx->bdisp_dev->dev, "Invalid frame (%p)\n", frame); in bdisp_buf_prepare()
473 return PTR_ERR(frame); in bdisp_buf_prepare()
477 vb2_set_plane_payload(vb, 0, frame->sizeimage); in bdisp_buf_prepare()
721 struct bdisp_frame *frame = ctx_get_frame(ctx, f->type); in bdisp_g_fmt() local
723 if (IS_ERR(frame)) { in bdisp_g_fmt()
724 dev_err(ctx->bdisp_dev->dev, "Invalid frame (%p)\n", frame); in bdisp_g_fmt()
725 return PTR_ERR(frame); in bdisp_g_fmt()
729 pix->width = frame->width; in bdisp_g_fmt()
730 pix->height = frame->height; in bdisp_g_fmt()
731 pix->pixelformat = frame->fmt->pixelformat; in bdisp_g_fmt()
732 pix->field = frame->field; in bdisp_g_fmt()
733 pix->bytesperline = frame->bytesperline; in bdisp_g_fmt()
734 pix->sizeimage = frame->sizeimage; in bdisp_g_fmt()
736 frame->colorspace : bdisp_dflt_fmt.colorspace; in bdisp_g_fmt()
795 struct bdisp_frame *frame; in bdisp_s_fmt() local
812 frame = (f->type == V4L2_BUF_TYPE_VIDEO_OUTPUT) ? in bdisp_s_fmt()
815 frame->fmt = bdisp_find_fmt(pix->pixelformat); in bdisp_s_fmt()
816 if (!frame->fmt) { in bdisp_s_fmt()
822 frame->width = pix->width; in bdisp_s_fmt()
823 frame->height = pix->height; in bdisp_s_fmt()
824 frame->bytesperline = pix->bytesperline; in bdisp_s_fmt()
825 frame->sizeimage = pix->sizeimage; in bdisp_s_fmt()
826 frame->field = pix->field; in bdisp_s_fmt()
828 frame->colorspace = pix->colorspace; in bdisp_s_fmt()
830 frame->crop.width = frame->width; in bdisp_s_fmt()
831 frame->crop.height = frame->height; in bdisp_s_fmt()
832 frame->crop.left = 0; in bdisp_s_fmt()
833 frame->crop.top = 0; in bdisp_s_fmt()
846 struct bdisp_frame *frame; in bdisp_g_selection() local
849 frame = ctx_get_frame(ctx, s->type); in bdisp_g_selection()
850 if (IS_ERR(frame)) { in bdisp_g_selection()
851 dev_err(ctx->bdisp_dev->dev, "Invalid frame (%p)\n", frame); in bdisp_g_selection()
852 return PTR_ERR(frame); in bdisp_g_selection()
860 s->r = frame->crop; in bdisp_g_selection()
867 s->r.width = frame->width; in bdisp_g_selection()
868 s->r.height = frame->height; in bdisp_g_selection()
881 s->r = frame->crop; in bdisp_g_selection()
888 s->r.width = frame->width; in bdisp_g_selection()
889 s->r.height = frame->height; in bdisp_g_selection()
924 struct bdisp_frame *frame; in bdisp_s_selection() local
942 frame = ctx_get_frame(ctx, s->type); in bdisp_s_selection()
943 if (IS_ERR(frame)) { in bdisp_s_selection()
944 dev_err(ctx->bdisp_dev->dev, "Invalid frame (%p)\n", frame); in bdisp_s_selection()
945 return PTR_ERR(frame); in bdisp_s_selection()
952 out.left = ALIGN(in->left, frame->fmt->w_align); in bdisp_s_selection()
953 out.top = ALIGN(in->top, frame->fmt->h_align); in bdisp_s_selection()
955 if ((out.left < 0) || (out.left >= frame->width) || in bdisp_s_selection()
956 (out.top < 0) || (out.top >= frame->height)) { in bdisp_s_selection()
960 frame->width, frame->height); in bdisp_s_selection()
965 out.width = ALIGN(in->width, frame->fmt->w_align); in bdisp_s_selection()
966 out.height = ALIGN(in->height, frame->fmt->w_align); in bdisp_s_selection()
968 if (((out.left + out.width) > frame->width) || in bdisp_s_selection()
969 ((out.top + out.height) > frame->height)) { in bdisp_s_selection()
973 frame->width, frame->height); in bdisp_s_selection()
993 frame->crop = out; in bdisp_s_selection()