diff options
author | Samuli Piippo <samuli.piippo@digia.com> | 2014-09-01 09:25:46 +0300 |
---|---|---|
committer | Samuli Piippo <samuli.piippo@digia.com> | 2014-09-23 16:38:41 +0300 |
commit | 238bad671c9265b71db2f104d85c84bd74303605 (patch) | |
tree | 5e09edc1fed4aa8dbd3280125b208c6f8de72f26 /recipes/linux/linux-mainline/0003-video-da8xx-fb-Add-API-to-register-wait-for-vsync-ca.patch | |
parent | 4c99bd2137f422a8b89ee6eeb0c516e60d15f137 (diff) | |
download | meta-boot2qt-238bad671c9265b71db2f104d85c84bd74303605.tar.gz |
beaglebone: Add cape support for beaglebone black
Linux kernel version 3.8 from meta-beagleboard adds support for the cape
manager. Using powervr driver version 4.10.00.01, SGX is also supported.
Patches for the kernel and SGX are taken from TI support pages.
Kernel args need 'quiet' for HDMI to work, otherwise you only get black
screen. Double buffering (libpvrPVR2D_FLIPWSEGL.so) does not work,
need to use FRONT buffering which can cause screen tearing.
Task-number: QTEE-312
Change-Id: I160e7e954ce9d060b0cb1bdaca70b24de9ccd697
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@digia.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Diffstat (limited to 'recipes/linux/linux-mainline/0003-video-da8xx-fb-Add-API-to-register-wait-for-vsync-ca.patch')
-rwxr-xr-x | recipes/linux/linux-mainline/0003-video-da8xx-fb-Add-API-to-register-wait-for-vsync-ca.patch | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/recipes/linux/linux-mainline/0003-video-da8xx-fb-Add-API-to-register-wait-for-vsync-ca.patch b/recipes/linux/linux-mainline/0003-video-da8xx-fb-Add-API-to-register-wait-for-vsync-ca.patch new file mode 100755 index 0000000..c425982 --- /dev/null +++ b/recipes/linux/linux-mainline/0003-video-da8xx-fb-Add-API-to-register-wait-for-vsync-ca.patch | |||
@@ -0,0 +1,97 @@ | |||
1 | From 0f4e7d4b7d7314b38a9fd3497d7d4e0c36d19bff Mon Sep 17 00:00:00 2001 | ||
2 | From: Prathap M S <msprathap@ti.com> | ||
3 | Date: Mon, 2 Sep 2013 12:05:23 +0530 | ||
4 | Subject: [PATCH 3/3] video: da8xx-fb: Add API to register wait for vsync callback | ||
5 | |||
6 | This patch adds APIs to register and unregister wait for vsync callback. | ||
7 | This is derived from commit id 2d44302545da24fd22912d964102bc31a7489e97 | ||
8 | This commit id was part of 3.2 kernel sources. | ||
9 | |||
10 | Signed-off-by: Prathap M S <msprathap@ti.com> | ||
11 | --- | ||
12 | drivers/video/da8xx-fb.c | 33 +++++++++++++++++++++++++++++++++ | ||
13 | include/video/da8xx-fb.h | 4 ++++ | ||
14 | 2 files changed, 37 insertions(+), 0 deletions(-) | ||
15 | |||
16 | diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c | ||
17 | index 131cf4c..ef06b85 100644 | ||
18 | --- a/drivers/video/da8xx-fb.c | ||
19 | +++ b/drivers/video/da8xx-fb.c | ||
20 | @@ -199,6 +199,9 @@ static struct fb_fix_screeninfo da8xx_fb_fix = { | ||
21 | .accel = FB_ACCEL_NONE | ||
22 | }; | ||
23 | |||
24 | +static vsync_callback_t vsync_cb_handler; | ||
25 | +static void *vsync_cb_arg; | ||
26 | + | ||
27 | static struct fb_videomode known_lcd_panels[] = { | ||
28 | /* Sharp LCD035Q3DG01 */ | ||
29 | [0] = { | ||
30 | @@ -806,6 +809,32 @@ static int lcd_init(struct da8xx_fb_par *par, const struct lcd_ctrl_config *cfg, | ||
31 | return 0; | ||
32 | } | ||
33 | |||
34 | +int register_vsync_cb(vsync_callback_t handler, void *arg, int idx) | ||
35 | +{ | ||
36 | + if ((vsync_cb_handler == NULL) && (vsync_cb_arg == NULL)) { | ||
37 | + vsync_cb_arg = arg; | ||
38 | + vsync_cb_handler = handler; | ||
39 | + } else { | ||
40 | + return -EEXIST; | ||
41 | + } | ||
42 | + | ||
43 | + return 0; | ||
44 | +} | ||
45 | +EXPORT_SYMBOL(register_vsync_cb); | ||
46 | + | ||
47 | +int unregister_vsync_cb(vsync_callback_t handler, void *arg, int idx) | ||
48 | +{ | ||
49 | + if ((vsync_cb_handler == handler) && (vsync_cb_arg == arg)) { | ||
50 | + vsync_cb_handler = NULL; | ||
51 | + vsync_cb_arg = NULL; | ||
52 | + } else { | ||
53 | + return -ENXIO; | ||
54 | + } | ||
55 | + | ||
56 | + return 0; | ||
57 | +} | ||
58 | +EXPORT_SYMBOL(unregister_vsync_cb); | ||
59 | + | ||
60 | /* IRQ handler for version 2 of LCDC */ | ||
61 | static irqreturn_t lcdc_irq_handler_rev02(int irq, void *arg) | ||
62 | { | ||
63 | @@ -843,6 +872,8 @@ static irqreturn_t lcdc_irq_handler_rev02(int irq, void *arg) | ||
64 | LCD_DMA_FRM_BUF_CEILING_ADDR_0_REG); | ||
65 | par->vsync_flag = 1; | ||
66 | wake_up_interruptible(&par->vsync_wait); | ||
67 | + if (vsync_cb_handler) | ||
68 | + vsync_cb_handler(vsync_cb_arg); | ||
69 | } | ||
70 | |||
71 | if (stat & LCD_END_OF_FRAME1) { | ||
72 | @@ -918,6 +949,8 @@ static irqreturn_t lcdc_irq_handler_rev01(int irq, void *arg) | ||
73 | LCD_DMA_FRM_BUF_CEILING_ADDR_1_REG); | ||
74 | par->vsync_flag = 1; | ||
75 | wake_up_interruptible(&par->vsync_wait); | ||
76 | + if (vsync_cb_handler) | ||
77 | + vsync_cb_handler(vsync_cb_arg); | ||
78 | } | ||
79 | } | ||
80 | |||
81 | diff --git a/include/video/da8xx-fb.h b/include/video/da8xx-fb.h | ||
82 | index efed3c3..a6cc484 100644 | ||
83 | --- a/include/video/da8xx-fb.h | ||
84 | +++ b/include/video/da8xx-fb.h | ||
85 | @@ -91,5 +91,9 @@ struct lcd_sync_arg { | ||
86 | /* Proprietary FB_SYNC_ flags */ | ||
87 | #define FB_SYNC_CLK_INVERT 0x40000000 | ||
88 | |||
89 | +typedef void (*vsync_callback_t)(void *arg); | ||
90 | +int register_vsync_cb(vsync_callback_t handler, void *arg, int idx); | ||
91 | +int unregister_vsync_cb(vsync_callback_t handler, void *arg, int idx); | ||
92 | + | ||
93 | #endif /* ifndef DA8XX_FB_H */ | ||
94 | |||
95 | -- | ||
96 | 1.7.1 | ||
97 | |||