Lines Matching refs:frm
322 static int get_plane_info(struct gsc_frame *frm, u32 addr, u32 *index, u32 *ret_addr) in get_plane_info() argument
324 if (frm->addr.y == addr) { in get_plane_info()
326 *ret_addr = frm->addr.y; in get_plane_info()
327 } else if (frm->addr.cb == addr) { in get_plane_info()
329 *ret_addr = frm->addr.cb; in get_plane_info()
330 } else if (frm->addr.cr == addr) { in get_plane_info()
332 *ret_addr = frm->addr.cr; in get_plane_info()
340 void gsc_set_prefbuf(struct gsc_dev *gsc, struct gsc_frame *frm) in gsc_set_prefbuf() argument
345 f_chk_addr = frm->addr.y; in gsc_set_prefbuf()
346 f_chk_len = frm->payload[0]; in gsc_set_prefbuf()
347 if (frm->fmt->num_planes == 2) { in gsc_set_prefbuf()
348 s_chk_addr = frm->addr.cb; in gsc_set_prefbuf()
349 s_chk_len = frm->payload[1]; in gsc_set_prefbuf()
350 } else if (frm->fmt->num_planes == 3) { in gsc_set_prefbuf()
355 t_min = min3(frm->addr.y, frm->addr.cb, frm->addr.cr); in gsc_set_prefbuf()
356 if (get_plane_info(frm, t_min, &low_plane, &low_addr)) in gsc_set_prefbuf()
358 t_max = max3(frm->addr.y, frm->addr.cb, frm->addr.cr); in gsc_set_prefbuf()
359 if (get_plane_info(frm, t_max, &high_plane, &high_addr)) in gsc_set_prefbuf()
364 mid_addr = frm->addr.y; in gsc_set_prefbuf()
366 mid_addr = frm->addr.cb; in gsc_set_prefbuf()
368 mid_addr = frm->addr.cr; in gsc_set_prefbuf()
373 if (mid_addr + frm->payload[mid_plane] - low_addr > in gsc_set_prefbuf()
374 high_addr + frm->payload[high_plane] - mid_addr) { in gsc_set_prefbuf()
375 f_chk_len = frm->payload[low_plane]; in gsc_set_prefbuf()
378 frm->payload[high_plane] - mid_addr; in gsc_set_prefbuf()
381 frm->payload[mid_plane] - low_addr; in gsc_set_prefbuf()
383 s_chk_len = frm->payload[high_plane]; in gsc_set_prefbuf()