diff options
| author | Denys Dmytriyenko <denys@ti.com> | 2014-07-30 07:35:12 +0000 |
|---|---|---|
| committer | Denys Dmytriyenko <denys@ti.com> | 2014-07-31 19:12:17 -0400 |
| commit | fb9ad0c920f5a4a1cae624f468df77c3dc1ccf2e (patch) | |
| tree | d1ac69bf8d9faae2b0717c99892244cec8a90def | |
| parent | 26e782c71aa9916e259b834c6824d8a0633c58a9 (diff) | |
| download | meta-ti-fb9ad0c920f5a4a1cae624f468df77c3dc1ccf2e.tar.gz | |
linux-ti-staging: add Darren's SGX patches to make graphics work with 3.14
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Acked-by: Franklin Cooper Jr. <fcooper@ti.com>
8 files changed, 452 insertions, 5 deletions
diff --git a/recipes-kernel/linux/linux-ti-staging-3.14/sgx.cfg b/recipes-kernel/linux/linux-ti-staging-3.14/sgx.cfg new file mode 100644 index 00000000..02917798 --- /dev/null +++ b/recipes-kernel/linux/linux-ti-staging-3.14/sgx.cfg | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | ################################################## | ||
| 2 | # SGX Graphics config options | ||
| 3 | ################################################## | ||
| 4 | CONFIG_DMA_SHARED_BUFFER=y | ||
| 5 | CONFIG_TI_ST=n | ||
| 6 | CONFIG_INPUT_TOUCHSCREEN=y | ||
| 7 | CONFIG_TOUCHSCREEN_ADS7846=y | ||
| 8 | CONFIG_I2C_ALGOBIT=y | ||
| 9 | CONFIG_MFD_TPS65218=n | ||
| 10 | CONFIG_DRM=y | ||
| 11 | CONFIG_DRM_KMS_HELPER=y | ||
| 12 | CONFIG_DRM_KMS_FB_HELPER=y | ||
| 13 | CONFIG_DRM_GEM_CMA_HELPER=y | ||
| 14 | CONFIG_DRM_KMS_CMA_HELPER=y | ||
| 15 | CONFIG_DRM_I2C_NXP_TDA998X=y | ||
| 16 | CONFIG_DRM_TILCDC=y | ||
| 17 | CONFIG_FB_SYS_FILLRECT=y | ||
| 18 | CONFIG_FB_SYS_COPYAREA=y | ||
| 19 | CONFIG_FB_SYS_IMAGEBLIT=y | ||
| 20 | CONFIG_BACKLIGHT_CLASS_DEVICE=y | ||
| 21 | CONFIG_HDMI=y | ||
| 22 | CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y | ||
| 23 | CONFIG_SND_DAVINCI_SOC=m | ||
| 24 | CONFIG_SND_SIMPLE_CARD=n | ||
diff --git a/recipes-kernel/linux/linux-ti-staging-3.14/sgx/0001-HACK-drm-fb_helper-enable-panning-support.patch b/recipes-kernel/linux/linux-ti-staging-3.14/sgx/0001-HACK-drm-fb_helper-enable-panning-support.patch new file mode 100644 index 00000000..e760248f --- /dev/null +++ b/recipes-kernel/linux/linux-ti-staging-3.14/sgx/0001-HACK-drm-fb_helper-enable-panning-support.patch | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | From d9d8fea4c60b3a44e8660408eb9337413b108b15 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Darren Etheridge <detheridge@ti.com> | ||
| 3 | Date: Thu, 24 Jul 2014 11:49:28 -0500 | ||
| 4 | Subject: [PATCH 1/6] HACK: drm/fb_helper: enable panning support | ||
| 5 | |||
| 6 | Increase the size of the buffer that is created in the fbdev emulation | ||
| 7 | helpers. And fill in the var structure with the amount that was allocated. | ||
| 8 | |||
| 9 | Signed-off-by: Darren Etheridge <detheridge@ti.com> | ||
| 10 | --- | ||
| 11 | drivers/gpu/drm/drm_fb_cma_helper.c | 10 ++++++++-- | ||
| 12 | 1 file changed, 8 insertions(+), 2 deletions(-) | ||
| 13 | |||
| 14 | diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c b/drivers/gpu/drm/drm_fb_cma_helper.c | ||
| 15 | index 61b5a47..2e2c489 100644 | ||
| 16 | --- a/drivers/gpu/drm/drm_fb_cma_helper.c | ||
| 17 | +++ b/drivers/gpu/drm/drm_fb_cma_helper.c | ||
| 18 | @@ -25,6 +25,12 @@ | ||
| 19 | #include <drm/drm_fb_cma_helper.h> | ||
| 20 | #include <linux/module.h> | ||
| 21 | |||
| 22 | +/* | ||
| 23 | + * number of buffers to allocate from CMA pool, often increased for | ||
| 24 | + * double/triple buffering | ||
| 25 | + */ | ||
| 26 | +#define DRM_NUM_FBDEV_BUFFERS 3 | ||
| 27 | + | ||
| 28 | struct drm_fb_cma { | ||
| 29 | struct drm_framebuffer fb; | ||
| 30 | struct drm_gem_cma_object *obj[4]; | ||
| 31 | @@ -265,7 +271,7 @@ static int drm_fbdev_cma_create(struct drm_fb_helper *helper, | ||
| 32 | bytes_per_pixel = DIV_ROUND_UP(sizes->surface_bpp, 8); | ||
| 33 | |||
| 34 | mode_cmd.width = sizes->surface_width; | ||
| 35 | - mode_cmd.height = sizes->surface_height; | ||
| 36 | + mode_cmd.height = sizes->surface_height * DRM_NUM_FBDEV_BUFFERS; | ||
| 37 | mode_cmd.pitches[0] = sizes->surface_width * bytes_per_pixel; | ||
| 38 | mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, | ||
| 39 | sizes->surface_depth); | ||
| 40 | @@ -304,7 +310,7 @@ static int drm_fbdev_cma_create(struct drm_fb_helper *helper, | ||
| 41 | } | ||
| 42 | |||
| 43 | drm_fb_helper_fill_fix(fbi, fb->pitches[0], fb->depth); | ||
| 44 | - drm_fb_helper_fill_var(fbi, helper, fb->width, fb->height); | ||
| 45 | + drm_fb_helper_fill_var(fbi, helper, fb->width, sizes->surface_height); | ||
| 46 | |||
| 47 | offset = fbi->var.xoffset * bytes_per_pixel; | ||
| 48 | offset += fbi->var.yoffset * fb->pitches[0]; | ||
| 49 | -- | ||
| 50 | 1.9.1 | ||
| 51 | |||
diff --git a/recipes-kernel/linux/linux-ti-staging-3.14/sgx/0002-HACK-drm-tilcdc-add-vsync-callback-for-use-in-omaplf.patch b/recipes-kernel/linux/linux-ti-staging-3.14/sgx/0002-HACK-drm-tilcdc-add-vsync-callback-for-use-in-omaplf.patch new file mode 100644 index 00000000..d1545086 --- /dev/null +++ b/recipes-kernel/linux/linux-ti-staging-3.14/sgx/0002-HACK-drm-tilcdc-add-vsync-callback-for-use-in-omaplf.patch | |||
| @@ -0,0 +1,96 @@ | |||
| 1 | From eaf6ac95a81612250d6bd5e2ed9da41e52aac444 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Darren Etheridge <detheridge@ti.com> | ||
| 3 | Date: Fri, 11 Jul 2014 09:15:25 -0500 | ||
| 4 | Subject: [PATCH 2/6] HACK: drm/tilcdc: add vsync callback for use in omaplfb | ||
| 5 | for gpu | ||
| 6 | |||
| 7 | Add a vsync callback registration API that is identical to what was done | ||
| 8 | for da8xx-fb.c. | ||
| 9 | |||
| 10 | Need to find if there is a better way using the DRM infrastructure from | ||
| 11 | kernel space. Either that or change the userspace window manager stuff in | ||
| 12 | the gpu libraries to make use of the DRM provided syncronization | ||
| 13 | mechanisms. | ||
| 14 | |||
| 15 | Signed-off-by: Darren Etheridge <detheridge@ti.com> | ||
| 16 | --- | ||
| 17 | drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 34 ++++++++++++++++++++++++++++++++++ | ||
| 18 | drivers/gpu/drm/tilcdc/tilcdc_drv.h | 5 +++++ | ||
| 19 | 2 files changed, 39 insertions(+) | ||
| 20 | |||
| 21 | diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c | ||
| 22 | index 4b6b139..bf94a0f 100644 | ||
| 23 | --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c | ||
| 24 | +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c | ||
| 25 | @@ -37,6 +37,10 @@ struct tilcdc_crtc { | ||
| 26 | /* for deferred fb unref's: */ | ||
| 27 | struct drm_flip_work unref_work; | ||
| 28 | }; | ||
| 29 | + | ||
| 30 | +static vsync_callback_t vsync_cb_handler; | ||
| 31 | +static void *vsync_cb_arg; | ||
| 32 | + | ||
| 33 | #define to_tilcdc_crtc(x) container_of(x, struct tilcdc_crtc, base) | ||
| 34 | |||
| 35 | static void unref_worker(struct drm_flip_work *work, void *val) | ||
| 36 | @@ -576,6 +580,32 @@ out: | ||
| 37 | pm_runtime_put_sync(dev->dev); | ||
| 38 | } | ||
| 39 | |||
| 40 | +int register_vsync_cb(vsync_callback_t handler, void *arg, int idx) | ||
| 41 | +{ | ||
| 42 | + if ((vsync_cb_handler == NULL) && (vsync_cb_arg == NULL)) { | ||
| 43 | + vsync_cb_arg = arg; | ||
| 44 | + vsync_cb_handler = handler; | ||
| 45 | + } else { | ||
| 46 | + return -EEXIST; | ||
| 47 | + } | ||
| 48 | + | ||
| 49 | + return 0; | ||
| 50 | +} | ||
| 51 | +EXPORT_SYMBOL(register_vsync_cb); | ||
| 52 | + | ||
| 53 | +int unregister_vsync_cb(vsync_callback_t handler, void *arg, int idx) | ||
| 54 | +{ | ||
| 55 | + if ((vsync_cb_handler == handler) && (vsync_cb_arg == arg)) { | ||
| 56 | + vsync_cb_handler = NULL; | ||
| 57 | + vsync_cb_arg = NULL; | ||
| 58 | + } else { | ||
| 59 | + return -ENXIO; | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + return 0; | ||
| 63 | +} | ||
| 64 | +EXPORT_SYMBOL(unregister_vsync_cb); | ||
| 65 | + | ||
| 66 | irqreturn_t tilcdc_crtc_irq(struct drm_crtc *crtc) | ||
| 67 | { | ||
| 68 | struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc); | ||
| 69 | @@ -610,6 +640,10 @@ irqreturn_t tilcdc_crtc_irq(struct drm_crtc *crtc) | ||
| 70 | tilcdc_crtc->event = NULL; | ||
| 71 | if (event) | ||
| 72 | drm_send_vblank_event(dev, 0, event); | ||
| 73 | + | ||
| 74 | + if (vsync_cb_handler) | ||
| 75 | + vsync_cb_handler(vsync_cb_arg); | ||
| 76 | + | ||
| 77 | spin_unlock_irqrestore(&dev->event_lock, flags); | ||
| 78 | |||
| 79 | if (dirty && !tilcdc_crtc->dirty) | ||
| 80 | diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.h b/drivers/gpu/drm/tilcdc/tilcdc_drv.h | ||
| 81 | index 0938036..05269be 100644 | ||
| 82 | --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.h | ||
| 83 | +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.h | ||
| 84 | @@ -170,4 +170,9 @@ void tilcdc_crtc_set_panel_info(struct drm_crtc *crtc, | ||
| 85 | int tilcdc_crtc_mode_valid(struct drm_crtc *crtc, struct drm_display_mode *mode); | ||
| 86 | int tilcdc_crtc_max_width(struct drm_crtc *crtc); | ||
| 87 | |||
| 88 | +/* used by SGX OMAPLFB drvier */ | ||
| 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 /* __TILCDC_DRV_H__ */ | ||
| 94 | -- | ||
| 95 | 1.9.1 | ||
| 96 | |||
diff --git a/recipes-kernel/linux/linux-ti-staging-3.14/sgx/0003-drm-tilcdc-fix-the-ping-pong-dma-tearing-issue-seen-.patch b/recipes-kernel/linux/linux-ti-staging-3.14/sgx/0003-drm-tilcdc-fix-the-ping-pong-dma-tearing-issue-seen-.patch new file mode 100644 index 00000000..b3d04661 --- /dev/null +++ b/recipes-kernel/linux/linux-ti-staging-3.14/sgx/0003-drm-tilcdc-fix-the-ping-pong-dma-tearing-issue-seen-.patch | |||
| @@ -0,0 +1,97 @@ | |||
| 1 | From 7b4400287144101f8c7bdf2a9fa45c82859177e2 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Darren Etheridge <detheridge@ti.com> | ||
| 3 | Date: Fri, 18 Jul 2014 16:21:46 -0500 | ||
| 4 | Subject: [PATCH 3/6] drm/tilcdc: fix the ping-pong dma tearing issue seen on | ||
| 5 | buffer flipping | ||
| 6 | |||
| 7 | Update the DMA pointers during the pan display ioctl. Borrowed from | ||
| 8 | da8xx_fb.c update the scanout buffers immediately so the DMA ping/pong | ||
| 9 | doesn't end up out of sync with what we really want it to DMA. | ||
| 10 | |||
| 11 | Signed-off-by: Darren Etheridge <detheridge@ti.com> | ||
| 12 | --- | ||
| 13 | drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 36 +++++++++++++++++++++++++++++++----- | ||
| 14 | 1 file changed, 31 insertions(+), 5 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c | ||
| 17 | index bf94a0f..cdea159 100644 | ||
| 18 | --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c | ||
| 19 | +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c | ||
| 20 | @@ -30,6 +30,8 @@ struct tilcdc_crtc { | ||
| 21 | int dpms; | ||
| 22 | wait_queue_head_t frame_done_wq; | ||
| 23 | bool frame_done; | ||
| 24 | + spinlock_t irq_lock; | ||
| 25 | + int dma_completed_channel; | ||
| 26 | |||
| 27 | /* fb currently set to scanout 0/1: */ | ||
| 28 | struct drm_framebuffer *scanout[2]; | ||
| 29 | @@ -102,10 +104,23 @@ static void update_scanout(struct drm_crtc *crtc) | ||
| 30 | (crtc->mode.vdisplay * fb->pitches[0]); | ||
| 31 | |||
| 32 | if (tilcdc_crtc->dpms == DRM_MODE_DPMS_ON) { | ||
| 33 | - /* already enabled, so just mark the frames that need | ||
| 34 | - * updating and they will be updated on vblank: | ||
| 35 | + /* | ||
| 36 | + * already enabled, so just mark the frames that need | ||
| 37 | + * updating and they will be updated on vblank | ||
| 38 | + * and update the inactive DMA channel immediately | ||
| 39 | + * to avoid any tearing due to the DMA already starting | ||
| 40 | + * on the pending dma buffer when we hit the vblank IRQ | ||
| 41 | */ | ||
| 42 | - tilcdc_crtc->dirty |= LCDC_END_OF_FRAME0 | LCDC_END_OF_FRAME1; | ||
| 43 | + if (tilcdc_crtc->dma_completed_channel == 0) { | ||
| 44 | + tilcdc_crtc->dirty |= LCDC_END_OF_FRAME1; | ||
| 45 | + set_scanout(crtc, 0); | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + if (tilcdc_crtc->dma_completed_channel == 1) { | ||
| 49 | + tilcdc_crtc->dirty |= LCDC_END_OF_FRAME0; | ||
| 50 | + set_scanout(crtc, 1); | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | drm_vblank_get(dev, 0); | ||
| 54 | } else { | ||
| 55 | /* not enabled yet, so update registers immediately: */ | ||
| 56 | @@ -612,6 +627,7 @@ irqreturn_t tilcdc_crtc_irq(struct drm_crtc *crtc) | ||
| 57 | struct drm_device *dev = crtc->dev; | ||
| 58 | struct tilcdc_drm_private *priv = dev->dev_private; | ||
| 59 | uint32_t stat = tilcdc_read_irqstatus(dev); | ||
| 60 | + unsigned long irq_flags; | ||
| 61 | |||
| 62 | if ((stat & LCDC_SYNC_LOST) && (stat & LCDC_FIFO_UNDERFLOW)) { | ||
| 63 | stop(crtc); | ||
| 64 | @@ -627,11 +643,19 @@ irqreturn_t tilcdc_crtc_irq(struct drm_crtc *crtc) | ||
| 65 | |||
| 66 | tilcdc_clear_irqstatus(dev, stat); | ||
| 67 | |||
| 68 | - if (dirty & LCDC_END_OF_FRAME0) | ||
| 69 | + spin_lock_irqsave(&tilcdc_crtc->irq_lock, irq_flags); | ||
| 70 | + | ||
| 71 | + if (dirty & LCDC_END_OF_FRAME0) { | ||
| 72 | set_scanout(crtc, 0); | ||
| 73 | + tilcdc_crtc->dma_completed_channel = 0; | ||
| 74 | + } | ||
| 75 | |||
| 76 | - if (dirty & LCDC_END_OF_FRAME1) | ||
| 77 | + if (dirty & LCDC_END_OF_FRAME1) { | ||
| 78 | set_scanout(crtc, 1); | ||
| 79 | + tilcdc_crtc->dma_completed_channel = 1; | ||
| 80 | + } | ||
| 81 | + | ||
| 82 | + spin_unlock_irqrestore(&tilcdc_crtc->irq_lock, irq_flags); | ||
| 83 | |||
| 84 | drm_handle_vblank(dev, 0); | ||
| 85 | |||
| 86 | @@ -707,6 +731,8 @@ struct drm_crtc *tilcdc_crtc_create(struct drm_device *dev) | ||
| 87 | goto fail; | ||
| 88 | } | ||
| 89 | |||
| 90 | + spin_lock_init(&tilcdc_crtc->irq_lock); | ||
| 91 | + | ||
| 92 | ret = drm_crtc_init(dev, crtc, &tilcdc_crtc_funcs); | ||
| 93 | if (ret < 0) | ||
| 94 | goto fail; | ||
| 95 | -- | ||
| 96 | 1.9.1 | ||
| 97 | |||
diff --git a/recipes-kernel/linux/linux-ti-staging-3.14/sgx/0004-ARM-OMAP2-Use-pdata-quirks-for-sgx-deassert_hardrese.patch b/recipes-kernel/linux/linux-ti-staging-3.14/sgx/0004-ARM-OMAP2-Use-pdata-quirks-for-sgx-deassert_hardrese.patch new file mode 100644 index 00000000..b0d5d405 --- /dev/null +++ b/recipes-kernel/linux/linux-ti-staging-3.14/sgx/0004-ARM-OMAP2-Use-pdata-quirks-for-sgx-deassert_hardrese.patch | |||
| @@ -0,0 +1,86 @@ | |||
| 1 | From 761dbda366d46ff007e04c09dd2deeee5073d090 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Darren Etheridge <detheridge@ti.com> | ||
| 3 | Date: Fri, 25 Jul 2014 16:09:53 -0500 | ||
| 4 | Subject: [PATCH 4/6] ARM: OMAP2+: Use pdata-quirks for sgx deassert_hardreset | ||
| 5 | |||
| 6 | Use pdata_quirks to provide platform data to the sgx driver. | ||
| 7 | The data that is provided includes: | ||
| 8 | |||
| 9 | 1) Function pointers for the driver to use to reset the h/w block. | ||
| 10 | 2) The reset name that matches with what is used in hwmod. | ||
| 11 | |||
| 12 | Signed-off-by: Darren Etheridge <detheridge@ti.com> | ||
| 13 | --- | ||
| 14 | arch/arm/mach-omap2/pdata-quirks.c | 12 ++++++++++++ | ||
| 15 | include/linux/platform_data/gfx-sgx.h | 22 ++++++++++++++++++++++ | ||
| 16 | 2 files changed, 34 insertions(+) | ||
| 17 | create mode 100644 include/linux/platform_data/gfx-sgx.h | ||
| 18 | |||
| 19 | diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c | ||
| 20 | index a1fb5aa..945dd61 100644 | ||
| 21 | --- a/arch/arm/mach-omap2/pdata-quirks.c | ||
| 22 | +++ b/arch/arm/mach-omap2/pdata-quirks.c | ||
| 23 | @@ -17,6 +17,7 @@ | ||
| 24 | |||
| 25 | #include <linux/platform_data/pinctrl-single.h> | ||
| 26 | #include <linux/platform_data/iommu-omap.h> | ||
| 27 | +#include <linux/platform_data/gfx-sgx.h> | ||
| 28 | |||
| 29 | #include "am35xx.h" | ||
| 30 | #include "common.h" | ||
| 31 | @@ -63,6 +64,13 @@ static inline void legacy_init_wl12xx(unsigned ref_clock, | ||
| 32 | } | ||
| 33 | #endif | ||
| 34 | |||
| 35 | +#if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX) | ||
| 36 | +static struct gfx_sgx_platform_data gfx_pdata = { | ||
| 37 | + .reset_name = "gfx", | ||
| 38 | + .deassert_reset = omap_device_deassert_hardreset, | ||
| 39 | +}; | ||
| 40 | +#endif | ||
| 41 | + | ||
| 42 | #ifdef CONFIG_MACH_NOKIA_N8X0 | ||
| 43 | static void __init omap2420_n8x0_legacy_init(void) | ||
| 44 | { | ||
| 45 | @@ -270,6 +278,10 @@ struct of_dev_auxdata omap_auxdata_lookup[] __initdata = { | ||
| 46 | OF_DEV_AUXDATA("ti,am3517-emac", 0x5c000000, "davinci_emac.0", | ||
| 47 | &am35xx_emac_pdata), | ||
| 48 | #endif | ||
| 49 | +#if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX) | ||
| 50 | + OF_DEV_AUXDATA("ti,sgx", 0x56000000, "56000000.sgx", | ||
| 51 | + &gfx_pdata), | ||
| 52 | +#endif | ||
| 53 | #ifdef CONFIG_ARCH_OMAP4 | ||
| 54 | OF_DEV_AUXDATA("ti,omap4-padconf", 0x4a100040, "4a100040.pinmux", &pcs_pdata), | ||
| 55 | OF_DEV_AUXDATA("ti,omap4-padconf", 0x4a31e040, "4a31e040.pinmux", &pcs_pdata), | ||
| 56 | diff --git a/include/linux/platform_data/gfx-sgx.h b/include/linux/platform_data/gfx-sgx.h | ||
| 57 | new file mode 100644 | ||
| 58 | index 0000000..aa59b2c | ||
| 59 | --- /dev/null | ||
| 60 | +++ b/include/linux/platform_data/gfx-sgx.h | ||
| 61 | @@ -0,0 +1,22 @@ | ||
| 62 | +/* | ||
| 63 | + * SGX Graphics Driver Platform Data | ||
| 64 | + * | ||
| 65 | + * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/ | ||
| 66 | + * Darren Etheridge <detheridge@ti.com> | ||
| 67 | + * | ||
| 68 | + * This program is free software; you can redistribute it and/or modify | ||
| 69 | + * it under the terms of the GNU General Public License version 2 as | ||
| 70 | + * published by the Free Software Foundation. | ||
| 71 | + * | ||
| 72 | + * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
| 73 | + * kind, whether express or implied; without even the implied warranty | ||
| 74 | + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 75 | + * GNU General Public License for more details. | ||
| 76 | + */ | ||
| 77 | +#include <linux/platform_device.h> | ||
| 78 | + | ||
| 79 | +struct gfx_sgx_platform_data { | ||
| 80 | + const char *reset_name; | ||
| 81 | + | ||
| 82 | + int (*deassert_reset)(struct platform_device *pdev, const char *name); | ||
| 83 | +}; | ||
| 84 | -- | ||
| 85 | 1.9.1 | ||
| 86 | |||
diff --git a/recipes-kernel/linux/linux-ti-staging-3.14/sgx/0005-ARM-dts-am437x-add-SGX-node.patch b/recipes-kernel/linux/linux-ti-staging-3.14/sgx/0005-ARM-dts-am437x-add-SGX-node.patch new file mode 100644 index 00000000..e18581ad --- /dev/null +++ b/recipes-kernel/linux/linux-ti-staging-3.14/sgx/0005-ARM-dts-am437x-add-SGX-node.patch | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | From c921fe043facef3bd6649170fb6130f18e9367b7 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Darren Etheridge <detheridge@ti.com> | ||
| 3 | Date: Tue, 29 Jul 2014 16:27:59 -0500 | ||
| 4 | Subject: [PATCH 5/6] ARM: dts: am437x: add SGX node | ||
| 5 | |||
| 6 | Add dt node to enable SGX PowerVR driver. | ||
| 7 | |||
| 8 | Signed-off-by: Darren Etheridge <detheridge@ti.com> | ||
| 9 | --- | ||
| 10 | arch/arm/boot/dts/am4372.dtsi | 8 ++++++++ | ||
| 11 | 1 file changed, 8 insertions(+) | ||
| 12 | |||
| 13 | diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi | ||
| 14 | index d36af42..d963a60 100644 | ||
| 15 | --- a/arch/arm/boot/dts/am4372.dtsi | ||
| 16 | +++ b/arch/arm/boot/dts/am4372.dtsi | ||
| 17 | @@ -707,6 +707,13 @@ | ||
| 18 | dma-names = "tx", "rx"; | ||
| 19 | }; | ||
| 20 | |||
| 21 | + sgx@0x56000000 { | ||
| 22 | + compatible = "ti,sgx"; | ||
| 23 | + ti,hwmods = "gfx"; | ||
| 24 | + reg = <0x56000000 0x1000000>; | ||
| 25 | + interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; | ||
| 26 | + }; | ||
| 27 | + | ||
| 28 | mcasp1: mcasp@4803C000 { | ||
| 29 | compatible = "ti,am33xx-mcasp-audio"; | ||
| 30 | ti,hwmods = "mcasp1"; | ||
| 31 | @@ -891,6 +898,7 @@ | ||
| 32 | clocks = <&disp_clk>; | ||
| 33 | clock-names = "fck"; | ||
| 34 | }; | ||
| 35 | + | ||
| 36 | }; | ||
| 37 | }; | ||
| 38 | }; | ||
| 39 | -- | ||
| 40 | 1.9.1 | ||
| 41 | |||
diff --git a/recipes-kernel/linux/linux-ti-staging-3.14/sgx/0006-ARM-dts-am33xx-add-DT-node-for-gpu.patch b/recipes-kernel/linux/linux-ti-staging-3.14/sgx/0006-ARM-dts-am33xx-add-DT-node-for-gpu.patch new file mode 100644 index 00000000..d4d0f137 --- /dev/null +++ b/recipes-kernel/linux/linux-ti-staging-3.14/sgx/0006-ARM-dts-am33xx-add-DT-node-for-gpu.patch | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | From 0ef34332c3400b211a047eaca751d00c97f5104c Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Darren Etheridge <detheridge@ti.com> | ||
| 3 | Date: Fri, 18 Jul 2014 16:19:54 -0500 | ||
| 4 | Subject: [PATCH 6/6] ARM: dts: am33xx: add DT node for gpu | ||
| 5 | |||
| 6 | Add the node into the am33xx.dtsi file for the SGX GPU | ||
| 7 | that is found in some variants of the SoC. | ||
| 8 | |||
| 9 | Signed-off-by: Darren Etheridge <detheridge@ti.com> | ||
| 10 | --- | ||
| 11 | arch/arm/boot/dts/am33xx.dtsi | 8 +++++++- | ||
| 12 | 1 file changed, 7 insertions(+), 1 deletion(-) | ||
| 13 | |||
| 14 | diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi | ||
| 15 | index 2cfd694..df6ae9c 100644 | ||
| 16 | --- a/arch/arm/boot/dts/am33xx.dtsi | ||
| 17 | +++ b/arch/arm/boot/dts/am33xx.dtsi | ||
| 18 | @@ -109,7 +109,6 @@ | ||
| 19 | prcm: prcm@44e00000 { | ||
| 20 | compatible = "ti,am3-prcm"; | ||
| 21 | reg = <0x44e00000 0x4000>; | ||
| 22 | - | ||
| 23 | prcm_clocks: clocks { | ||
| 24 | #address-cells = <1>; | ||
| 25 | #size-cells = <0>; | ||
| 26 | @@ -822,6 +821,13 @@ | ||
| 27 | reg = <0x48310000 0x2000>; | ||
| 28 | interrupts = <111>; | ||
| 29 | }; | ||
| 30 | + | ||
| 31 | + sgx@0x56000000 { | ||
| 32 | + compatible = "ti,sgx"; | ||
| 33 | + ti,hwmods = "gfx"; | ||
| 34 | + reg = <0x56000000 0x1000000>; | ||
| 35 | + interrupts = <37>; | ||
| 36 | + }; | ||
| 37 | }; | ||
| 38 | }; | ||
| 39 | |||
| 40 | -- | ||
| 41 | 1.9.1 | ||
| 42 | |||
diff --git a/recipes-kernel/linux/linux-ti-staging_3.14.bb b/recipes-kernel/linux/linux-ti-staging_3.14.bb index b5056401..c223c880 100644 --- a/recipes-kernel/linux/linux-ti-staging_3.14.bb +++ b/recipes-kernel/linux/linux-ti-staging_3.14.bb | |||
| @@ -3,8 +3,6 @@ DESCRIPTION = "Linux kernel for TI devices" | |||
| 3 | LICENSE = "GPLv2" | 3 | LICENSE = "GPLv2" |
| 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" |
| 5 | 5 | ||
| 6 | DEFAULT_PREFERENCE = "-1" | ||
| 7 | |||
| 8 | inherit kernel | 6 | inherit kernel |
| 9 | 7 | ||
| 10 | require recipes-kernel/linux/linux-dtb.inc | 8 | require recipes-kernel/linux/linux-dtb.inc |
| @@ -49,7 +47,7 @@ SRCREV = "b0fa4f08d72c8723219b5174b5749151b5acaee0" | |||
| 49 | PV = "3.14.14" | 47 | PV = "3.14.14" |
| 50 | 48 | ||
| 51 | # Append to the MACHINE_KERNEL_PR so that a new SRCREV will cause a rebuild | 49 | # Append to the MACHINE_KERNEL_PR so that a new SRCREV will cause a rebuild |
| 52 | MACHINE_KERNEL_PR_append = "a+gitr${SRCPV}" | 50 | MACHINE_KERNEL_PR_append = "b+gitr${SRCPV}" |
| 53 | PR = "${MACHINE_KERNEL_PR}" | 51 | PR = "${MACHINE_KERNEL_PR}" |
| 54 | 52 | ||
| 55 | KERNEL_CONFIG_DIR = "${S}/ti_config_fragments" | 53 | KERNEL_CONFIG_DIR = "${S}/ti_config_fragments" |
| @@ -57,10 +55,22 @@ KERNEL_CONFIG_FRAGMENTS = "${KERNEL_CONFIG_DIR}/audio_display.cfg ${KERNEL_CONFI | |||
| 57 | ${KERNEL_CONFIG_DIR}/connectivity.cfg ${KERNEL_CONFIG_DIR}/ipc.cfg \ | 55 | ${KERNEL_CONFIG_DIR}/connectivity.cfg ${KERNEL_CONFIG_DIR}/ipc.cfg \ |
| 58 | ${KERNEL_CONFIG_DIR}/power.cfg" | 56 | ${KERNEL_CONFIG_DIR}/power.cfg" |
| 59 | 57 | ||
| 60 | KERNEL_CONFIG_FRAGMENTS_append_ti33x = " ${WORKDIR}/non-smp.cfg" | 58 | KERNEL_CONFIG_FRAGMENTS_append_ti33x = " ${WORKDIR}/non-smp.cfg ${WORKDIR}/sgx.cfg" |
| 61 | KERNEL_CONFIG_FRAGMENTS_append_ti43x = " ${WORKDIR}/non-smp.cfg" | 59 | KERNEL_CONFIG_FRAGMENTS_append_ti43x = " ${WORKDIR}/non-smp.cfg ${WORKDIR}/sgx.cfg" |
| 60 | |||
| 61 | # Patches necessary to make SGX graphics work with this kernel version | ||
| 62 | SGX_PATCHES = "file://sgx/0001-HACK-drm-fb_helper-enable-panning-support.patch \ | ||
| 63 | file://sgx/0002-HACK-drm-tilcdc-add-vsync-callback-for-use-in-omaplf.patch \ | ||
| 64 | file://sgx/0003-drm-tilcdc-fix-the-ping-pong-dma-tearing-issue-seen-.patch \ | ||
| 65 | file://sgx/0004-ARM-OMAP2-Use-pdata-quirks-for-sgx-deassert_hardrese.patch \ | ||
| 66 | file://sgx/0005-ARM-dts-am437x-add-SGX-node.patch \ | ||
| 67 | file://sgx/0006-ARM-dts-am33xx-add-DT-node-for-gpu.patch" | ||
| 62 | 68 | ||
| 63 | SRC_URI = "git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git;protocol=git;branch=${BRANCH} \ | 69 | SRC_URI = "git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git;protocol=git;branch=${BRANCH} \ |
| 64 | file://defconfig \ | 70 | file://defconfig \ |
| 65 | file://non-smp.cfg \ | 71 | file://non-smp.cfg \ |
| 72 | file://sgx.cfg \ | ||
| 66 | " | 73 | " |
| 74 | |||
| 75 | SRC_URI_append_ti33x = " ${SGX_PATCHES}" | ||
| 76 | SRC_URI_append_ti43x = " ${SGX_PATCHES}" | ||
