How to generate original test pattern ? I configured DS90UB964 by i2c style through Jetson TX2. I want get the original test pattern of DS90UB964. This may be the first step.
$ sudo i2cdump -f -y 2 0x30
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 60 00 1e 30 c2 01 00 fe 1c 10 79 79 0f 09 00 ff .?0??.???yy??.. 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 02 ..............?? 20: f0 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ??.............. 30: 00 00 01 01 00 00 00 00 00 00 00 00 00 00 00 00 ..??............ 40: 00 a3 01 01 00 00 00 00 00 00 00 00 00 00 02 00 .???..........?. 50: 00 00 00 00 00 00 00 00 18 00 00 00 00 00 00 00 ........?....... 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 7f 88 88 .............??? 70: 2b 2c e4 00 00 00 00 c5 00 01 00 00 20 00 00 00 +,?....?.?.. ... 80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ b0: 00 0f 0a 08 25 00 18 00 8f 03 03 74 80 00 00 00 .???%.?.???t?... c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ d0: 00 43 84 0f 60 f8 00 00 00 00 00 00 00 00 00 00 .C??
?..
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 …
f0: 5f 55 42 39 36 34 00 00 00 00 00 00 00 00 00 00 _UB964…
hello 1056574145,
please consult with your DS90UB964 vendor to get the register settings, and you should have implementation to enable test-pattern-generator.
thanks
hello Jerry,
the test-pattern-generator is TX2 TPG ? or DS90UB964 TPG ? did i need install TPG kernel module?
$ sudo insmod /lib/modules/4.4.38-tegra/kernel/drivers/media/platform/tegra/tpg/nvhost-vi-tpg.ko
thanks
hello 1056574145,
if you insert the nvhost-vi-tpg.ko kernel module, then you’ll enable the TX2’s test-pattern-generator.
suppose you would like to enable the TPG on DS90UB964 for checking, please contact with your vendor to enable that from DS90UB964’s driver side.
thanks
hello Jerry,
I insmod likely to be successful, no error. but it doesn’t create /dev/videoX
$ sudo insmod ds90ub96x_dev.ko
$ sudo insmod ds90ub96x_drv.ko
$ sudo sh ds90ub964_test.sh
$ cat /proc/modules
ds90ub96x_drv 2441 0 - Live 0x0000000000000000 (O)
ds90ub96x_dev 1857 0 - Live 0x0000000000000000 (O)
$ lsmod
Module Size Used by
ds90ub96x_drv 2441 0
ds90ub96x_dev 1857 0
where can I get the file of nvhost-vi-tpg.c
thanks
ds90ub96x_dev.c
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/i2c.h>
#include <linux/err.h>
#include <linux/regmap.h>
#include <linux/slab.h>
static sturct i2c_client *ds90ub96x_client;
static const unsigned short add_list[] = { 0x30, I2C_CLIENT_END };
static int ds90ub96x_dev_init(void)
{
struct i2c_adapter *i2c_adap;
struct i2c_board_info ds90ub96x_info;
memset(&ds90ub96_info, 0, sizeof(struct i2c_board_info));
strlcpy(ds90ub96_info.type, "ds90ub96x", I2C_NAME_SIZE);
i2c_adap = i2c_get_adapter(2);
ds90ub96x_client = i2c_new_probed_device(i2c_adap, &ds90ub96x_info,addr_list, NULL);
i2c_put_adapter(i2c_adap);
if (ds90ub96x_client)
return 0;
else
return -ENODEV;
}
static void ds90ub96x_dev_exit(void)
{
i2c_unregister_device(ds90ub96x_client);
}
module_init(ds90ub96x_dev_init);
module_exit(ds90ub96x_dev_exit);
MODULE_LICENSE("GPL");
ds90ub96x_drv.c
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/i2c.h>
#include <linux/err.h>
#include <linux/regmap.h>
#include <linux/slab.h>
static const struct i2c_device_id ds90ub96x_id_table[] = {
{ "ds90ub96x_id", 0x30 },
{}
};
MODULE_DEVICE_TABLE(i2c,ds90ub96x_id_table);
static int ds90ub96x_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
printk("%s %s %d\n", __FILE__, __FUNCTION__, __LINE__);
return 0;
}
static int ds90ub96x_remove(struct i2c_client *client)
{
printk("%s %s %d\n", __FILE__, __FUNCTION__, __LINE__);
return 0;
}
static struct i2c_device ds90ub96x_driver = {
.driver = {
.name = "ds90ub96x",
.owner = THIS_MODULE,
},
.probe = ds90ub96x_probe,
.remove = ds90ub96x_remove,
.id_table = ds90ub96x_id_table,
};
static int __init ds90ub96x_drv_init(void)
{
return i2c_add_driver(&ds90ub96x_driver);
}
module_init(ds90ub96x_drv_init);
static viod __exit ds90ub96x_drv_exit(void)
{
i2c_del_driver(&ds90ub96x_driver);
}
module_exit(ds90ub96x_drv_exit);
MODULE_LICENSE("GPL");
Hello! What image does nvhost-vi-tpg.ko generate?
hello lyubimov-maxim,
you may initial another new discussion thread instead of reply this one-year-old thread for asking questions.
as you may know, the roughly camera pipeline shows as… Sensor -> NvCSI -> VI
it’s Test-Pattern-Generator, which will produce color bars and sending the signals to VI engine.
it’s used to narrow down the issue, which usually helps during sensor bring-up.
thanks