From edb9303ae1caa6eef56f4ea4b850102c613d5e44 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 5 Oct 2013 15:31:24 +0200 Subject: [PATCH] backports: remove DRM driver Maintaining the DRM driver takes a lot of recourses as there they are depending on many API changes done to the core kernel code and currently we do not have that many recourses to follow them. On the other side one needs also new userspace drivers to make use of the new features added to the DRM kernel drivers and it is not easy to update the X drivers. Therefore we came to the conclusion to remove the drm drivers for now. There were also some problems with some DRM drivers, like the Intel i915 driver caused kernel panic on some systems and was probably only usable on some very recent kernel versions. Signed-off-by: Hauke Mehrtens --- README | 1 - backport/Kconfig | 2 - backport/Makefile.kernel | 2 - backport/defconfigs/drm | 49 -------- copy-list | 37 ------ dependencies | 18 --- .../drm/0001-fb-info-vt_switch/INFO | 44 ------- .../drivers_gpu_drm_i915_intel_fb.patch | 11 -- .../drm/02-revert-vm_mmap/INFO | 5 - .../drivers_gpu_drm_drm_bufs.patch | 31 ----- .../drivers_gpu_drm_i810_i810_dma.patch | 37 ------ .../INFO | 3 - .../drivers_gpu_drm_radeon_radeon_bios.patch | 24 ---- .../drivers_gpu_drm_drm_modes.patch | 15 --- .../drm/12-revert-remove_proc_subtree/INFO | 25 ---- .../drivers_gpu_drm_drm_proc.patch | 62 ---------- .../drm/13-nouveau-include-fix/INFO | 2 - .../drivers_gpu_drm_nouveau_Makefile.patch | 11 -- .../drivers_gpu_drm_i915.patch | 116 ------------------ .../drivers_gpu_drm_ttm.patch | 105 ---------------- .../15-intel-gtt/drivers_gpu_drm_i915.patch | 29 ----- .../drm/16-remove-energy-read/i915.patch | 28 ----- .../drivers_gpu_drm_drm_sysfs.patch | 14 --- 23 files changed, 671 deletions(-) delete mode 100644 backport/defconfigs/drm delete mode 100644 patches/collateral-evolutions/drm/0001-fb-info-vt_switch/INFO delete mode 100644 patches/collateral-evolutions/drm/0001-fb-info-vt_switch/drivers_gpu_drm_i915_intel_fb.patch delete mode 100644 patches/collateral-evolutions/drm/02-revert-vm_mmap/INFO delete mode 100644 patches/collateral-evolutions/drm/02-revert-vm_mmap/drivers_gpu_drm_drm_bufs.patch delete mode 100644 patches/collateral-evolutions/drm/02-revert-vm_mmap/drivers_gpu_drm_i810_i810_dma.patch delete mode 100644 patches/collateral-evolutions/drm/10-radeon-revert-acpi-table-size-check/INFO delete mode 100644 patches/collateral-evolutions/drm/10-radeon-revert-acpi-table-size-check/drivers_gpu_drm_radeon_radeon_bios.patch delete mode 100644 patches/collateral-evolutions/drm/11-videomode-includes/drivers_gpu_drm_drm_modes.patch delete mode 100644 patches/collateral-evolutions/drm/12-revert-remove_proc_subtree/INFO delete mode 100644 patches/collateral-evolutions/drm/12-revert-remove_proc_subtree/drivers_gpu_drm_drm_proc.patch delete mode 100644 patches/collateral-evolutions/drm/13-nouveau-include-fix/INFO delete mode 100644 patches/collateral-evolutions/drm/13-nouveau-include-fix/drivers_gpu_drm_nouveau_Makefile.patch delete mode 100644 patches/collateral-evolutions/drm/14-shrinkers-api/drivers_gpu_drm_i915.patch delete mode 100644 patches/collateral-evolutions/drm/14-shrinkers-api/drivers_gpu_drm_ttm.patch delete mode 100644 patches/collateral-evolutions/drm/15-intel-gtt/drivers_gpu_drm_i915.patch delete mode 100644 patches/collateral-evolutions/drm/16-remove-energy-read/i915.patch delete mode 100644 patches/collateral-evolutions/network/70-umode_t-api-change/drivers_gpu_drm_drm_sysfs.patch diff --git a/README b/README index eacd116288d0..9f7f1d6197e6 100644 --- a/README +++ b/README @@ -8,7 +8,6 @@ down to older kernels. It currently backports the following subsystems: * Bluetooth * NFC * ieee802154 - * GPU * Media * Regulator diff --git a/backport/Kconfig b/backport/Kconfig index 64a5f8b8bf57..0e24c79967f3 100644 --- a/backport/Kconfig +++ b/backport/Kconfig @@ -36,8 +36,6 @@ source drivers/net/usb/Kconfig source drivers/ssb/Kconfig source drivers/bcma/Kconfig -source drivers/gpu/drm/Kconfig - source net/nfc/Kconfig source drivers/regulator/Kconfig diff --git a/backport/Makefile.kernel b/backport/Makefile.kernel index ca75ce1f38b1..0a2a5693ebd0 100644 --- a/backport/Makefile.kernel +++ b/backport/Makefile.kernel @@ -8,7 +8,6 @@ NOSTDINC_FLAGS := \ -I$(M)/backport-include/uapi \ -I$(M)/include/ \ -I$(M)/include/uapi \ - -I$(M)/include/drm \ -include $(M)/backport-include/backport/backport.h \ $(call backport-cc-disable-warning, unused-but-set-variable) \ -DBACKPORTS_VERSION=\"$(BACKPORTS_VERSION)\" \ @@ -30,7 +29,6 @@ obj-$(CPTCFG_SSB) += drivers/ssb/ obj-$(CPTCFG_BCMA) += drivers/bcma/ obj-$(CPTCFG_ETHERNET) += drivers/net/ethernet/ obj-$(CPTCFG_USB_NET_RNDIS_WLAN) += drivers/net/usb/ -obj-$(CPTCFG_DRM) += drivers/gpu/drm/ obj-$(CPTCFG_NFC) += net/nfc/ obj-$(CPTCFG_NFC) += drivers/nfc/ obj-$(CPTCFG_REGULATOR) += drivers/regulator/ diff --git a/backport/defconfigs/drm b/backport/defconfigs/drm deleted file mode 100644 index 810b9e66889b..000000000000 --- a/backport/defconfigs/drm +++ /dev/null @@ -1,49 +0,0 @@ -CPTCFG_DRM=y -CPTCFG_DRM_USB=y -CPTCFG_DRM_KMS_HELPER=y -CPTCFG_DRM_LOAD_EDID_FIRMWARE=y -CPTCFG_DRM_TTM=y -CPTCFG_DRM_GEM_CMA_HELPER=y -CPTCFG_DRM_KMS_CMA_HELPER=y -CPTCFG_DRM_TDFX=y -CPTCFG_DRM_R128=y -CPTCFG_DRM_RADEON=y -CPTCFG_DRM_I810=y -CPTCFG_DRM_I915=y -CPTCFG_DRM_I915_KMS=y -CPTCFG_DRM_MGA=y -CPTCFG_DRM_SIS=y -CPTCFG_DRM_VIA=y -CPTCFG_DRM_SAVAGE=y -CPTCFG_DRM_I2C_CH7006=y -CPTCFG_DRM_I2C_SIL164=y -CPTCFG_DRM_I2C_NXP_TDA998X=y -CPTCFG_DRM_RADEON_UMS=y -CPTCFG_DRM_NOUVEAU=y -CPTCFG_DRM_NOUVEAU_BACKLIGHT=y -CPTCFG_DRM_EXYNOS=y -CPTCFG_DRM_EXYNOS_IOMMU=y -CPTCFG_DRM_EXYNOS_DMABUF=y -CPTCFG_DRM_EXYNOS_FIMD=y -CPTCFG_DRM_EXYNOS_HDMI=y -CPTCFG_DRM_EXYNOS_VIDI=y -CPTCFG_DRM_EXYNOS_G2D=y -CPTCFG_DRM_EXYNOS_IPP=y -CPTCFG_DRM_EXYNOS_FIMC=y -CPTCFG_DRM_EXYNOS_ROTATOR=y -CPTCFG_DRM_EXYNOS_GSC=y -CPTCFG_DRM_VMWGFX=y -CPTCFG_DRM_VMWGFX_FBCON=y -CPTCFG_DRM_GMA500=y -CPTCFG_DRM_GMA600=y -CPTCFG_DRM_GMA3600=y -CPTCFG_DRM_MEDFIELD=y -CPTCFG_DRM_UDL=y -CPTCFG_DRM_AST=y -CPTCFG_DRM_MGAG200=y -CPTCFG_DRM_CIRRUS_QEMU=y -CPTCFG_DRM_SHMOBILE=y -CPTCFG_DRM_TEGRA=y -CPTCFG_DRM_TEGRA_DEBUG=y -CPTCFG_DRM_OMAP=y -CPTCFG_DRM_TILCDC=y diff --git a/copy-list b/copy-list index 8f5116a10c15..b741c5d8b66d 100644 --- a/copy-list +++ b/copy-list @@ -115,43 +115,6 @@ drivers/net/usb/cdc_ncm.c drivers/net/usb/sierra_net.c drivers/net/usb/qmi_wwan.c -# DRM -include/drm/drm_agpsupport.h -include/drm/drm_buffer.h -include/drm/drm_cache.h -include/drm/drm_core.h -include/drm/drm_crtc.h -include/drm/drm_crtc_helper.h -include/drm/drm_dp_helper.h -include/drm/drm_edid.h -include/drm/drm_encoder_slave.h -include/drm/drm_flip_work.h -include/drm/drm_fb_cma_helper.h -include/drm/drm_fb_helper.h -include/drm/drm_fixed.h -include/drm/drm_gem_cma_helper.h -include/drm/drm_global.h -include/drm/drm_hashtab.h -include/drm/drm_memory.h -include/drm/drm_mem_util.h -include/drm/drm_mm.h -include/drm/drm_os_linux.h -include/drm/drm_pciids.h -include/drm/drmP.h -include/drm/drm_rect.h -include/drm/drm_sysfs.h -include/drm/drm_usb.h -include/drm/drm_vma_manager.h -include/drm/exynos_drm.h -include/drm/gma_drm.h -include/drm/i915_drm.h -include/drm/i915_powerwell.h -include/drm/i2c/ -include/drm/ttm/ -include/uapi/drm/ -drivers/platform/x86/intel_ips.h -drivers/gpu/drm/ - # NFC core net/nfc/ include/net/nfc/ diff --git a/dependencies b/dependencies index 142ea6be2a44..dd3428dc4abe 100644 --- a/dependencies +++ b/dependencies @@ -46,24 +46,6 @@ WL1251 3.0 MWIFIEX 2.6.27 -# DRM stuff -HDMI 3.2 -DRM 3.2 -# As of 3.11 DRM depends on the new ww_mutex which is -# backported via BACKPORT_BUILD_WW_MUTEX. This backported -# feature however has does not yet have support for -# DEBUG_MUTEXES and DEBUG_LOCK_ALLOC. -DRM kconfig: !BACKPORT_KERNEL_3_11 || !DEBUG_MUTEXES -DRM kconfig: !BACKPORT_KERNEL_3_11 || !DEBUG_LOCK_ALLOC -DRM_TTM 3.2 -# See e2bdb933, this was added on v3.3, in order to -# support DRM_QXL on 3.2 you'd have to backport 78c1d7848 -# to 3.2 on BACKPORT_BUILD_RADIX_HELPERS and that requires -# taking into consideration the radix_tree_node rcu change -# on e2bdb933. -DRM_QXL 3.3 -DRM_I915 3.7 - # Regulator # Because of -EPROBE_DEFER see commit d1c3414c and note that # we can't backport the core regulator as its part of the core diff --git a/patches/collateral-evolutions/drm/0001-fb-info-vt_switch/INFO b/patches/collateral-evolutions/drm/0001-fb-info-vt_switch/INFO deleted file mode 100644 index cb9dd679d214..000000000000 --- a/patches/collateral-evolutions/drm/0001-fb-info-vt_switch/INFO +++ /dev/null @@ -1,44 +0,0 @@ -Commit 3cf2667 as of next-20130301 extended the struct fb_info -with a skip_vt_switch to allow drivers to skip the VT switch -at suspend/resume time. For older kernels we can skip this -as all this switch does is call pm_vt_switch_required() with true -or false depending on this new flag and later -pm_vt_switch_unregister() would not have been made. - -This patch cannot be broken down further so I'm pegging -this as the first one with 4 digits under the DRM folder -for collateral evolutions. This reflects its as atomic as -is possible. - -Relevant commits below, starting with the first one that -added this new collateral evolution. - -commit 3cf2667b9f8b2c2fe298a427deb399e52321da6b -Author: Jesse Barnes -Date: Mon Feb 4 13:37:21 2013 +0000 - - fb: add support for drivers not needing VT switch at suspend/resume time - - Use the new PM routines to indicate whether we need to VT switch at suspend - and resume time. When a new driver is bound, set its flag accordingly, - and when unbound, remove it from the PM's console tracking list. - - Signed-off-by: Jesse Barnes - Acked-by: Rafael J. Wysocki - Signed-off-by: Daniel Vetter - -commit 24576d23976746cb52e7700c4cadbf4bc1bc3472 -Author: Jesse Barnes -Date: Tue Mar 26 09:25:45 2013 -0700 - - drm/i915: enable VT switchless resume v3 - - With the other bits in place, we can do this safely. - - v2: disable backlight on suspend to prevent premature enablement on resume - v3: disable CRTCs on suspend to allow RTD3 (Kristen) - - Signed-off-by: Jesse Barnes - Reviewed-by: Rodrigo Vivi - Signed-off-by: Daniel Vetter - diff --git a/patches/collateral-evolutions/drm/0001-fb-info-vt_switch/drivers_gpu_drm_i915_intel_fb.patch b/patches/collateral-evolutions/drm/0001-fb-info-vt_switch/drivers_gpu_drm_i915_intel_fb.patch deleted file mode 100644 index c0fab51f88e4..000000000000 --- a/patches/collateral-evolutions/drm/0001-fb-info-vt_switch/drivers_gpu_drm_i915_intel_fb.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/drivers/gpu/drm/i915/intel_fb.c -+++ b/drivers/gpu/drm/i915/intel_fb.c -@@ -152,7 +152,7 @@ static int intelfb_create(struct drm_fb_ - info->screen_size = size; - - /* This driver doesn't need a VT switch to restore the mode on resume */ -- info->skip_vt_switch = true; -+ fb_enable_skip_vt_switch(info); - - drm_fb_helper_fill_fix(info, fb->pitches[0], fb->depth); - drm_fb_helper_fill_var(info, &ifbdev->helper, sizes->fb_width, sizes->fb_height); diff --git a/patches/collateral-evolutions/drm/02-revert-vm_mmap/INFO b/patches/collateral-evolutions/drm/02-revert-vm_mmap/INFO deleted file mode 100644 index 977b4b79fe31..000000000000 --- a/patches/collateral-evolutions/drm/02-revert-vm_mmap/INFO +++ /dev/null @@ -1,5 +0,0 @@ -vm_mmap() and vm_munmap() were introduced in kernels >= 3.4.0. Revert -those changes for versions older than that. - -These can't be backported as they rely on non-exported symbols. - diff --git a/patches/collateral-evolutions/drm/02-revert-vm_mmap/drivers_gpu_drm_drm_bufs.patch b/patches/collateral-evolutions/drm/02-revert-vm_mmap/drivers_gpu_drm_drm_bufs.patch deleted file mode 100644 index c1af648e91af..000000000000 --- a/patches/collateral-evolutions/drm/02-revert-vm_mmap/drivers_gpu_drm_drm_bufs.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/drivers/gpu/drm/drm_bufs.c -+++ b/drivers/gpu/drm/drm_bufs.c -@@ -1406,6 +1406,20 @@ int drm_mapbufs(struct drm_device *dev, - retcode = -EINVAL; - goto done; - } -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) -+ down_write(¤t->mm->mmap_sem); -+ virtual = do_mmap(file_priv->filp, 0, map->size, -+ PROT_READ | PROT_WRITE, -+ MAP_SHARED, -+ token); -+ up_write(¤t->mm->mmap_sem); -+ } else { -+ down_write(¤t->mm->mmap_sem); -+ virtual = do_mmap(file_priv->filp, 0, dma->byte_count, -+ PROT_READ | PROT_WRITE, -+ MAP_SHARED, 0); -+ up_write(¤t->mm->mmap_sem); -+#else - virtual = vm_mmap(file_priv->filp, 0, map->size, - PROT_READ | PROT_WRITE, - MAP_SHARED, -@@ -1414,6 +1428,7 @@ int drm_mapbufs(struct drm_device *dev, - virtual = vm_mmap(file_priv->filp, 0, dma->byte_count, - PROT_READ | PROT_WRITE, - MAP_SHARED, 0); -+#endif - } - if (virtual > -1024UL) { - /* Real error */ diff --git a/patches/collateral-evolutions/drm/02-revert-vm_mmap/drivers_gpu_drm_i810_i810_dma.patch b/patches/collateral-evolutions/drm/02-revert-vm_mmap/drivers_gpu_drm_i810_i810_dma.patch deleted file mode 100644 index e3d60b33bfc8..000000000000 --- a/patches/collateral-evolutions/drm/02-revert-vm_mmap/drivers_gpu_drm_i810_i810_dma.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- a/drivers/gpu/drm/i810/i810_dma.c -+++ b/drivers/gpu/drm/i810/i810_dma.c -@@ -134,9 +134,17 @@ static int i810_map_buffer(struct drm_bu - old_fops = file_priv->filp->f_op; - file_priv->filp->f_op = &i810_buffer_fops; - dev_priv->mmap_buffer = buf; -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) -+ down_write(¤t->mm->mmap_sem); -+ buf_priv->virtual = (void *)do_mmap(file_priv->filp, 0, buf->total, -+ PROT_READ | PROT_WRITE, -+ MAP_SHARED, buf->bus_address); -+ up_write(¤t->mm->mmap_sem); -+#else - buf_priv->virtual = (void *)vm_mmap(file_priv->filp, 0, buf->total, - PROT_READ | PROT_WRITE, - MAP_SHARED, buf->bus_address); -+#endif - dev_priv->mmap_buffer = NULL; - file_priv->filp->f_op = old_fops; - if (IS_ERR(buf_priv->virtual)) { -@@ -157,9 +165,15 @@ static int i810_unmap_buffer(struct drm_ - if (buf_priv->currently_mapped != I810_BUF_MAPPED) - return -EINVAL; - -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) -+ down_write(¤t->mm->mmap_sem); -+ retcode = do_munmap(current->mm, (unsigned long)buf_priv->virtual, -+ (size_t) buf->total); -+ up_write(¤t->mm->mmap_sem); -+#else - retcode = vm_munmap((unsigned long)buf_priv->virtual, - (size_t) buf->total); -- -+#endif - buf_priv->currently_mapped = I810_BUF_UNMAPPED; - buf_priv->virtual = NULL; - diff --git a/patches/collateral-evolutions/drm/10-radeon-revert-acpi-table-size-check/INFO b/patches/collateral-evolutions/drm/10-radeon-revert-acpi-table-size-check/INFO deleted file mode 100644 index 28db5d28b795..000000000000 --- a/patches/collateral-evolutions/drm/10-radeon-revert-acpi-table-size-check/INFO +++ /dev/null @@ -1,3 +0,0 @@ -acpi_get_table_with_size() was exported with kernels >= 3.6. Revert the -size checking for kernels < 3.6. - diff --git a/patches/collateral-evolutions/drm/10-radeon-revert-acpi-table-size-check/drivers_gpu_drm_radeon_radeon_bios.patch b/patches/collateral-evolutions/drm/10-radeon-revert-acpi-table-size-check/drivers_gpu_drm_radeon_radeon_bios.patch deleted file mode 100644 index 29c2bb827fe7..000000000000 --- a/patches/collateral-evolutions/drm/10-radeon-revert-acpi-table-size-check/drivers_gpu_drm_radeon_radeon_bios.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/drivers/gpu/drm/radeon/radeon_bios.c -+++ b/drivers/gpu/drm/radeon/radeon_bios.c -@@ -581,12 +581,21 @@ static bool radeon_acpi_vfct_bios(struct - { - bool ret = false; - struct acpi_table_header *hdr; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)) - acpi_size tbl_size; -+#else -+ /* acpi_get_table_with_size() not exported on kernels < 3.6 */ -+ acpi_size tbl_size = 0x7fffffff; -+#endif - UEFI_ACPI_VFCT *vfct; - GOP_VBIOS_CONTENT *vbios; - VFCT_IMAGE_HEADER *vhdr; - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)) - if (!ACPI_SUCCESS(acpi_get_table_with_size("VFCT", 1, &hdr, &tbl_size))) -+#else -+ if (!ACPI_SUCCESS(acpi_get_table("VFCT", 1, &hdr))) -+#endif - return false; - if (tbl_size < sizeof(UEFI_ACPI_VFCT)) { - DRM_ERROR("ACPI VFCT table present but broken (too short #1)\n"); diff --git a/patches/collateral-evolutions/drm/11-videomode-includes/drivers_gpu_drm_drm_modes.patch b/patches/collateral-evolutions/drm/11-videomode-includes/drivers_gpu_drm_drm_modes.patch deleted file mode 100644 index 1858cc31fe28..000000000000 --- a/patches/collateral-evolutions/drm/11-videomode-includes/drivers_gpu_drm_drm_modes.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/drivers/gpu/drm/drm_modes.c -+++ b/drivers/gpu/drm/drm_modes.c -@@ -35,8 +35,12 @@ - #include - #include - #include -+#if IS_ENABLED(CONFIG_OF_VIDEOMODE) - #include