compat-drivers: Handle int's when generating compat_autoconf.h
PATCH 1/7 compat-drivers: Handle int's when generating compat_autoconf.h
Some Kconfig variables take integer values instead of y/m/N like CONFIG_NOUVEAU_DEBUG and CONFIG_NOUVEAU_DEBUG_DEFAULT. Currently all values other than y/m/N were escaped with double-quotes to define them as strings. Fix this to allow integer values for Kconfig variables.
--- scripts/gen-compat-autoconf.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
scripts/gen-compat-autoconf.sh +9 -3
@@ -57,13 +57,19 @@ function define_config { echo "#define $VAR 1" echo "#endif /* $VAR */ " ;; - *) # Assume string - # XXX: add better checks to make sure what was on - # the right was indeed a string + [0-9]*) + # Leave integers as is + echo "#ifndef $VAR" + echo "#define $VAR $VALUE" + echo "#endif /* $VAR */ " + ;; + *) + # Escape every other thing with double quotes echo "#ifndef $VAR" echo "#define $VAR \"$VALUE\"" echo "#endif /* $VAR */ " ;; + esac }
Signature · 1 line
1.7.11.7
PATCH 3/7 compat-drivers: Add missing config check
No configuration change was retriggering config update because of this missing line unless you give the 'bt' target.
--- Makefile | 1 + 1 file changed, 1 insertion(+)
Makefile +1 -0
@@ -96,6 +96,7 @@ all: modules $(COMPAT_CONFIG): ; modules: $(CREL_CHECK) + +@./scripts/check_config.sh $(MAKE) -C $(KLIB_BUILD) M=$(PWD) modules @touch $@
Signature · 1 line
1.7.11.7
PATCH 4/7 compat-drivers: Rename CONFIG_DRM_NOUVEAU_BACKLIGHT
In reply to Ozan ÇağlayanThis was forgotten during the generation of the renaming patch.
--- patches/drm/06-rename-config-options.patch | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
patches/drm/06-rename-config-options.patch +21 -0
@@ -75,6 +75,27 @@ sil164-y := sil164_drv.o -obj-$(CONFIG_DRM_I2C_SIL164) += sil164.o +obj-$(CONFIG_COMPAT_DRM_I2C_SIL164) += sil164.o +--- a/drivers/gpu/drm/nouveau/Makefile ++++ b/drivers/gpu/drm/nouveau/Makefile +@@ -187,6 +187,6 @@ nouveau-y += nouveau_mem.o + # other random bits + nouveau-$(CONFIG_COMPAT) += nouveau_ioc32.o + nouveau-$(CONFIG_ACPI) += nouveau_acpi.o +-nouveau-$(CONFIG_DRM_NOUVEAU_BACKLIGHT) += nouveau_backlight.o ++nouveau-$(CONFIG_COMPAT_DRM_NOUVEAU_BACKLIGHT) += nouveau_backlight.o + + obj-$(CONFIG_DRM_NOUVEAU)+= nouveau.o +--- a/drivers/gpu/drm/nouveau/nouveau_display.h 2012-10-28 17:57:24.844141245 +0200 ++++ b/drivers/gpu/drm/nouveau/nouveau_display.h 2012-10-28 17:57:41.408834396 +0200 +@@ -76,7 +76,7 @@ + + void nouveau_hdmi_mode_set(struct drm_encoder *, struct drm_display_mode *); + +-#ifdef CONFIG_DRM_NOUVEAU_BACKLIGHT ++#ifdef CONFIG_COMPAT_DRM_NOUVEAU_BACKLIGHT + extern int nouveau_backlight_init(struct drm_device *); + extern void nouveau_backlight_exit(struct drm_device *); + #else --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c @@ -119,7 +119,7 @@ int drm_helper_probe_single_connector_mo
Signature · 1 line
1.7.11.7
PATCH 5/7 compat-drivers: Fix comments
In reply to Ozan ÇağlayanThe comments were wrong causing a misunderstanding while analyzing the script's function.
--- scripts/check_config.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
scripts/check_config.sh +5 -4
@@ -3,10 +3,11 @@ # regenerates the compat_autoconf header. # These variables are expected to be exported: -#COMPAT_CONFIG=".config" -#COMPAT_CONFIG_CW="config" -#CONFIG_CHECK=".${COMPAT_CONFIG}.md5" -#COMPAT_AUTOCONF="include/linux/compat_autoconf.h" +#COMPAT_CONFIG_CW=$(PWD)/config.mk +#COMPAT_CONFIG=$(PWD)/.config +#CONFIG_CHECK=$(PWD)/.config.mk_md5sum.txt +#COMPAT_AUTOCONF=include/linux/compat_autoconf.h + function gen_compat_autoconf { echo "./scripts/gen-compat-autoconf.sh $COMPAT_CONFIG $COMPAT_CONFIG_CW > $COMPAT_AUTOCONF"
Signature · 1 line
1.7.11.7
PATCH 6/7 compat-drivers: Enable nouveau DRM driver for kernels >= 3.3
In reply to Ozan ÇağlayanEnable Nouveau DRM driver for kernels >= 3.3.
--- config.mk | 9 +++++++++ 1 file changed, 9 insertions(+)
config.mk +9 -0
@@ -709,3 +709,12 @@ export CONFIG_COMPAT_DRM_I915=m export CONFIG_COMPAT_DRM_LOAD_EDID_FIRMWARE=y export CONFIG_COMPAT_DRM_KMS_HELPER=m endif #CONFIG_COMPAT_KERNEL_3_2 + +# Enable nouveau on >= 3.3 +ifndef CONFIG_COMPAT_KERNEL_3_3 +export CONFIG_COMPAT_DRM_TTM=m +export CONFIG_COMPAT_DRM_NOUVEAU=m +export CONFIG_COMPAT_DRM_NOUVEAU_BACKLIGHT=y +export CONFIG_COMPAT_NOUVEAU_DEBUG=5 +export CONFIG_COMPAT_NOUVEAU_DEBUG_DEFAULT=3 +endif #CONFIG_COMPAT_KERNEL_3_3
Signature · 1 line
1.7.11.7
PATCH 7/7 compat-drivers: Update README
In reply to Ozan ÇağlayanAdd GPU subsystem information to README.md.
--- README.md | 1 + 1 file changed, 1 insertion(+)
README.md +1 -0
@@ -6,6 +6,7 @@ down to older kernels. It currently backports 3 subsystems: * Ethernet * Wireless * Bluetooth + * GPU This package provides the latest Linux kernel subsystem enhancements for kernels 2.6.24 and above. It is technically possible to support
Signature · 1 line
1.7.11.7
PATCH 2/7 compat-drivers: Rename CONFIG_* vars in nouveau driver
In reply to Ozan ÇağlayanNouveau used 2 Kconfig defined vars to set debugging log levels. Rename to for being able to set them from config.mk correctly.
--- .../drm/09-nouveau-compatify-kconfig-vars.patch | 177 +++++++++++++++++++++ 1 file changed, 177 insertions(+) create mode 100644 patches/drm/09-nouveau-compatify-kconfig-vars.patch
patches/drm/09-nouveau-compatify-kconfig-vars.patch new file +177 -0
@@ -0,0 +1,177 @@ +Rename CONFIG_NOUVEAU_DEBUG and CONFIG_NOUVEAU_DEBUG_DEFAULT to +CONFIG_COMPAT_*. + +Index: compat-drivers/drivers/gpu/drm/nouveau/core/core/option.c +=================================================================== +--- compat-drivers.orig/drivers/gpu/drm/nouveau/core/core/option.c ++++ compat-drivers/drivers/gpu/drm/nouveau/core/core/option.c +@@ -86,7 +86,7 @@ nouveau_boolopt(const char *optstr, cons + int + nouveau_dbgopt(const char *optstr, const char *sub) + { +- int mode = 1, level = CONFIG_NOUVEAU_DEBUG_DEFAULT; ++ int mode = 1, level = CONFIG_COMPAT_NOUVEAU_DEBUG_DEFAULT; + + while (optstr) { + int len = strcspn(optstr, ",="); +Index: compat-drivers/drivers/gpu/drm/nouveau/core/include/core/client.h +=================================================================== +--- compat-drivers.orig/drivers/gpu/drm/nouveau/core/include/core/client.h ++++ compat-drivers/drivers/gpu/drm/nouveau/core/include/core/client.h +@@ -15,7 +15,7 @@ struct nouveau_client { + static inline struct nouveau_client * + nv_client(void *obj) + { +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + if (unlikely(!nv_iclass(obj, NV_CLIENT_CLASS))) + nv_assert("BAD CAST -> NvClient, %08x", nv_hclass(obj)); + #endif +Index: compat-drivers/drivers/gpu/drm/nouveau/core/include/core/device.h +=================================================================== +--- compat-drivers.orig/drivers/gpu/drm/nouveau/core/include/core/device.h ++++ compat-drivers/drivers/gpu/drm/nouveau/core/include/core/device.h +@@ -96,7 +96,7 @@ nv_device(void *obj) + if (device->parent) + device = device->parent; + +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + if (unlikely(!nv_iclass(device, NV_SUBDEV_CLASS) || + (nv_hclass(device) & 0xff) != NVDEV_SUBDEV_DEVICE)) { + nv_assert("BAD CAST -> NvDevice, 0x%08x 0x%08x", +Index: compat-drivers/drivers/gpu/drm/nouveau/core/include/core/engctx.h +=================================================================== +--- compat-drivers.orig/drivers/gpu/drm/nouveau/core/include/core/engctx.h ++++ compat-drivers/drivers/gpu/drm/nouveau/core/include/core/engctx.h +@@ -20,7 +20,7 @@ struct nouveau_engctx { + static inline struct nouveau_engctx * + nv_engctx(void *obj) + { +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + if (unlikely(!nv_iclass(obj, NV_ENGCTX_CLASS))) + nv_assert("BAD CAST -> NvEngCtx, %08x", nv_hclass(obj)); + #endif +Index: compat-drivers/drivers/gpu/drm/nouveau/core/include/core/engine.h +=================================================================== +--- compat-drivers.orig/drivers/gpu/drm/nouveau/core/include/core/engine.h ++++ compat-drivers/drivers/gpu/drm/nouveau/core/include/core/engine.h +@@ -22,7 +22,7 @@ struct nouveau_engine { + static inline struct nouveau_engine * + nv_engine(void *obj) + { +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + if (unlikely(!nv_iclass(obj, NV_ENGINE_CLASS))) + nv_assert("BAD CAST -> NvEngine, %08x", nv_hclass(obj)); + #endif +Index: compat-drivers/drivers/gpu/drm/nouveau/core/include/core/gpuobj.h +=================================================================== +--- compat-drivers.orig/drivers/gpu/drm/nouveau/core/include/core/gpuobj.h ++++ compat-drivers/drivers/gpu/drm/nouveau/core/include/core/gpuobj.h +@@ -27,7 +27,7 @@ struct nouveau_gpuobj { + static inline struct nouveau_gpuobj * + nv_gpuobj(void *obj) + { +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + if (unlikely(!nv_iclass(obj, NV_GPUOBJ_CLASS))) + nv_assert("BAD CAST -> NvGpuObj, %08x", nv_hclass(obj)); + #endif +Index: compat-drivers/drivers/gpu/drm/nouveau/core/include/core/namedb.h +=================================================================== +--- compat-drivers.orig/drivers/gpu/drm/nouveau/core/include/core/namedb.h ++++ compat-drivers/drivers/gpu/drm/nouveau/core/include/core/namedb.h +@@ -14,7 +14,7 @@ struct nouveau_namedb { + static inline struct nouveau_namedb * + nv_namedb(void *obj) + { +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + if (unlikely(!nv_iclass(obj, NV_NAMEDB_CLASS))) + nv_assert("BAD CAST -> NvNameDB, %08x", nv_hclass(obj)); + #endif +Index: compat-drivers/drivers/gpu/drm/nouveau/core/include/core/object.h +=================================================================== +--- compat-drivers.orig/drivers/gpu/drm/nouveau/core/include/core/object.h ++++ compat-drivers/drivers/gpu/drm/nouveau/core/include/core/object.h +@@ -20,7 +20,7 @@ struct nouveau_object { + struct nouveau_object *engine; + atomic_t refcount; + atomic_t usecount; +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + #define NOUVEAU_OBJECT_MAGIC 0x75ef0bad + struct list_head list; + u32 _magic; +@@ -30,7 +30,7 @@ struct nouveau_object { + static inline struct nouveau_object * + nv_object(void *obj) + { +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + if (likely(obj)) { + struct nouveau_object *object = obj; + if (unlikely(object->_magic != NOUVEAU_OBJECT_MAGIC)) +Index: compat-drivers/drivers/gpu/drm/nouveau/core/include/core/parent.h +=================================================================== +--- compat-drivers.orig/drivers/gpu/drm/nouveau/core/include/core/parent.h ++++ compat-drivers/drivers/gpu/drm/nouveau/core/include/core/parent.h +@@ -29,7 +29,7 @@ struct nouveau_parent { + static inline struct nouveau_parent * + nv_parent(void *obj) + { +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + if (unlikely(!(nv_iclass(obj, NV_PARENT_CLASS)))) + nv_assert("BAD CAST -> NvParent, %08x", nv_hclass(obj)); + #endif +Index: compat-drivers/drivers/gpu/drm/nouveau/core/include/core/printk.h +=================================================================== +--- compat-drivers.orig/drivers/gpu/drm/nouveau/core/include/core/printk.h ++++ compat-drivers/drivers/gpu/drm/nouveau/core/include/core/printk.h +@@ -18,7 +18,7 @@ struct nouveau_object; + void nv_printk_(struct nouveau_object *, const char *, int, const char *, ...); + + #define nv_printk(o,l,f,a...) do { \ +- if (NV_DBG_##l <= CONFIG_NOUVEAU_DEBUG) \ ++ if (NV_DBG_##l <= CONFIG_COMPAT_NOUVEAU_DEBUG) \ + nv_printk_(nv_object(o), NV_PRINTK_##l, NV_DBG_##l, f, ##a); \ + } while(0) + +@@ -31,7 +31,7 @@ void nv_printk_(struct nouveau_object *, + #define nv_spam(o,f,a...) nv_printk((o), SPAM, f, ##a) + + #define nv_assert(f,a...) do { \ +- if (NV_DBG_FATAL <= CONFIG_NOUVEAU_DEBUG) \ ++ if (NV_DBG_FATAL <= CONFIG_COMPAT_NOUVEAU_DEBUG) \ + nv_printk_(NULL, NV_PRINTK_FATAL, NV_DBG_FATAL, f "\n", ##a); \ + BUG_ON(1); \ + } while(0) +Index: compat-drivers/drivers/gpu/drm/nouveau/core/include/core/subdev.h +=================================================================== +--- compat-drivers.orig/drivers/gpu/drm/nouveau/core/include/core/subdev.h ++++ compat-drivers/drivers/gpu/drm/nouveau/core/include/core/subdev.h +@@ -20,7 +20,7 @@ struct nouveau_subdev { + static inline struct nouveau_subdev * + nv_subdev(void *obj) + { +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + if (unlikely(!nv_iclass(obj, NV_SUBDEV_CLASS))) + nv_assert("BAD CAST -> NvSubDev, %08x", nv_hclass(obj)); + #endif +Index: compat-drivers/drivers/gpu/drm/nouveau/core/include/subdev/instmem.h +=================================================================== +--- compat-drivers.orig/drivers/gpu/drm/nouveau/core/include/subdev/instmem.h ++++ compat-drivers/drivers/gpu/drm/nouveau/core/include/subdev/instmem.h +@@ -16,7 +16,7 @@ struct nouveau_instobj { + static inline struct nouveau_instobj * + nv_memobj(void *obj) + { +-#if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA ++#if CONFIG_COMPAT_NOUVEAU_DEBUG >= NV_DBG_PARANOIA + if (unlikely(!nv_iclass(obj, NV_MEMOBJ_CLASS))) + nv_assert("BAD CAST -> NvMemObj, %08x", nv_hclass(obj)); + #endif
Signature · 1 line
1.7.11.7