Created
April 17, 2013 14:30
-
-
Save ssvb/5404771 to your computer and use it in GitHub Desktop.
A hack to forcefully release the leaked sunxi disp layers.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdint.h> | |
#include <fcntl.h> | |
#include <sys/ioctl.h> | |
#include <linux/fb.h> | |
#define DISP_CMD_LAYER_RELEASE 0x41 | |
int fd; | |
int layer_release(int layer_id) | |
{ | |
uint32_t tmp4[4]; | |
tmp4[0] = 0; | |
tmp4[1] = layer_id; | |
return ioctl(fd, DISP_CMD_LAYER_RELEASE, &tmp4); | |
} | |
int main() | |
{ | |
int id; | |
fd = open("/dev/disp", O_RDWR); | |
for (id = 101; id < 104; id++) | |
layer_release(id); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment