Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2015 Google, Inc |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #include <common.h> |
| 7 | #include <bmp_layout.h> |
| 8 | #include <dm.h> |
Simon Glass | 0f2af88 | 2020-05-10 11:40:05 -0600 | [diff] [blame] | 9 | #include <log.h> |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 10 | #include <mapmem.h> |
Anatolij Gustschin | 410f096 | 2018-12-01 15:30:08 +0100 | [diff] [blame] | 11 | #include <splash.h> |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 12 | #include <video.h> |
| 13 | #include <watchdog.h> |
| 14 | #include <asm/unaligned.h> |
| 15 | |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 16 | #define BMP_RLE8_ESCAPE 0 |
| 17 | #define BMP_RLE8_EOL 0 |
| 18 | #define BMP_RLE8_EOBMP 1 |
| 19 | #define BMP_RLE8_DELTA 2 |
| 20 | |
Simon Glass | 998e16a | 2021-11-19 13:23:54 -0700 | [diff] [blame] | 21 | /** |
| 22 | * get_bmp_col_16bpp() - Convert a colour-table entry into a 16bpp pixel value |
| 23 | * |
Heinrich Schuchardt | 47b4c02 | 2022-01-19 18:05:50 +0100 | [diff] [blame] | 24 | * Return: value to write to the 16bpp frame buffer for this palette entry |
Simon Glass | 998e16a | 2021-11-19 13:23:54 -0700 | [diff] [blame] | 25 | */ |
| 26 | static uint get_bmp_col_16bpp(struct bmp_color_table_entry cte) |
| 27 | { |
| 28 | return ((cte.red << 8) & 0xf800) | |
| 29 | ((cte.green << 3) & 0x07e0) | |
| 30 | ((cte.blue >> 3) & 0x001f); |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * write_pix8() - Write a pixel from a BMP image into the framebuffer |
| 35 | * |
| 36 | * This handles frame buffers with 8, 16, 24 or 32 bits per pixel |
| 37 | * |
| 38 | * @fb: Place in frame buffer to update |
| 39 | * @bpix: Frame buffer bits-per-pixel, which controls how many bytes are written |
| 40 | * @palette: BMP palette table |
| 41 | * @bmap: Pointer to BMP bitmap position to write. This contains a single byte |
| 42 | * which is either written directly (bpix == 8) or used to look up the |
| 43 | * palette to get a colour to write |
| 44 | */ |
| 45 | static void write_pix8(u8 *fb, uint bpix, struct bmp_color_table_entry *palette, |
| 46 | u8 *bmap) |
| 47 | { |
| 48 | if (bpix == 8) { |
| 49 | *fb++ = *bmap; |
| 50 | } else if (bpix == 16) { |
| 51 | *(u16 *)fb = get_bmp_col_16bpp(palette[*bmap]); |
| 52 | } else { |
| 53 | /* Only support big endian */ |
| 54 | struct bmp_color_table_entry *cte = &palette[*bmap]; |
| 55 | |
| 56 | if (bpix == 24) { |
| 57 | *fb++ = cte->red; |
| 58 | *fb++ = cte->green; |
| 59 | *fb++ = cte->blue; |
| 60 | } else { |
| 61 | *fb++ = cte->blue; |
| 62 | *fb++ = cte->green; |
| 63 | *fb++ = cte->red; |
| 64 | *fb++ = 0; |
| 65 | } |
| 66 | } |
| 67 | } |
| 68 | |
Simon Glass | 490bb99 | 2021-11-19 13:23:55 -0700 | [diff] [blame] | 69 | static void draw_unencoded_bitmap(u8 **fbp, uint bpix, uchar *bmap, |
| 70 | struct bmp_color_table_entry *palette, |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 71 | int cnt) |
| 72 | { |
Simon Glass | 490bb99 | 2021-11-19 13:23:55 -0700 | [diff] [blame] | 73 | u8 *fb = *fbp; |
| 74 | |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 75 | while (cnt > 0) { |
Simon Glass | 490bb99 | 2021-11-19 13:23:55 -0700 | [diff] [blame] | 76 | write_pix8(fb, bpix, palette, bmap++); |
| 77 | fb += bpix / 8; |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 78 | cnt--; |
| 79 | } |
Simon Glass | 490bb99 | 2021-11-19 13:23:55 -0700 | [diff] [blame] | 80 | *fbp = fb; |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 81 | } |
| 82 | |
Simon Glass | 490bb99 | 2021-11-19 13:23:55 -0700 | [diff] [blame] | 83 | static void draw_encoded_bitmap(u8 **fbp, uint bpix, |
| 84 | struct bmp_color_table_entry *palette, u8 *bmap, |
| 85 | int cnt) |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 86 | { |
Simon Glass | 490bb99 | 2021-11-19 13:23:55 -0700 | [diff] [blame] | 87 | u8 *fb = *fbp; |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 88 | |
| 89 | while (cnt > 0) { |
Simon Glass | 490bb99 | 2021-11-19 13:23:55 -0700 | [diff] [blame] | 90 | write_pix8(fb, bpix, palette, bmap); |
| 91 | fb += bpix / 8; |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 92 | cnt--; |
| 93 | } |
| 94 | *fbp = fb; |
| 95 | } |
| 96 | |
| 97 | static void video_display_rle8_bitmap(struct udevice *dev, |
Simon Glass | 490bb99 | 2021-11-19 13:23:55 -0700 | [diff] [blame] | 98 | struct bmp_image *bmp, uint bpix, |
| 99 | struct bmp_color_table_entry *palette, |
Patrice Chotard | cb30f7d | 2019-11-20 14:11:16 +0100 | [diff] [blame] | 100 | uchar *fb, int x_off, int y_off, |
| 101 | ulong width, ulong height) |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 102 | { |
| 103 | struct video_priv *priv = dev_get_uclass_priv(dev); |
| 104 | uchar *bmap; |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 105 | ulong cnt, runlen; |
| 106 | int x, y; |
| 107 | int decode = 1; |
Simon Glass | 490bb99 | 2021-11-19 13:23:55 -0700 | [diff] [blame] | 108 | uint bytes_per_pixel = bpix / 8; |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 109 | |
| 110 | debug("%s\n", __func__); |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 111 | bmap = (uchar *)bmp + get_unaligned_le32(&bmp->header.data_offset); |
| 112 | |
| 113 | x = 0; |
| 114 | y = height - 1; |
| 115 | |
| 116 | while (decode) { |
| 117 | if (bmap[0] == BMP_RLE8_ESCAPE) { |
| 118 | switch (bmap[1]) { |
| 119 | case BMP_RLE8_EOL: |
| 120 | /* end of line */ |
| 121 | bmap += 2; |
| 122 | x = 0; |
| 123 | y--; |
Simon Glass | 490bb99 | 2021-11-19 13:23:55 -0700 | [diff] [blame] | 124 | fb -= width * bytes_per_pixel + |
| 125 | priv->line_length; |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 126 | break; |
| 127 | case BMP_RLE8_EOBMP: |
| 128 | /* end of bitmap */ |
| 129 | decode = 0; |
| 130 | break; |
| 131 | case BMP_RLE8_DELTA: |
| 132 | /* delta run */ |
| 133 | x += bmap[2]; |
| 134 | y -= bmap[3]; |
Simon Glass | 490bb99 | 2021-11-19 13:23:55 -0700 | [diff] [blame] | 135 | fb = (uchar *)(priv->fb + |
| 136 | (y + y_off - 1) * priv->line_length + |
| 137 | (x + x_off) * bytes_per_pixel); |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 138 | bmap += 4; |
| 139 | break; |
| 140 | default: |
| 141 | /* unencoded run */ |
| 142 | runlen = bmap[1]; |
| 143 | bmap += 2; |
| 144 | if (y < height) { |
| 145 | if (x < width) { |
| 146 | if (x + runlen > width) |
| 147 | cnt = width - x; |
| 148 | else |
| 149 | cnt = runlen; |
| 150 | draw_unencoded_bitmap( |
Simon Glass | 490bb99 | 2021-11-19 13:23:55 -0700 | [diff] [blame] | 151 | &fb, bpix, |
| 152 | bmap, palette, cnt); |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 153 | } |
| 154 | x += runlen; |
| 155 | } |
| 156 | bmap += runlen; |
| 157 | if (runlen & 1) |
| 158 | bmap++; |
| 159 | } |
| 160 | } else { |
| 161 | /* encoded run */ |
| 162 | if (y < height) { |
| 163 | runlen = bmap[0]; |
| 164 | if (x < width) { |
| 165 | /* aggregate the same code */ |
| 166 | while (bmap[0] == 0xff && |
| 167 | bmap[2] != BMP_RLE8_ESCAPE && |
| 168 | bmap[1] == bmap[3]) { |
| 169 | runlen += bmap[2]; |
| 170 | bmap += 2; |
| 171 | } |
| 172 | if (x + runlen > width) |
| 173 | cnt = width - x; |
| 174 | else |
| 175 | cnt = runlen; |
Simon Glass | 490bb99 | 2021-11-19 13:23:55 -0700 | [diff] [blame] | 176 | draw_encoded_bitmap(&fb, bpix, palette, |
| 177 | &bmap[1], cnt); |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 178 | } |
| 179 | x += runlen; |
| 180 | } |
| 181 | bmap += 2; |
| 182 | } |
| 183 | } |
| 184 | } |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 185 | |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 186 | /** |
| 187 | * video_splash_align_axis() - Align a single coordinate |
| 188 | * |
| 189 | *- if a coordinate is 0x7fff then the image will be centred in |
| 190 | * that direction |
| 191 | *- if a coordinate is -ve then it will be offset to the |
| 192 | * left/top of the centre by that many pixels |
| 193 | *- if a coordinate is positive it will be used unchnaged. |
| 194 | * |
| 195 | * @axis: Input and output coordinate |
| 196 | * @panel_size: Size of panel in pixels for that axis |
| 197 | * @picture_size: Size of bitmap in pixels for that axis |
| 198 | */ |
| 199 | static void video_splash_align_axis(int *axis, unsigned long panel_size, |
| 200 | unsigned long picture_size) |
| 201 | { |
Patrice Chotard | 066eace | 2019-11-20 14:11:15 +0100 | [diff] [blame] | 202 | long panel_picture_delta = panel_size - picture_size; |
| 203 | long axis_alignment; |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 204 | |
| 205 | if (*axis == BMP_ALIGN_CENTER) |
| 206 | axis_alignment = panel_picture_delta / 2; |
| 207 | else if (*axis < 0) |
| 208 | axis_alignment = panel_picture_delta + *axis + 1; |
| 209 | else |
| 210 | return; |
| 211 | |
| 212 | *axis = max(0, (int)axis_alignment); |
| 213 | } |
| 214 | |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 215 | int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y, |
| 216 | bool align) |
| 217 | { |
| 218 | struct video_priv *priv = dev_get_uclass_priv(dev); |
Simon Glass | 1f47573 | 2016-01-30 15:45:16 -0700 | [diff] [blame] | 219 | int i, j; |
Simon Glass | 4761c8c | 2020-07-02 21:12:27 -0600 | [diff] [blame] | 220 | uchar *start, *fb; |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 221 | struct bmp_image *bmp = map_sysmem(bmp_image, 0); |
| 222 | uchar *bmap; |
| 223 | ushort padded_width; |
| 224 | unsigned long width, height, byte_width; |
| 225 | unsigned long pwidth = priv->xsize; |
| 226 | unsigned colours, bpix, bmp_bpix; |
| 227 | struct bmp_color_table_entry *palette; |
| 228 | int hdr_size; |
Simon Glass | 4761c8c | 2020-07-02 21:12:27 -0600 | [diff] [blame] | 229 | int ret; |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 230 | |
| 231 | if (!bmp || !(bmp->header.signature[0] == 'B' && |
| 232 | bmp->header.signature[1] == 'M')) { |
| 233 | printf("Error: no valid bmp image at %lx\n", bmp_image); |
| 234 | |
| 235 | return -EINVAL; |
| 236 | } |
| 237 | |
| 238 | width = get_unaligned_le32(&bmp->header.width); |
| 239 | height = get_unaligned_le32(&bmp->header.height); |
| 240 | bmp_bpix = get_unaligned_le16(&bmp->header.bit_count); |
| 241 | hdr_size = get_unaligned_le16(&bmp->header.size); |
| 242 | debug("hdr_size=%d, bmp_bpix=%d\n", hdr_size, bmp_bpix); |
| 243 | palette = (void *)bmp + 14 + hdr_size; |
| 244 | |
| 245 | colours = 1 << bmp_bpix; |
| 246 | |
| 247 | bpix = VNBITS(priv->bpix); |
| 248 | |
| 249 | if (bpix != 1 && bpix != 8 && bpix != 16 && bpix != 32) { |
| 250 | printf("Error: %d bit/pixel mode, but BMP has %d bit/pixel\n", |
| 251 | bpix, bmp_bpix); |
| 252 | |
| 253 | return -EINVAL; |
| 254 | } |
| 255 | |
| 256 | /* |
Stefan Roese | 7ee599e | 2019-01-30 08:54:12 +0100 | [diff] [blame] | 257 | * We support displaying 8bpp and 24bpp BMPs on 16bpp LCDs |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 258 | * and displaying 24bpp BMPs on 32bpp LCDs |
Stefan Roese | 7ee599e | 2019-01-30 08:54:12 +0100 | [diff] [blame] | 259 | */ |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 260 | if (bpix != bmp_bpix && |
| 261 | !(bmp_bpix == 8 && bpix == 16) && |
Ye Li | b5c864d | 2020-06-10 02:52:23 -0700 | [diff] [blame] | 262 | !(bmp_bpix == 8 && bpix == 24) && |
| 263 | !(bmp_bpix == 8 && bpix == 32) && |
Stefan Roese | 7ee599e | 2019-01-30 08:54:12 +0100 | [diff] [blame] | 264 | !(bmp_bpix == 24 && bpix == 16) && |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 265 | !(bmp_bpix == 24 && bpix == 32)) { |
| 266 | printf("Error: %d bit/pixel mode, but BMP has %d bit/pixel\n", |
| 267 | bpix, get_unaligned_le16(&bmp->header.bit_count)); |
| 268 | return -EPERM; |
| 269 | } |
| 270 | |
| 271 | debug("Display-bmp: %d x %d with %d colours, display %d\n", |
| 272 | (int)width, (int)height, (int)colours, 1 << bpix); |
| 273 | |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 274 | padded_width = (width & 0x3 ? (width & ~0x3) + 4 : width); |
| 275 | |
| 276 | if (align) { |
| 277 | video_splash_align_axis(&x, priv->xsize, width); |
| 278 | video_splash_align_axis(&y, priv->ysize, height); |
| 279 | } |
| 280 | |
| 281 | if ((x + width) > pwidth) |
| 282 | width = pwidth - x; |
| 283 | if ((y + height) > priv->ysize) |
| 284 | height = priv->ysize - y; |
| 285 | |
| 286 | bmap = (uchar *)bmp + get_unaligned_le32(&bmp->header.data_offset); |
Simon Glass | 4761c8c | 2020-07-02 21:12:27 -0600 | [diff] [blame] | 287 | start = (uchar *)(priv->fb + |
| 288 | (y + height) * priv->line_length + x * bpix / 8); |
| 289 | |
| 290 | /* Move back to the final line to be drawn */ |
| 291 | fb = start - priv->line_length; |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 292 | |
| 293 | switch (bmp_bpix) { |
| 294 | case 1: |
Simon Glass | 6149470 | 2021-11-19 13:24:00 -0700 | [diff] [blame] | 295 | case 8: |
| 296 | if (IS_ENABLED(CONFIG_VIDEO_BMP_RLE8)) { |
| 297 | u32 compression = get_unaligned_le32( |
| 298 | &bmp->header.compression); |
| 299 | debug("compressed %d %d\n", compression, BMP_BI_RLE8); |
| 300 | if (compression == BMP_BI_RLE8) { |
| 301 | video_display_rle8_bitmap(dev, bmp, bpix, palette, fb, |
| 302 | x, y, width, height); |
| 303 | break; |
| 304 | } |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 305 | } |
Simon Glass | 6149470 | 2021-11-19 13:24:00 -0700 | [diff] [blame] | 306 | |
| 307 | /* Not compressed */ |
Ye Li | b5c864d | 2020-06-10 02:52:23 -0700 | [diff] [blame] | 308 | byte_width = width * (bpix / 8); |
| 309 | if (!byte_width) |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 310 | byte_width = width; |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 311 | |
| 312 | for (i = 0; i < height; ++i) { |
| 313 | WATCHDOG_RESET(); |
| 314 | for (j = 0; j < width; j++) { |
Simon Glass | 998e16a | 2021-11-19 13:23:54 -0700 | [diff] [blame] | 315 | write_pix8(fb, bpix, palette, bmap); |
| 316 | bmap++; |
| 317 | fb += bpix / 8; |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 318 | } |
| 319 | bmap += (padded_width - width); |
| 320 | fb -= byte_width + priv->line_length; |
| 321 | } |
| 322 | break; |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 323 | case 16: |
Simon Glass | 6149470 | 2021-11-19 13:24:00 -0700 | [diff] [blame] | 324 | if (IS_ENABLED(CONFIG_BMP_16BPP)) { |
| 325 | for (i = 0; i < height; ++i) { |
| 326 | WATCHDOG_RESET(); |
| 327 | for (j = 0; j < width; j++) { |
| 328 | *fb++ = *bmap++; |
| 329 | *fb++ = *bmap++; |
| 330 | } |
| 331 | bmap += (padded_width - width); |
| 332 | fb -= width * 2 + priv->line_length; |
Simon Glass | aa662a6 | 2021-11-19 13:23:53 -0700 | [diff] [blame] | 333 | } |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 334 | } |
| 335 | break; |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 336 | case 24: |
Simon Glass | 6149470 | 2021-11-19 13:24:00 -0700 | [diff] [blame] | 337 | if (IS_ENABLED(CONFIG_BMP_24BPP)) { |
| 338 | for (i = 0; i < height; ++i) { |
| 339 | for (j = 0; j < width; j++) { |
| 340 | if (bpix == 16) { |
| 341 | /* 16bit 565RGB format */ |
| 342 | *(u16 *)fb = ((bmap[2] >> 3) |
| 343 | << 11) | |
| 344 | ((bmap[1] >> 2) << 5) | |
| 345 | (bmap[0] >> 3); |
| 346 | bmap += 3; |
| 347 | fb += 2; |
| 348 | } else { |
| 349 | *fb++ = *bmap++; |
| 350 | *fb++ = *bmap++; |
| 351 | *fb++ = *bmap++; |
| 352 | *fb++ = 0; |
| 353 | } |
Stefan Roese | 7ee599e | 2019-01-30 08:54:12 +0100 | [diff] [blame] | 354 | } |
Simon Glass | 6149470 | 2021-11-19 13:24:00 -0700 | [diff] [blame] | 355 | fb -= priv->line_length + width * (bpix / 8); |
| 356 | bmap += (padded_width - width); |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 357 | } |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 358 | } |
| 359 | break; |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 360 | case 32: |
Simon Glass | 6149470 | 2021-11-19 13:24:00 -0700 | [diff] [blame] | 361 | if (IS_ENABLED(CONFIG_BMP_32BPP)) { |
| 362 | for (i = 0; i < height; ++i) { |
| 363 | for (j = 0; j < width; j++) { |
| 364 | *fb++ = *bmap++; |
| 365 | *fb++ = *bmap++; |
| 366 | *fb++ = *bmap++; |
| 367 | *fb++ = *bmap++; |
| 368 | } |
| 369 | fb -= priv->line_length + width * (bpix / 8); |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 370 | } |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 371 | } |
| 372 | break; |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 373 | default: |
| 374 | break; |
| 375 | }; |
| 376 | |
Simon Glass | 4761c8c | 2020-07-02 21:12:27 -0600 | [diff] [blame] | 377 | /* Find the position of the top left of the image in the framebuffer */ |
| 378 | fb = (uchar *)(priv->fb + y * priv->line_length + x * bpix / 8); |
| 379 | ret = video_sync_copy(dev, start, fb); |
| 380 | if (ret) |
| 381 | return log_ret(ret); |
| 382 | |
Michal Simek | 632e3d4 | 2020-12-14 08:47:52 +0100 | [diff] [blame] | 383 | return video_sync(dev, false); |
Simon Glass | 68b2627 | 2016-01-18 19:52:22 -0700 | [diff] [blame] | 384 | } |