2 Interface to the Dreambox dm800/dm8000 proprietary accel interface.
11 #include <sys/ioctl.h>
13 #define FBIO_ACCEL 0x23
15 static unsigned int displaylist[1024];
18 #define P(x, y) do { displaylist[ptr++] = x; displaylist[ptr++] = y; } while (0)
22 static int exec_list(void);
24 int bcm_accel_init(void)
26 fb_fd = open("/dev/fb/0", O_RDWR);
34 fprintf(stderr, "BCM accel interface not available - %m\n");
41 void bcm_accel_close(void)
46 static int exec_list(void)
57 ret = ioctl(fb_fd, FBIO_ACCEL, &l);
63 int src_addr, int src_width, int src_height, int src_stride, int src_format,
64 int dst_addr, int dst_width, int dst_height, int dst_stride,
65 int src_x, int src_y, int width, int height,
66 int dst_x, int dst_y, int dwidth, int dheight,
67 int pal_addr, int flags)
69 C(0x43); // reset source
70 C(0x53); // reset dest
71 C(0x5b); // reset pattern
72 C(0x67); // reset blend
73 C(0x75); // reset output
75 P(0x0, src_addr); // set source addr
76 P(0x1, src_stride); // set source pitch
77 P(0x2, src_width); // source width
78 P(0x3, src_height); // height
82 P(0x4, 0x7e48888); // format: ARGB 8888
85 P(0x4, 0x12e40008); // indexed 8bit
92 C(0x5); // set source surface (based on last parameters)
94 P(0x2e, src_x); // define rect
99 C(0x32); // set this rect as source rect
101 P(0x0, dst_addr); // prepare output surface
107 C(0x69); // set output surface
109 P(0x2e, dst_x); // prepare output rect
114 C(0x6e); // set this rect as output rect
122 int dst_addr, int dst_width, int dst_height, int dst_stride,
123 int x, int y, int width, int height,
126 // printf("unimplemented bcm_accel_fill\n");