Fix test applications for recent DRM changes
parent
7bcbc443f4
commit
7317e774b5
|
@ -291,7 +291,7 @@ int testFrameBufferAdd(int fd, drmModeResPtr res)
|
|||
goto err;
|
||||
|
||||
printf("\tAdding FB\n");
|
||||
ret = drmModeAddFB(fd, 800, 600, 32, 8, 0, bo->handle, &fb);
|
||||
ret = drmModeAddFB(fd, 800, 600, 32, 8, 0, bo.handle, &fb);
|
||||
if (ret)
|
||||
goto err_bo;
|
||||
|
||||
|
|
|
@ -603,7 +603,7 @@ void testCursor(int fd, uint32_t crtc)
|
|||
|
||||
prettyCursor(fd, bo.handle, 0xFFFF00FF);
|
||||
printf("set cursor\n");
|
||||
drmModeSetCursor(fd, crtc, &bo, 64, 64);
|
||||
drmModeSetCursor(fd, crtc, bo.handle, 64, 64);
|
||||
printf("move cursor 0, 0\n");
|
||||
drmModeMoveCursor(fd, crtc, 0, 0);
|
||||
sleep(1);
|
||||
|
@ -614,7 +614,7 @@ void testCursor(int fd, uint32_t crtc)
|
|||
printf("move cursor 100, 100\n");
|
||||
drmModeMoveCursor(fd, crtc, 100, 100);
|
||||
sleep(1);
|
||||
drmModeSetCursor(fd, crtc, NULL, 0, 0);
|
||||
drmModeSetCursor(fd, crtc, 0, 0, 0);
|
||||
}
|
||||
|
||||
void prettyCursor(int fd, unsigned int handle, unsigned int color)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
|
@ -16,8 +17,6 @@ void cursor(int fd, int drmfd);
|
|||
void prettyColors(int fd);
|
||||
void prettyCursor(int fd, unsigned int handle, unsigned int color);
|
||||
|
||||
extern void sleep(int);
|
||||
|
||||
struct fb_var_screeninfo var;
|
||||
struct fb_fix_screeninfo fix;
|
||||
|
||||
|
@ -152,7 +151,7 @@ void cursor(int fd, int drmfd)
|
|||
}
|
||||
|
||||
prettyCursor(drmfd, bo.handle, 0xFFFF00FF);
|
||||
drmModeSetCursor(drmfd, crtc, &bo, 64, 64);
|
||||
drmModeSetCursor(drmfd, crtc, bo.handle, 64, 64);
|
||||
drmModeMoveCursor(drmfd, crtc, 0, 0);
|
||||
sleep(1);
|
||||
prettyCursor(drmfd, bo.handle, 0xFFFF0000);
|
||||
|
@ -160,7 +159,7 @@ void cursor(int fd, int drmfd)
|
|||
sleep(1);
|
||||
drmModeMoveCursor(drmfd, crtc, 100, 100);
|
||||
sleep(1);
|
||||
drmModeSetCursor(drmfd, crtc, NULL, 0, 0);
|
||||
drmModeSetCursor(drmfd, crtc, 0, 0, 0);
|
||||
drmBOUnreference(drmfd, &bo);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue