Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-elphel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
linux-elphel
Commits
dc96fe17
Commit
dc96fe17
authored
Jan 12, 2018
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed image dimensions back
parent
4ab41772
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
pgm_functions.c
src/drivers/elphel/pgm_functions.c
+4
-1
x393_videomem.c
src/drivers/elphel/x393_videomem.c
+9
-6
No files found.
src/drivers/elphel/pgm_functions.c
View file @
dc96fe17
...
...
@@ -180,7 +180,7 @@
*/
// TODO:remove unneeded
//
#define DEBUG // should be before linux/module.h - enables dev_dbg at boot in this file (needs "debug" in bootarg)
#define DEBUG // should be before linux/module.h - enables dev_dbg at boot in this file (needs "debug" in bootarg)
#include <linux/types.h> // for div 64
#include <asm/div64.h> // for div 64
...
...
@@ -1971,6 +1971,9 @@ int pgm_memsensor (int sensor_port, ///< sensor port number (
break
;
}
width_bursts
=
(
width_marg
>>
4
)
+
((
width_marg
&
0xf
)
?
1
:
0
);
pr_debug
(
"PGM: width_marg=%d height_marg=%d width_burts=%d"
,
width_marg
,
height_marg
,
width_bursts
);
/** shorter version: */
//width_bursts = (width_marg+0xf)>>4;
setup_sensor_memory
(
sensor_port
,
// sensor port number (0..3)
...
...
src/drivers/elphel/x393_videomem.c
View file @
dc96fe17
...
...
@@ -85,6 +85,8 @@ static const int videomem_minor[]={
/** @brief Global device class for sysfs */
static
struct
class
*
videomem_dev_class
;
// About frame full width:
// https://blog.elphel.com/2015/05/nc393-development-progress-multichannel-memory-controller-for-the-multi-sensor-camera/#Memory_mapping_and_access_types
static
struct
elphel_video_buf_t
buffer_settings
=
{
///< some default settings, same as in DT
.
frame_start
=
{
0x00000000
,
0x08000000
,
0x10000000
,
0x08000000
},
/* Frame starts (in bytes) */
.
frame_full_width
=
{
8192
,
8192
,
8192
,
8192
},
/* Frame full widths (in bytes). 1 memory page is 2048 bytes (128 bursts) */
...
...
@@ -676,7 +678,7 @@ static inline int membridge_is_busy(void){
int
membridge_start
(
int
sensor_port
,
unsigned
long
target_frame
){
//
int p_color, p_pf_height;
int
p_color
,
p_pf_height
;
int
width_marg
,
height_marg
,
width_bursts
;
dma_addr_t
phys_addr
;
...
...
@@ -723,10 +725,9 @@ int membridge_start(int sensor_port, unsigned long target_frame){
width_marg
=
get_imageParamsThis
(
sensor_port
,
P_ACTUAL_WIDTH
);
height_marg
=
get_imageParamsThis
(
sensor_port
,
P_ACTUAL_HEIGHT
);
//
p_color = get_imageParamsThis(sensor_port,P_COLOR);
//
p_pf_height = get_imageParamsThis(sensor_port,P_PF_HEIGHT);
p_color
=
get_imageParamsThis
(
sensor_port
,
P_COLOR
);
p_pf_height
=
get_imageParamsThis
(
sensor_port
,
P_PF_HEIGHT
);
/*
switch
(
p_color
){
case
COLORMODE_COLOR
:
case
COLORMODE_COLOR20
:
...
...
@@ -736,9 +737,11 @@ int membridge_start(int sensor_port, unsigned long target_frame){
}
break
;
}
*/
width_bursts
=
(
width_marg
>>
4
)
+
((
width_marg
&
0xf
)
?
1
:
0
);
pr_debug
(
"VIDEOMEM: width_marg=%d height_marg=%d width_burts=%d"
,
width_marg
,
height_marg
,
width_bursts
);
setup_membridge_memory
(
sensor_port
,
///< sensor port number (0..3)
0
,
///< 0 - from fpga mem to system mem, 1 - otherwise
width_bursts
,
///< 13-bit - in 8*16=128 bit bursts
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment