Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

samsungypr0/1: Minor improvements to framebuffer driver.

* Distinct error codes for all failures
* Corrected some comments and error messages

The ypr0/r1 target should be switched over to the generic lcd-linuxfb
driver, but that will come later.

Change-Id: Idc3867a96db7e431847473708712f88dd2725a96

+7 -7
+7 -7
firmware/target/hosted/samsungypr/lcd-ypr.c
··· 66 66 exit(2); 67 67 } 68 68 69 - /* Now we get the settable settings, and we set 16 bit bpp */ 69 + /* Now we get the settable settings */ 70 70 if (ioctl(dev_fd, FBIOGET_VSCREENINFO, &vinfo) == -1) { 71 71 perror("Error reading variable information"); 72 72 exit(3); 73 73 } 74 74 75 - vinfo.bits_per_pixel = LCD_DEPTH; 75 + vinfo.bits_per_pixel = LCD_DEPTH; /* Explicitly set our desired depth */ 76 76 77 77 if (ioctl(dev_fd, FBIOPUT_VSCREENINFO, &vinfo)) { 78 - perror("fbset(ioctl)"); 79 - exit(4); 78 + perror("fbset(ioctl)"); 79 + exit(4); 80 80 } 81 81 82 82 printf("%dx%d, %dbpp\n", vinfo.xres, vinfo.yres, vinfo.bits_per_pixel); ··· 84 84 /* Figure out the size of the screen in bytes */ 85 85 screensize = vinfo.xres * vinfo.yres * vinfo.bits_per_pixel / 8; 86 86 if (screensize != FRAMEBUFFER_SIZE) { 87 - exit(4); 88 87 perror("Display and framebuffer mismatch!\n"); 88 + exit(5); 89 89 } 90 90 91 91 /* Map the device to memory */ 92 92 dev_fb = mmap(0, screensize, PROT_READ | PROT_WRITE, MAP_SHARED, dev_fd, 0); 93 93 if ((int)dev_fb == -1) { 94 94 perror("Error: failed to map framebuffer device to memory"); 95 - exit(4); 95 + exit(6); 96 96 } 97 - printf("The framebuffer device was mapped to memory successfully.\n"); 97 + printf("Framebuffer device successfully mapped into memory.\n"); 98 98 99 99 /* Be sure to turn on display at startup */ 100 100 ioctl(dev_fd, FBIOBLANK, VESA_NO_BLANKING);