Skip to contentSkip to conversation

where is "struct constraint_id" defined?

DISCUSSION [email protected] 3 participants 3 messages Mar 5, 2009 – Mar 7, 2009

lore
Share & tools
lore
#0 lore raw

I am trying to build the OMAP3 graphics kernel module against 2.6.29-rc7-omap1 (from GIT), and have been running into problems getting it to build.

Two problems were pretty easy: the TI code was including "asm/resource.h" and "asm/semaphore.h" rather than "linux/resource.h" and "linux/semaphore.h".

Having made those changes, it builds all the way through to the TI supplied "sysutils_linux.c", which barfs with :

In file included from /space/src/OMAP35x_Graphics_SDC_3_00_00_06/GFX_Linux_KM/services4/srvkm/env/linux/kbuild/../../../../../services4/system/omap3430/sysutils.c:28:
/space/src/OMAP35x_Graphics_SDC_3_00_00_06/GFX_Linux_KM/services4/srvkm/env/linux/kbuild/../../../../../services4/system/omap3430/sysutils_linux.c:154:
error: variable 'cnstr_id_vdd2' has initializer but incomplete type

(and many other errors).

The problem line of the code is:

static struct constraint_id cnstr_id_vdd2 = {

and I cannot find a definition of "struct constraint_id" anywhere in the kernel.

Has this been renamed, or moved, or am I looking in the wrong place?

#1 lore raw

Hi David

Quoted 18 lines · On Thu, 5 Mar 2009, [email protected] wrote:

I am trying to build the OMAP3 graphics kernel module against 2.6.29-rc7-omap1 (from GIT), and have been running into problems getting it to build.

Two problems were pretty easy: the TI code was including "asm/resource.h" and "asm/semaphore.h" rather than "linux/resource.h" and "linux/semaphore.h".

Having made those changes, it builds all the way through to the TI supplied "sysutils_linux.c", which barfs with :

In file included from /space/src/OMAP35x_Graphics_SDC_3_00_00_06/GFX_Linux_KM/services4/srvkm/env/linux/kbuild/../../../../../services4/system/omap3430/sysutils.c:28:
/space/src/OMAP35x_Graphics_SDC_3_00_00_06/GFX_Linux_KM/services4/srvkm/env/linux/kbuild/../../../../../services4/system/omap3430/sysutils_linux.c:154:
error: variable 'cnstr_id_vdd2' has initializer but incomplete type

(and many other errors).

Quoted 8 lines

The problem line of the code is:

static struct constraint_id cnstr_id_vdd2 = {

and I cannot find a definition of "struct constraint_id" anywhere in the kernel.

Has this been renamed, or moved, or am I looking in the wrong place?

Haven't seen the code in question, but it sounds like it's trying to change OPP constraints on VDD2 (CORE), to allow SGX speed (and power consumption) to be reduced when it is not in use.

If you're not using the PM branch of l-o, you can probably just remove all the references to this from the driver. The SGX speed is fixed at whatever the bootloader configured.

If you're using the PM branch, you can constrain CORE OPPs directly from the driver via omap_pm_set_min_bus_tput(). Pass a function pointer to omap_pm_set_min_bus_tput() via the driver's platform_data structure, then call pdata->set_min_bus_tput() from the driver. The current SRF implementation of this uses r > 0 to mean "high speed, high power consumption" and r == 0 to mean "low speed, low power consumption". arch/arm/plat-omap/include/mach/omap-pm.h and Documentation/arm/OMAP/omap_pm may be useful.

- Paul

#2 lore raw
Quoted 23 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Paul Walmsley
Sent: Saturday, March 07, 2009 1:55 AM
To: [email protected]
Cc: [email protected]
Subject: Re: where is "struct constraint_id" defined?

Hi David

Quoted 2 lines · On Thu, 5 Mar 2009, [email protected] wrote:

I am trying to build the OMAP3 graphics kernel module against 2.6.29-rc7-omap1 (from GIT), and have been running into

problems getting

Quoted 3 lines

it to build.

Two problems were pretty easy: the TI code was including

"asm/resource.h"

Quoted 3 lines

and "asm/semaphore.h" rather than "linux/resource.h" and "linux/semaphore.h".

Quoted 6 lines
Quoted 5 lines

Having made those changes, it builds all the way through to the TI supplied "sysutils_linux.c", which barfs with :

In file included from

/space/src/OMAP35x_Graphics_SDC_3_00_00_06/GFX_Linux_KM/servic

es4/srvkm/env/linux/kbuild/../../../../../services4/system/omap3430/sysutils.c:28:

Quoted 2 lines
Quoted 1 line

/space/src/OMAP35x_Graphics_SDC_3_00_00_06/GFX_Linux_KM/servic

es4/srvkm/env/linux/kbuild/../../../../../services4/system/omap3430/sysutils_linux.c:154:

Quoted 13 lines
Quoted 9 lines

error: variable 'cnstr_id_vdd2' has initializer but incomplete type

(and many other errors).

The problem line of the code is:

static struct constraint_id cnstr_id_vdd2 = {

and I cannot find a definition of "struct constraint_id"

anywhere in the

Quoted 3 lines

kernel.

Has this been renamed, or moved, or am I looking in the wrong place?

That piece of code refers to the constraint f/w implementation which exists only in the TI internal tree.
As Paul suggested if you are using the mainline l-o remove all that code, else use the latest l-o pm branch with a different set of API's to achieve the same.

Quoted 32 lines

Haven't seen the code in question, but it sounds like it's trying to change OPP constraints on VDD2 (CORE), to allow SGX speed (and power consumption) to be reduced when it is not in use.

If you're not using the PM branch of l-o, you can probably just remove
all the references to this from the driver. The SGX speed is fixed at
whatever the bootloader configured.

If you're using the PM branch, you can constrain CORE OPPs directly from
the driver via omap_pm_set_min_bus_tput(). Pass a function pointer to
omap_pm_set_min_bus_tput() via the driver's platform_data structure, then
call pdata->set_min_bus_tput() from the driver. The current SRF implementation of this uses r > 0 to mean "high speed, high power consumption" and r == 0 to mean "low speed, low power consumption". arch/arm/plat-omap/include/mach/omap-pm.h and Documentation/arm/OMAP/omap_pm may be useful.

- Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html