diff --git a/patch.sh b/patch.sh index 92a7f81a6efb7c2990cbf7c2511be2686c72be84..bee0472c533a554952bbb205ff8ec25c6773a0f7 100644 --- a/patch.sh +++ b/patch.sh @@ -76,9 +76,8 @@ echo "[git] testing omapdrm" echo "[git] pulling cma driver" git pull git://github.com/RobertCNelson/linux.git cma-v22_v3.3-rc4 -git am "${DIR}/patches/drm/0001-omap2-add-drm-device.patch" -git am "${DIR}/patches/drm/0002-drm-omap-platform-data-structs-moved-to-plat-omap.patch" -git am "${DIR}/patches/drm/0001-OMAPDSS-HDMI-hot-plug-detect-fix.patch" +echo "[git] pulling omapdrm driver" +git pull git://github.com/RobertCNelson/linux.git omapdrm_v3.3-rc4 #might be merged in 3.4 git am "${DIR}/patches/drm/0001-ARM-OMAP2-3-HWMOD-Add-missing-flags-for-dispc-class.patch" diff --git a/patches/drm/0001-OMAPDSS-HDMI-hot-plug-detect-fix.patch b/patches/drm/0001-OMAPDSS-HDMI-hot-plug-detect-fix.patch deleted file mode 100644 index ee6525790f18e2558ed0e1ab132f9e022bfe704a..0000000000000000000000000000000000000000 --- a/patches/drm/0001-OMAPDSS-HDMI-hot-plug-detect-fix.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 94ed991882c8ad49d23d93c55aeda7c3dc7c7250 Mon Sep 17 00:00:00 2001 -From: Rob Clark <rob@ti.com> -Date: Mon, 20 Feb 2012 15:03:36 -0600 -Subject: [PATCH] OMAPDSS: HDMI: hot plug detect fix - -The "OMAPDSS: HDMI: PHY burnout fix" commit switched the HDMI driver -over to using a GPIO for plug detect. Unfortunately the ->detect() -method was not also updated, causing HDMI to no longer work for the -omapdrm driver (because it would actually check if a connection was -detected before attempting to enable display). - -Signed-off-by: Rob Clark <rob@ti.com> ---- - drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c | 9 +-------- - 1 files changed, 1 insertions(+), 8 deletions(-) - -diff --git a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c -index 2d72334..6847a47 100644 ---- a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c -+++ b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c -@@ -479,14 +479,7 @@ int ti_hdmi_4xxx_read_edid(struct hdmi_ip_data *ip_data, - - bool ti_hdmi_4xxx_detect(struct hdmi_ip_data *ip_data) - { -- int r; -- -- void __iomem *base = hdmi_core_sys_base(ip_data); -- -- /* HPD */ -- r = REG_GET(base, HDMI_CORE_SYS_SYS_STAT, 1, 1); -- -- return r == 1; -+ return gpio_get_value(ip_data->hpd_gpio); - } - - static void hdmi_core_init(struct hdmi_core_video_config *video_cfg, --- -1.7.9 - diff --git a/patches/drm/0001-omap2-add-drm-device.patch b/patches/drm/0001-omap2-add-drm-device.patch deleted file mode 100644 index f1354ba6b45ce25ee01a19df931c7aeb85945e06..0000000000000000000000000000000000000000 --- a/patches/drm/0001-omap2-add-drm-device.patch +++ /dev/null @@ -1,227 +0,0 @@ -From fcc4e62e1012dc52b94e39c7f7fdc21be731e91b Mon Sep 17 00:00:00 2001 -From: Rob Clark <rob@ti.com> -Date: Fri, 13 Jan 2012 14:35:26 -0600 -Subject: [PATCH 1/2] omap2+: add drm device - -Register OMAP DRM/KMS platform device, and reserve a CMA region for -the device to use for buffer allocation. - -v1: initial patch -v2: move platform data structs into plat-omap to avoid having to - #include headers from drivers/staging and cleanups - -Signed-off-by: Rob Clark <rob@ti.com> ---- - arch/arm/plat-omap/Makefile | 2 +- - arch/arm/plat-omap/common.c | 3 +- - arch/arm/plat-omap/drm.c | 83 +++++++++++++++++++++++++++++++++ - arch/arm/plat-omap/include/plat/drm.h | 70 +++++++++++++++++++++++++++ - 4 files changed, 156 insertions(+), 2 deletions(-) - create mode 100644 arch/arm/plat-omap/drm.c - create mode 100644 arch/arm/plat-omap/include/plat/drm.h - -diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile -index 9a58461..b86e6cb 100644 ---- a/arch/arm/plat-omap/Makefile -+++ b/arch/arm/plat-omap/Makefile -@@ -4,7 +4,7 @@ - - # Common support - obj-y := common.o sram.o clock.o devices.o dma.o mux.o \ -- usb.o fb.o counter_32k.o -+ usb.o fb.o counter_32k.o drm.o - obj-m := - obj-n := - obj- := -diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c -index 06383b5..0d87dab 100644 ---- a/arch/arm/plat-omap/common.c -+++ b/arch/arm/plat-omap/common.c -@@ -21,10 +21,10 @@ - #include <plat/board.h> - #include <plat/vram.h> - #include <plat/dsp.h> -+#include <plat/drm.h> - - #include <plat/omap-secure.h> - -- - #define NO_LENGTH_CHECK 0xffffffff - - struct omap_board_config_kernel *omap_board_config __initdata; -@@ -65,6 +65,7 @@ const void *__init omap_get_var_config(u16 tag, size_t *len) - - void __init omap_reserve(void) - { -+ omapdrm_reserve_vram(); - omapfb_reserve_sdram_memblock(); - omap_vram_reserve_sdram_memblock(); - omap_dsp_reserve_sdram_memblock(); -diff --git a/arch/arm/plat-omap/drm.c b/arch/arm/plat-omap/drm.c -new file mode 100644 -index 0000000..aa0ba69 ---- /dev/null -+++ b/arch/arm/plat-omap/drm.c -@@ -0,0 +1,83 @@ -+/* -+ * DRM/KMS device registration for TI OMAP platforms -+ * -+ * Copyright (C) 2012 Texas Instruments -+ * Author: Rob Clark <rob.clark@linaro.org> -+ * -+ * This program is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License version 2 as published by -+ * the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, but WITHOUT -+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -+ * more details. -+ * -+ * You should have received a copy of the GNU General Public License along with -+ * this program. If not, see <http://www.gnu.org/licenses/>. -+ */ -+ -+#include <linux/module.h> -+#include <linux/kernel.h> -+#include <linux/mm.h> -+#include <linux/init.h> -+#include <linux/platform_device.h> -+#include <linux/dma-mapping.h> -+#ifdef CONFIG_CMA -+# include <linux/dma-contiguous.h> -+#endif -+ -+#include <plat/omap_device.h> -+#include <plat/omap_hwmod.h> -+ -+#include <plat/drm.h> -+ -+#if defined(CONFIG_DRM_OMAP) || (CONFIG_DRM_OMAP_MODULE) -+ -+static struct omap_drm_platform_data omapdrm_platdata; -+static struct omap_dmm_platform_data dmm_platdata; -+ -+static struct platform_device omap_drm_device = { -+ .dev = { -+ .coherent_dma_mask = DMA_BIT_MASK(32), -+ .platform_data = &omapdrm_platdata, -+ }, -+ .name = "omapdrm", -+ .id = 0, -+}; -+ -+static int __init omap_init_gpu(void) -+{ -+ struct omap_hwmod *oh = NULL; -+ -+ /* lookup and populate the DMM information, if present - OMAP4+ */ -+ oh = omap_hwmod_lookup("dmm"); -+ -+ if (oh) { -+ dmm_platdata.base = omap_hwmod_get_mpu_rt_va(oh); -+ dmm_platdata.irq = oh->mpu_irqs[0].irq; -+ -+ if (dmm_platdata.base) -+ omapdrm_platdata.dmm_pdata = &dmm_platdata; -+ } -+ -+ return platform_device_register(&omap_drm_device); -+} -+ -+arch_initcall(omap_init_gpu); -+ -+void omapdrm_reserve_vram(void) -+{ -+#ifdef CONFIG_CMA -+ /* -+ * Create private 32MiB contiguous memory area for omapdrm.0 device -+ * TODO revisit size.. if uc/wc buffers are allocated from CMA pages -+ * then the amount of memory we need goes up.. -+ */ -+ dma_declare_contiguous(&omap_drm_device.dev, 32 * SZ_1M, 0, 0); -+#else -+# warning "CMA is not enabled, there may be limitations about scanout buffer allocations on OMAP3 and earlier" -+#endif -+} -+ -+#endif -diff --git a/arch/arm/plat-omap/include/plat/drm.h b/arch/arm/plat-omap/include/plat/drm.h -new file mode 100644 -index 0000000..e29be29 ---- /dev/null -+++ b/arch/arm/plat-omap/include/plat/drm.h -@@ -0,0 +1,70 @@ -+/* -+ * DRM/KMS device registration for TI OMAP platforms -+ * -+ * Copyright (C) 2012 Texas Instruments -+ * Author: Rob Clark <rob.clark@linaro.org> -+ * -+ * This program is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License version 2 as published by -+ * the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, but WITHOUT -+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -+ * more details. -+ * -+ * You should have received a copy of the GNU General Public License along with -+ * this program. If not, see <http://www.gnu.org/licenses/>. -+ */ -+ -+#ifndef __PLAT_OMAP_DRM_H__ -+#define __PLAT_OMAP_DRM_H__ -+ -+/* -+ * Optional platform data to configure the default configuration of which -+ * pipes/overlays/CRTCs are used.. if this is not provided, then instead the -+ * first CONFIG_DRM_OMAP_NUM_CRTCS are used, and they are each connected to -+ * one manager, with priority given to managers that are connected to -+ * detected devices. Remaining overlays are used as video planes. This -+ * should be a good default behavior for most cases, but yet there still -+ * might be times when you wish to do something different. -+ */ -+struct omap_kms_platform_data { -+ /* overlays to use as CRTCs: */ -+ int ovl_cnt; -+ const int *ovl_ids; -+ -+ /* overlays to use as video planes: */ -+ int pln_cnt; -+ const int *pln_ids; -+ -+ int mgr_cnt; -+ const int *mgr_ids; -+ -+ int dev_cnt; -+ const char **dev_names; -+}; -+ -+struct omap_drm_platform_data { -+ struct omap_kms_platform_data *kms_pdata; -+ struct omap_dmm_platform_data *dmm_pdata; -+}; -+ -+struct omap_dmm_platform_data { -+ void __iomem *base; -+ int irq; -+}; -+ -+#if defined(CONFIG_DRM_OMAP) || defined(CONFIG_DRM_OMAP_MODULE) -+ -+void omapdrm_reserve_vram(void); -+ -+#else -+ -+static inline void omapdrm_reserve_vram(void) -+{ -+} -+ -+#endif -+ -+#endif /* __PLAT_OMAP_DRM_H__ */ --- -1.7.9 - diff --git a/patches/drm/0002-drm-omap-platform-data-structs-moved-to-plat-omap.patch b/patches/drm/0002-drm-omap-platform-data-structs-moved-to-plat-omap.patch deleted file mode 100644 index 038e705f6b823962316ccee51b55133e20efb0ee..0000000000000000000000000000000000000000 --- a/patches/drm/0002-drm-omap-platform-data-structs-moved-to-plat-omap.patch +++ /dev/null @@ -1,110 +0,0 @@ -From 67d71aa3f7734409d4267a3bf10d0018e04a0c99 Mon Sep 17 00:00:00 2001 -From: Rob Clark <rob@ti.com> -Date: Fri, 13 Jan 2012 14:36:22 -0600 -Subject: [PATCH 2/2] drm/omap: platform data structs moved to plat-omap - -Platform data structs populated when the platform device is registered -need to be #include'able under arch/arm/..., but having to #include -headers from drivers/staging is messy. Instead these structs are -moved to arch/arm/plat-omap/include/plat. - -Signed-off-by: Rob Clark <rob@ti.com> ---- - drivers/staging/omapdrm/omap_dmm_tiler.h | 5 --- - drivers/staging/omapdrm/omap_drv.h | 2 +- - drivers/staging/omapdrm/omap_priv.h | 55 ------------------------------ - 3 files changed, 1 insertions(+), 61 deletions(-) - delete mode 100644 drivers/staging/omapdrm/omap_priv.h - -diff --git a/drivers/staging/omapdrm/omap_dmm_tiler.h b/drivers/staging/omapdrm/omap_dmm_tiler.h -index f87cb65..821d8e7 100644 ---- a/drivers/staging/omapdrm/omap_dmm_tiler.h -+++ b/drivers/staging/omapdrm/omap_dmm_tiler.h -@@ -127,9 +127,4 @@ static inline bool validfmt(enum tiler_fmt fmt) - } - } - --struct omap_dmm_platform_data { -- void __iomem *base; -- int irq; --}; -- - #endif -diff --git a/drivers/staging/omapdrm/omap_drv.h b/drivers/staging/omapdrm/omap_drv.h -index 61fe022..3a30fee 100644 ---- a/drivers/staging/omapdrm/omap_drv.h -+++ b/drivers/staging/omapdrm/omap_drv.h -@@ -25,8 +25,8 @@ - #include <linux/types.h> - #include <drm/drmP.h> - #include <drm/drm_crtc_helper.h> -+#include <plat/drm.h> - #include "omap_drm.h" --#include "omap_priv.h" - - #define DBG(fmt, ...) DRM_DEBUG(fmt"\n", ##__VA_ARGS__) - #define VERB(fmt, ...) if (0) DRM_DEBUG(fmt, ##__VA_ARGS__) /* verbose debug */ -diff --git a/drivers/staging/omapdrm/omap_priv.h b/drivers/staging/omapdrm/omap_priv.h -deleted file mode 100644 -index ef64414..0000000 ---- a/drivers/staging/omapdrm/omap_priv.h -+++ /dev/null -@@ -1,55 +0,0 @@ --/* -- * include/drm/omap_priv.h -- * -- * Copyright (C) 2011 Texas Instruments -- * Author: Rob Clark <rob@ti.com> -- * -- * This program is free software; you can redistribute it and/or modify it -- * under the terms of the GNU General Public License version 2 as published by -- * the Free Software Foundation. -- * -- * This program is distributed in the hope that it will be useful, but WITHOUT -- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -- * more details. -- * -- * You should have received a copy of the GNU General Public License along with -- * this program. If not, see <http://www.gnu.org/licenses/>. -- */ -- --#ifndef __OMAP_PRIV_H__ --#define __OMAP_PRIV_H__ -- --/* Non-userspace facing APIs -- */ -- --/* optional platform data to configure the default configuration of which -- * pipes/overlays/CRTCs are used.. if this is not provided, then instead the -- * first CONFIG_DRM_OMAP_NUM_CRTCS are used, and they are each connected to -- * one manager, with priority given to managers that are connected to -- * detected devices. Remaining overlays are used as video planes. This -- * should be a good default behavior for most cases, but yet there still -- * might be times when you wish to do something different. -- */ --struct omap_kms_platform_data { -- /* overlays to use as CRTCs: */ -- int ovl_cnt; -- const int *ovl_ids; -- -- /* overlays to use as video planes: */ -- int pln_cnt; -- const int *pln_ids; -- -- int mgr_cnt; -- const int *mgr_ids; -- -- int dev_cnt; -- const char **dev_names; --}; -- --struct omap_drm_platform_data { -- struct omap_kms_platform_data *kms_pdata; -- struct omap_dmm_platform_data *dmm_pdata; --}; -- --#endif /* __OMAP_DRM_H__ */ --- -1.7.9 -