Loading src/drivers/elphel/pgm_functions.c +4 −1 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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) Loading src/drivers/elphel/x393_videomem.c +9 −6 Original line number Diff line number Diff line Loading @@ -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) */ Loading Loading @@ -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; Loading Loading @@ -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: Loading @@ -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 Loading Loading
src/drivers/elphel/pgm_functions.c +4 −1 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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) Loading
src/drivers/elphel/x393_videomem.c +9 −6 Original line number Diff line number Diff line Loading @@ -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) */ Loading Loading @@ -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; Loading Loading @@ -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: Loading @@ -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 Loading