summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra
diff options
context:
space:
mode:
authorArthur Spence <aspence@nvidia.com>2010-05-20 13:25:29 -0700
committerGary King <gking@nvidia.com>2010-05-25 10:44:01 -0700
commit16624522eb677d10c3846f25283f95530a7d5017 (patch)
treee4dfd0d5c2fd6e8a9d0607119fed07647f08ee4e /arch/arm/mach-tegra
parent5d5cbf7c3abb9220a3583eade382e4361950a648 (diff)
tegra framebuffer - dsi one shot support
DSI one shot support requires register access in the tegra framebuffer to poke the frame trigger bit (with both the trigger bit and the tearing effect signal are high, a frame of pixels will be sent to the panel). The boot args must also be expanded to have a "use tearing effect" flag. Change-Id: Id0c3960cac5b59dd23fd6547f1b7dae4d422ac32 Reviewed-on: http://git-master/r/1460 Reviewed-by: Gary King <gking@nvidia.com> Tested-by: Arthur Spence <aspence@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra')
-rw-r--r--arch/arm/mach-tegra/include/nvbootargs.h16
-rw-r--r--arch/arm/mach-tegra/nvos/nvos.c16
2 files changed, 25 insertions, 7 deletions
diff --git a/arch/arm/mach-tegra/include/nvbootargs.h b/arch/arm/mach-tegra/include/nvbootargs.h
index 908c26f0ea52..2e11843a9a68 100644
--- a/arch/arm/mach-tegra/include/nvbootargs.h
+++ b/arch/arm/mach-tegra/include/nvbootargs.h
@@ -94,6 +94,7 @@ typedef struct NvBootArgsCarveoutRec
*/
typedef struct NvBootArgsWarmbootRec
{
+ /* The key used for accessing the preserved memory handle */
NvU32 MemHandleKey;
} NvBootArgsWarmboot;
@@ -112,7 +113,6 @@ typedef struct NvBootArgsPreservedMemHandleRec
NvU32 Size;
} NvBootArgsPreservedMemHandle;
-
/**
* Display boot args, indexed by NvBootArgKey_Display.
*
@@ -162,6 +162,16 @@ typedef struct NvBootArgsFramebufferRec
* assumed to begin at Pitch * Height bytes from the
* previous surface. */
NvU8 NumSurfaces;
+ /* Flags for future expandability.
+ * Current allowable flags are:
+ * zero - default
+ * NV_BOOT_ARGS_FB_FLAG_TEARING_EFFECT - use a tearing effect signal in
+ * combination with a trigger from the display software to generate
+ * a frame of pixels for the display device.
+ */
+ NvU32 Flags;
+#define NVBOOTARG_FB_FLAG_TEARING_EFFECT (0x1)
+
} NvBootArgsFramebuffer;
/**
@@ -210,8 +220,8 @@ typedef struct NvBootArgsChipShmooPhysRec
NvU32 Size;
} NvBootArgsChipShmooPhys;
-#define NVBOOTARG_NUM_PRESERVED_HANDLES (NvBootArgKey_PreservedMemHandle_Num - \
- NvBootArgKey_PreservedMemHandle_0)
+#define NVBOOTARG_NUM_PRESERVED_HANDLES \
+ (NvBootArgKey_PreservedMemHandle_Num - NvBootArgKey_PreservedMemHandle_0)
/**
* OS-agnostic bootarg structure.
diff --git a/arch/arm/mach-tegra/nvos/nvos.c b/arch/arm/mach-tegra/nvos/nvos.c
index 9b4329b97dc4..4de8cd4be33f 100644
--- a/arch/arm/mach-tegra/nvos/nvos.c
+++ b/arch/arm/mach-tegra/nvos/nvos.c
@@ -1445,8 +1445,7 @@ NvError NvOsBootArgGet(NvU32 key, void *arg, NvU32 size)
}
else
{
- switch (key)
- {
+ switch (key) {
case NvBootArgKey_ChipShmoo:
src = &s_BootArgs.ChipShmooArgs;
size_src = sizeof(NvBootArgsChipShmoo);
@@ -1478,10 +1477,19 @@ NvError NvOsBootArgGet(NvU32 key, void *arg, NvU32 size)
}
}
- if (!arg || !src || (size_src!=size))
+ if( !arg || !src )
+ {
return NvError_BadParameter;
+ }
- NvOsMemcpy(arg, src, size_src);
+ /* don't copy too much if the size has changed (gotten bigger in new
+ * binaries.
+ */
+ NvOsMemcpy(arg, src, NV_MIN( size, size_src) );
+ if( size > size_src )
+ {
+ NvOsMemset( (NvU8 *)src + size_src, 0, size - size_src );
+ }
return NvSuccess;
}