Commit b844e2fa authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

fixed lengths of sysmem

parent 674c9ee0
......@@ -1971,6 +1971,8 @@ int pgm_memsensor (int sensor_port, ///< sensor port number (
break;
}
width_bursts = (width_marg >> 4) + ((width_marg & 0xf) ? 1 : 0);
/** shorter version: */
//width_bursts = (width_marg+0xf)>>4;
setup_sensor_memory (sensor_port, // sensor port number (0..3)
width_bursts, // 13-bit - in 8*16=128 bit bursts
height_marg, // 16-bit window height (in scan lines)
......
......@@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************/
//#define DEBUG
#define DEBUG
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/of_device.h>
......@@ -835,6 +835,8 @@ static int videomem_open(struct inode *inode, struct file *filp)
break;
}
width_bursts = (width_marg >> 4) + ((width_marg & 0xf) ? 1 : 0);
/** shorter version: */
//width_bursts = (width_marg+0xf)>>4;
//int setup_sensor_memory (int num_sensor, ///< sensor port number (0..3)
// int window_width, ///< 13-bit - in 8*16=128 bit bursts
......@@ -882,8 +884,8 @@ static int videomem_open(struct inode *inode, struct file *filp)
(privData->phys_addr)>>3,
(privData->buf_size)>>3,
0, // start offset?
(width_marg*height_marg)>>3,
(width_marg)>>3
(width_bursts<<1)*height_marg,
(width_bursts<<1)
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment