Lines Matching +full:device +full:- +full:width

1 // SPDX-License-Identifier: GPL-2.0+
20 * struct efi_gop_obj - graphical output protocol object
48 *size_of_info = sizeof(gopobj->info); in gop_query_mode()
49 *info = &gopobj->info; in gop_query_mode()
80 return (u16)(blt->red >> 3) << 11 | in efi_blt_col_to_vid16()
81 (u16)(blt->green >> 2) << 5 | in efi_blt_col_to_vid16()
82 (u16)(blt->blue >> 3); in efi_blt_col_to_vid16()
90 efi_uintn_t width, in gop_blt_int() argument
97 u32 *fb32 = gopobj->fb; in gop_blt_int()
98 u16 *fb16 = gopobj->fb; in gop_blt_int()
107 linelen = width; in gop_blt_int()
115 if (sx + width > linelen) in gop_blt_int()
120 if (sx + width > gopobj->info.width || in gop_blt_int()
121 sy + height > gopobj->info.height) in gop_blt_int()
133 if (dx + width > gopobj->info.width || in gop_blt_int()
134 dy + height > gopobj->info.height) in gop_blt_int()
138 if (dx + width > linelen) in gop_blt_int()
143 /* Calculate line width */ in gop_blt_int()
150 swidth = gopobj->info.width; in gop_blt_int()
163 dwidth = gopobj->info.width; in gop_blt_int()
175 for (j = 0; j < width; j++) { in gop_blt_int()
225 switch (gopobj->bpix) { in gop_get_bpp()
247 * our 2-dimensional loop gets executed very quickly, otherwise the system
258 efi_uintn_t dy, efi_uintn_t width, in gop_blt_video_fill() argument
263 dy, width, height, delta, vid_bpp); in gop_blt_video_fill()
270 efi_uintn_t dy, efi_uintn_t width, in gop_blt_buf_to_vid16() argument
274 dy, width, height, delta, 16); in gop_blt_buf_to_vid16()
281 efi_uintn_t dy, efi_uintn_t width, in gop_blt_buf_to_vid32() argument
285 dy, width, height, delta, 32); in gop_blt_buf_to_vid32()
292 efi_uintn_t dy, efi_uintn_t width, in gop_blt_vid_to_vid() argument
297 dy, width, height, delta, vid_bpp); in gop_blt_vid_to_vid()
304 efi_uintn_t dy, efi_uintn_t width, in gop_blt_vid_to_buf() argument
309 dx, dy, width, height, delta, vid_bpp); in gop_blt_vid_to_buf()
321 * @sx: source x-coordinate
322 * @sy: source y-coordinate
323 * @dx: destination x-coordinate
324 * @dy: destination y-coordinate
325 * @width: width of rectangle
333 efi_uintn_t dy, efi_uintn_t width, in gop_blt() argument
340 buffer, operation, sx, sy, dx, dy, width, height, delta); in gop_blt()
348 dy, width, height, delta, vid_bpp); in gop_blt()
351 /* This needs to be super-fast, so duplicate for 16/32bpp */ in gop_blt()
354 sy, dx, dy, width, height, in gop_blt()
358 sy, dx, dy, width, height, in gop_blt()
363 dy, width, height, delta, vid_bpp); in gop_blt()
367 dy, width, height, delta, vid_bpp); in gop_blt()
388 * If no supported video device exists this is not considered as an
403 /* We only support a single video output device for now */ in efi_gop_register()
405 debug("WARNING: No video device\n"); in efi_gop_register()
410 bpix = priv->bpix; in efi_gop_register()
413 fb_base = (uintptr_t)priv->fb; in efi_gop_register()
414 fb_size = priv->fb_size; in efi_gop_register()
415 fb = priv->fb; in efi_gop_register()
422 fb_base = gd->fb_base; in efi_gop_register()
424 fb = (void*)gd->fb_base; in efi_gop_register()
448 /* Hook up to the device list */ in efi_gop_register()
449 efi_add_handle(&gopobj->header); in efi_gop_register()
452 ret = efi_add_protocol(&gopobj->header, &efi_gop_guid, in efi_gop_register()
453 &gopobj->ops); in efi_gop_register()
458 gopobj->ops.query_mode = gop_query_mode; in efi_gop_register()
459 gopobj->ops.set_mode = gop_set_mode; in efi_gop_register()
460 gopobj->ops.blt = gop_blt; in efi_gop_register()
461 gopobj->ops.mode = &gopobj->mode; in efi_gop_register()
463 gopobj->mode.max_mode = 1; in efi_gop_register()
464 gopobj->mode.info = &gopobj->info; in efi_gop_register()
465 gopobj->mode.info_size = sizeof(gopobj->info); in efi_gop_register()
477 gopobj->mode.fb_base = fb_base; in efi_gop_register()
478 gopobj->mode.fb_size = fb_size; in efi_gop_register()
481 gopobj->info.version = 0; in efi_gop_register()
482 gopobj->info.width = col; in efi_gop_register()
483 gopobj->info.height = row; in efi_gop_register()
484 gopobj->info.pixel_format = EFI_GOT_BGRA8; in efi_gop_register()
485 gopobj->info.pixels_per_scanline = col; in efi_gop_register()
487 gopobj->bpix = bpix; in efi_gop_register()
488 gopobj->fb = fb; in efi_gop_register()