From 9306ff6e707a6642406ef53551c6874f22cccd2e Mon Sep 17 00:00:00 2001 From: Imre Deak Date: Mon, 7 Nov 2011 18:51:11 +0200 Subject: [PATCH] gfx: pvr: clarify Kconfig terms wrt. ABI version vs. simple debug Give a better name for the Kconfig option selecting the ABI version (release or debug) and add a new option for simple debug messages and asserts. Disable debugging in bridged_pvr_bridge.c, the following patch will enable debugging/asserts through Kconfig everywhere in the driver. Signed-off-by: Imre Deak Signed-off-by: Kirill A. Shutemov --- drivers/staging/mrst/Kconfig | 32 ++++++++++++++++------ drivers/staging/mrst/medfield/Makefile | 5 ++-- drivers/staging/mrst/pvr/include4/pvr_debug.h | 2 +- .../services4/srvkm/bridged/bridged_pvr_bridge.c | 2 -- 4 files changed, 27 insertions(+), 14 deletions(-) diff --git a/drivers/staging/mrst/Kconfig b/drivers/staging/mrst/Kconfig index 8758ae8..2c73555 100644 --- a/drivers/staging/mrst/Kconfig +++ b/drivers/staging/mrst/Kconfig @@ -16,25 +16,39 @@ config DRM_INTEL_MID help xxxxxxxxxxxxxxxxxxxxxxxxxx -choice - prompt "Build IMG kernel service as " +choice + prompt "PVR ABI version" depends on DRM_INTEL_MID - default DRM_MID_RELEASE + default PVR_ABI_RELEASE -config DRM_MID_RELEASE - bool "Release" +config PVR_ABI_RELEASE + bool "Release ABI" depends on DRM_INTEL_MID help - Build IMG kernel services as release + Select release mode for the IOCTL and firmware ABI. Note + that this will work only with the PVR user space libraries + built with the release mode ABI option too. -config DRM_MID_DEBUG - bool "Debug" + +config PVR_ABI_DEBUG + bool "Debug ABI" depends on DRM_INTEL_MID help - Build IMG kernel services as debug + Select debug mode for the IOCTL and firmware ABI. This will + enable extra debugging options with the help of the user space + libraries, like PDUMP (PDUMP needs to be enabled separately). + + Note that this will work only with the PVR user space libraries + built with the debug mode ABI option too. endchoice +config PVR_DEBUG + bool "PVR debug messages/asserts" + depends on DRM_INTEL_MID + help + Enable debug messages and asserts. + config DRM_MDFLD tristate "Intel Medfield" depends on DRM_INTEL_MID && PCI diff --git a/drivers/staging/mrst/medfield/Makefile b/drivers/staging/mrst/medfield/Makefile index cab6297..86de9b8 100644 --- a/drivers/staging/mrst/medfield/Makefile +++ b/drivers/staging/mrst/medfield/Makefile @@ -76,8 +76,9 @@ ccflags-$(PERPROC_LIST) += -DPERPROC_LIST ccflags-$(RES_MAN_EXTEND) += -DRES_MAN_EXTEND ccflags-$(PVRSRV_OS_MEM_INFO) += -DPVRSRV_OS_MEM_INFO -ccflags-$(CONFIG_DRM_MID_RELEASE) += -DBUILD="\"release\"" -DPVR_BUILD_TYPE="\"release\"" -DRELEASE -ccflags-$(CONFIG_DRM_MID_DEBUG) += -DBUILD="\"debug\"" -DPVR_BUILD_TYPE="\"debug\"" -DPVR_DEBUG_EXT -DDEBUG_LINUX_MEM_AREAS -DDEBUG_LINUX_MEMORY_ALLOCATIONS -DDEBUG_LINUX_MMAP_AREAS -DDEBUG_BRIDGE_KM +ccflags-$(CONFIG_PVR_ABI_RELEASE) += -DBUILD="\"release\"" -DPVR_BUILD_TYPE="\"release\"" -DRELEASE +ccflags-$(CONFIG_PVR_ABI_DEBUG) += -DBUILD="\"debug\"" -DPVR_BUILD_TYPE="\"debug\"" -DPVR_DEBUG_EXT -DDEBUG_LINUX_MEM_AREAS -DDEBUG_LINUX_MEMORY_ALLOCATIONS -DDEBUG_LINUX_MMAP_AREAS -DDEBUG_BRIDGE_KM +ccflags-$(CONFIG_PVR_DEBUG) += -DDEBUG ccflags-$(CONFIG_PCI_MSI) += -DCONFIG_PCI_MSI PVRDIR = ../pvr diff --git a/drivers/staging/mrst/pvr/include4/pvr_debug.h b/drivers/staging/mrst/pvr/include4/pvr_debug.h index 07cdcb4..2768f5c 100644 --- a/drivers/staging/mrst/pvr/include4/pvr_debug.h +++ b/drivers/staging/mrst/pvr/include4/pvr_debug.h @@ -60,7 +60,7 @@ extern "C" { #define PVR_DBGDRIV_MESSAGE DBGPRIV_DBGDRV_MESSAGE, "", 0 -#if !defined(PVRSRV_NEED_PVR_ASSERT) && defined(PVR_DEBUG_EXT) +#if !defined(PVRSRV_NEED_PVR_ASSERT) && defined(DEBUG) #define PVRSRV_NEED_PVR_ASSERT #endif diff --git a/drivers/staging/mrst/pvr/services4/srvkm/bridged/bridged_pvr_bridge.c b/drivers/staging/mrst/pvr/services4/srvkm/bridged/bridged_pvr_bridge.c index 50a437f..176e651 100644 --- a/drivers/staging/mrst/pvr/services4/srvkm/bridged/bridged_pvr_bridge.c +++ b/drivers/staging/mrst/pvr/services4/srvkm/bridged/bridged_pvr_bridge.c @@ -25,8 +25,6 @@ ******************************************************************************/ -#define DEBUG - #include #include "img_defs.h" -- 2.7.4