gpu: pvr: fix init script handling for pdump/non-pdump
authorLuc Verhaegen <libv@codethink.co.uk>
Tue, 5 Apr 2011 12:41:25 +0000 (14:41 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 20 May 2012 18:43:05 +0000 (21:43 +0300)
commitf2713aa461aaccf15652d1131f185b95a1b63021
treeac1e06a53d60ac280a9c6c619685120a4c11a720
parenta1622e474a629f6e982c74e3bbf16c1c38b38bc0
gpu: pvr: fix init script handling for pdump/non-pdump

A PDUMP enabled build has SGX_INIT_OP_HALT shift one up in the enum, as its
former position is replaced with SGX_INIT_OP_PDUMP_HW_REG. When kernel and
userspace are out of sync, this leads to rather interesting results since
the init script is run _before_ userspace build options are compared with the
kernel build options.

By moving SGX_INIT_OP_PDUMP_HW_REG, and not masking it behind #ifdef PDUMP,
we get around this issue for good, without in anyway altering the behavior
of a current non-pdump build.

Some extra checking of the init script is now also included to catch and warn
about all possible cases of kernel and userspace being out of sync, with
respect to pdump support (and the new difference in OP_PDUMP_HW_REG). This
way, even if we do not make it to the build option checking, we still know
what went wrong.

This patch requires matching userspace, but only when pdump is enabled.

Signed-off-by: Luc Verhaegen <libv@codethink.co.uk>
Signed-off-by: Imre Deak <imre.deak@nokia.com>
pvr/sgxinit.c
pvr/sgxscript.h