obj-y := compat/
obj-$(CONFIG_COMPAT_RFKILL) += net/rfkill/
+obj-$(CONFIG_COMPAT_VIDEO_MODULES) += drivers/gpu/drm/
ifeq ($(BT),)
obj-$(CONFIG_COMPAT_WIRELESS) += net/wireless/ net/mac80211/
KERNEL_26SUBLEVEL := $(shell $(MAKE) -C $(KLIB_BUILD) kernelversion | sed -n 's/^2\.6\.\([0-9]\+\).*/\1/p')
endif
-# FIXME: This lower limit is different (e.g. 3.0) for DRM stuff.
ifdef CONFIG_COMPAT_KERNEL_2_6_24
$(error "ERROR: compat-drivers by default supports kernels >= 2.6.24, try enabling only one driver though")
endif #CONFIG_COMPAT_KERNEL_2_6_24
export CONFIG_RFKILL_BACKPORT_INPUT=y
endif #CONFIG_COMPAT_KERNEL_2_6_31
+# compilation has been tested down to 3.0 but run time
+# tests have only started on 3.2.
+ifndef CONFIG_COMPAT_KERNEL_3_2
+export CONFIG_COMPAT_VIDEO_MODULES=y
+export CONFIG_COMPAT_DRM=m
+export CONFIG_COMPAT_DRM_I915=m
+export CONFIG_COMPAT_DRM_KMS_HELPER=m
+endif #CONFIG_COMPAT_KERNEL_3_2
--- /dev/null
+--- a/drivers/gpu/drm/Makefile
++++ b/drivers/gpu/drm/Makefile
+@@ -15,37 +15,37 @@ drm-y := drm_auth.o drm_buffer.o d
+ drm_trace_points.o drm_global.o drm_prime.o
+
+ drm-$(CONFIG_COMPAT) += drm_ioc32.o
+-drm-$(CONFIG_DRM_GEM_CMA_HELPER) += drm_gem_cma_helper.o
++drm-$(CONFIG_COMPAT_DRM_GEM_CMA_HELPER) += drm_gem_cma_helper.o
+
+ drm-usb-y := drm_usb.o
+
+ drm_kms_helper-y := drm_fb_helper.o drm_crtc_helper.o drm_dp_i2c_helper.o
+-drm_kms_helper-$(CONFIG_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o
+-drm_kms_helper-$(CONFIG_DRM_KMS_CMA_HELPER) += drm_fb_cma_helper.o
++drm_kms_helper-$(CONFIG_COMPAT_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o
++drm_kms_helper-$(CONFIG_COMPAT_DRM_KMS_CMA_HELPER) += drm_fb_cma_helper.o
+
+-obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.o
++obj-$(CONFIG_COMPAT_DRM_KMS_HELPER) += drm_kms_helper.o
+
+ CFLAGS_drm_trace_points.o := -I$(src)
+
+-obj-$(CONFIG_DRM) += drm.o
+-obj-$(CONFIG_DRM_USB) += drm_usb.o
+-obj-$(CONFIG_DRM_TTM) += ttm/
+-obj-$(CONFIG_DRM_TDFX) += tdfx/
+-obj-$(CONFIG_DRM_R128) += r128/
+-obj-$(CONFIG_DRM_RADEON)+= radeon/
+-obj-$(CONFIG_DRM_MGA) += mga/
+-obj-$(CONFIG_DRM_I810) += i810/
+-obj-$(CONFIG_DRM_I915) += i915/
+-obj-$(CONFIG_DRM_MGAG200) += mgag200/
+-obj-$(CONFIG_DRM_CIRRUS_QEMU) += cirrus/
+-obj-$(CONFIG_DRM_SIS) += sis/
+-obj-$(CONFIG_DRM_SAVAGE)+= savage/
+-obj-$(CONFIG_DRM_VMWGFX)+= vmwgfx/
+-obj-$(CONFIG_DRM_VIA) +=via/
+-obj-$(CONFIG_DRM_NOUVEAU) +=nouveau/
+-obj-$(CONFIG_DRM_EXYNOS) +=exynos/
+-obj-$(CONFIG_DRM_GMA500) += gma500/
+-obj-$(CONFIG_DRM_UDL) += udl/
+-obj-$(CONFIG_DRM_AST) += ast/
+-obj-$(CONFIG_DRM_SHMOBILE) +=shmobile/
++obj-$(CONFIG_COMPAT_DRM) += drm.o
++obj-$(CONFIG_COMPAT_DRM_USB) += drm_usb.o
++obj-$(CONFIG_COMPAT_DRM_TTM) += ttm/
++obj-$(CONFIG_COMPAT_DRM_TDFX) += tdfx/
++obj-$(CONFIG_COMPAT_DRM_R128) += r128/
++obj-$(CONFIG_COMPAT_DRM_RADEON)+= radeon/
++obj-$(CONFIG_COMPAT_DRM_MGA) += mga/
++obj-$(CONFIG_COMPAT_DRM_I810) += i810/
++obj-$(CONFIG_COMPAT_DRM_I915) += i915/
++obj-$(CONFIG_COMPAT_DRM_MGAG200) += mgag200/
++obj-$(CONFIG_COMPAT_DRM_CIRRUS_QEMU) += cirrus/
++obj-$(CONFIG_COMPAT_DRM_SIS) += sis/
++obj-$(CONFIG_COMPAT_DRM_SAVAGE)+= savage/
++obj-$(CONFIG_COMPAT_DRM_VMWGFX)+= vmwgfx/
++obj-$(CONFIG_COMPAT_DRM_VIA) +=via/
++obj-$(CONFIG_COMPAT_DRM_NOUVEAU) +=nouveau/
++obj-$(CONFIG_COMPAT_DRM_EXYNOS) +=exynos/
++obj-$(CONFIG_COMPAT_DRM_GMA500) += gma500/
++obj-$(CONFIG_COMPAT_DRM_UDL) += udl/
++obj-$(CONFIG_COMPAT_DRM_AST) += ast/
++obj-$(CONFIG_COMPAT_DRM_SHMOBILE) +=shmobile/
+ obj-y += i2c/
+--- a/drivers/gpu/drm/i2c/Makefile
++++ b/drivers/gpu/drm/i2c/Makefile
+@@ -1,7 +1,7 @@
+ ccflags-y := -Iinclude/drm
+
+ ch7006-y := ch7006_drv.o ch7006_mode.o
+-obj-$(CONFIG_DRM_I2C_CH7006) += ch7006.o
++obj-$(CONFIG_COMPAT_DRM_I2C_CH7006) += ch7006.o
+
+ sil164-y := sil164_drv.o
+-obj-$(CONFIG_DRM_I2C_SIL164) += sil164.o
++obj-$(CONFIG_COMPAT_DRM_I2C_SIL164) += sil164.o
--- a/drivers/gpu/drm/Makefile
+++ b/drivers/gpu/drm/Makefile
-@@ -30,22 +30,15 @@ CFLAGS_drm_trace_points.o := -I$(src)
- obj-$(CONFIG_DRM) += drm.o
- obj-$(CONFIG_DRM_USB) += drm_usb.o
- obj-$(CONFIG_DRM_TTM) += ttm/
--obj-$(CONFIG_DRM_TDFX) += tdfx/
--obj-$(CONFIG_DRM_R128) += r128/
- obj-$(CONFIG_DRM_RADEON)+= radeon/
--obj-$(CONFIG_DRM_MGA) += mga/
- obj-$(CONFIG_DRM_I810) += i810/
- obj-$(CONFIG_DRM_I915) += i915/
- obj-$(CONFIG_DRM_MGAG200) += mgag200/
- obj-$(CONFIG_DRM_CIRRUS_QEMU) += cirrus/
--obj-$(CONFIG_DRM_SIS) += sis/
--obj-$(CONFIG_DRM_SAVAGE)+= savage/
- obj-$(CONFIG_DRM_VMWGFX)+= vmwgfx/
- obj-$(CONFIG_DRM_VIA) +=via/
- obj-$(CONFIG_DRM_NOUVEAU) +=nouveau/
--obj-$(CONFIG_DRM_EXYNOS) +=exynos/
- obj-$(CONFIG_DRM_GMA500) += gma500/
--obj-$(CONFIG_DRM_UDL) += udl/
- obj-$(CONFIG_DRM_AST) += ast/
- obj-$(CONFIG_DRM_SHMOBILE) +=shmobile/
+@@ -30,22 +30,14 @@ CFLAGS_drm_trace_points.o := -I$(src)
+ obj-$(CONFIG_COMPAT_DRM) += drm.o
+ obj-$(CONFIG_COMPAT_DRM_USB) += drm_usb.o
+ obj-$(CONFIG_COMPAT_DRM_TTM) += ttm/
+-obj-$(CONFIG_COMPAT_DRM_TDFX) += tdfx/
+-obj-$(CONFIG_COMPAT_DRM_R128) += r128/
+ obj-$(CONFIG_COMPAT_DRM_RADEON)+= radeon/
+-obj-$(CONFIG_COMPAT_DRM_MGA) += mga/
+ obj-$(CONFIG_COMPAT_DRM_I810) += i810/
+ obj-$(CONFIG_COMPAT_DRM_I915) += i915/
+ obj-$(CONFIG_COMPAT_DRM_MGAG200) += mgag200/
+ obj-$(CONFIG_COMPAT_DRM_CIRRUS_QEMU) += cirrus/
+-obj-$(CONFIG_COMPAT_DRM_SIS) += sis/
+-obj-$(CONFIG_COMPAT_DRM_SAVAGE)+= savage/
+ obj-$(CONFIG_COMPAT_DRM_VMWGFX)+= vmwgfx/
+ obj-$(CONFIG_COMPAT_DRM_VIA) +=via/
+ obj-$(CONFIG_COMPAT_DRM_NOUVEAU) +=nouveau/
+-obj-$(CONFIG_COMPAT_DRM_EXYNOS) +=exynos/
+ obj-$(CONFIG_COMPAT_DRM_GMA500) += gma500/
+-obj-$(CONFIG_COMPAT_DRM_UDL) += udl/
+ obj-$(CONFIG_COMPAT_DRM_AST) += ast/
+-obj-$(CONFIG_COMPAT_DRM_SHMOBILE) +=shmobile/
obj-y += i2c/
# compatibility with compat-wireless, wlan/bt/eth drivers are
# fetched in by default.
ENABLE_NETWORK=1
-ENABLE_DRM=0
+ENABLE_DRM=1
SUBSYSTEMS=
EXTRA_PATCHES="patches"
;;
"network")
ENABLE_NETWORK=1
+ ENABLE_DRM=0
shift
;;
"drm")
# what if you update b44 but not b43? It will bust.
SUPPORTED_ETH_DRIVERS="atl1 atl2 atl1e atl1c alx"
+SUPPORTED_DRM_DRIVERS="i915"
+
function usage {
echo -e "${GREEN}Usage${NORMAL}: ${BOLD}$0${NORMAL} [ ${PURPLE}<driver-name>${NORMAL} | ${CYAN}<driver-group-name>${NORMAL} | ${GREEN}restore${NORMAL} ]"
echo -e "\t${PURPLE}${i}${NORMAL}"
done
+ echo -e "Supported DRM drivers:"
+ for i in $SUPPORTED_DRM_DRIVERS; do
+ echo -e "\t${PURPLE}${i}${NORMAL}"
+ done
+
# These should match the switch below.
echo -e "\nSupported group drivers:"
echo -e "\t${CYAN}atheros${NORMAL} < ${PURPLE} ath5k ath9k carl9170 zd1211rw ath6kl wil6210${NORMAL}>"
echo -e "\t${CYAN}atlxx${NORMAL} < ${PURPLE} atl1 atl2 atl1e alx${NORMAL}>"
echo -e "\t${CYAN}bt${NORMAL} < ${PURPLE} Linux bluetooth drivers ${NORMAL}>"
+ echo -e "\nSupported group drivers: DRM:"
+ echo -e "\t${CYAN}drm${NORMAL} < ${PURPLE} i915${NORMAL}>"
+
echo -e "Restoring compat-drivers:"
echo -e "\t${GREEN}restore${NORMAL}: you can use this option to restore compat-drivers to the original state"
}
perl -i -ne 'print if ! /update-initramfs/' Makefile
}
+function enable_only_drm {
+ backup_file Makefile
+ disable_ethernet
+ disable_staging
+ disable_usbnet
+ disable_var_03
+ disable_bt
+ # rfkill may be needed if you enable b44 as you may have b43
+ disable_rfkill
+ disable_80211
+}
+
function select_ath_driver
{
backup_file $ATH_MAKEFILE
disable_staging
disable_80211
;;
+ i915)
+ enable_only_drm
+ ;;
+ drm)
+ enable_only_drm
+ ;;
*)
echo "Unsupported driver"
exit