History log of /linux/drivers/media/test-drivers/vidtv/vidtv_psi.c (Results 1 – 25 of 34)
Revision Date Author Comments
# 76a2c5df 19-Jun-2023 Jiasheng Jiang <jiasheng@iscas.ac.cn>

media: vidtv: psi: Add check for kstrdup

Add check for the return value of kstrdup() and return the error
if it fails in order to avoid NULL pointer dereference.

Fixes: 7a7899f6f58e ("media: vidtv:

media: vidtv: psi: Add check for kstrdup

Add check for the return value of kstrdup() and return the error
if it fails in order to avoid NULL pointer dereference.

Fixes: 7a7899f6f58e ("media: vidtv: psi: Implement an Event Information Table (EIT)")
Fixes: c2f78f0cb294 ("media: vidtv: psi: add a Network Information Table (NIT)")
Fixes: f90cf6079bf6 ("media: vidtv: add a bridge driver")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

show more ...


# 3ef57509 05-Jan-2023 Colin Ian King <colin.i.king@gmail.com>

media: vidtv: make const array DURATION static

Don't populate the read-only const array DURATION on the stack but
instead make it static. Also makes the object code a little smaller.

Signed-off-by:

media: vidtv: make const array DURATION static

Don't populate the read-only const array DURATION on the stack but
instead make it static. Also makes the object code a little smaller.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>

show more ...


# 9dd2444f 10-Dec-2021 Minghao Chi <chi.minghao@zte.com.cn>

media: vidtv: remove unneeded variable make code cleaner

return value form directly instead of
taking this in another redundant variable.

Link: https://lore.kernel.org/linux-media/20211210024721.42

media: vidtv: remove unneeded variable make code cleaner

return value form directly instead of
taking this in another redundant variable.

Link: https://lore.kernel.org/linux-media/20211210024721.425145-1-chi.minghao@zte.com.cn
Reported-by: Zeal Robot <zealci@zte.com.cm>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

show more ...


# 1b0b433f 06-Mar-2021 Zhang Yunkai <zhang.yunkai@zte.com.cn>

media: vidtv: remove duplicate include in vidtv_psi

'string.h' included in 'vidtv_psi.c' is duplicated.

Signed-off-by: Zhang Yunkai <zhang.yunkai@zte.com.cn>
Acked-by: Daniel Almeida <dwlsalmeida@g

media: vidtv: remove duplicate include in vidtv_psi

'string.h' included in 'vidtv_psi.c' is duplicated.

Signed-off-by: Zhang Yunkai <zhang.yunkai@zte.com.cn>
Acked-by: Daniel Almeida <dwlsalmeida@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

show more ...


# 8d23ada8 29-Dec-2020 Tian Tao <tiantao6@hisilicon.com>

media: vidtv: Use kmemdup instead of kzalloc and memcpy

Fixes coccicheck warning:
drivers/media/test-drivers/vidtv/vidtv_psi.c:509:10-17: WARNING
opportunity for kmemdup

Signed-off-by: Tian Tao <ti

media: vidtv: Use kmemdup instead of kzalloc and memcpy

Fixes coccicheck warning:
drivers/media/test-drivers/vidtv/vidtv_psi.c:509:10-17: WARNING
opportunity for kmemdup

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

show more ...


# 0a933a7f 24-Dec-2020 Daniel W. S. Almeida <dwlsalmeida@gmail.com>

media: vidtv: psi: fix missing crc for PMT

The PMT write function was refactored and this broke the CRC computation.

Fix it.

Fixes: db9569f67e2e ("media: vidtv: cleanup PMT write table function")

media: vidtv: psi: fix missing crc for PMT

The PMT write function was refactored and this broke the CRC computation.

Fix it.

Fixes: db9569f67e2e ("media: vidtv: cleanup PMT write table function")
Signed-off-by: Daniel W. S. Almeida <dwlsalmeida@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

show more ...


# b0879828 24-Nov-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: vidtv: simplify EIT write function

- pass struct vidtv_psi_eit_write_args as a pointer;
- avoid initializing struct fields multiple times.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawe

media: vidtv: simplify EIT write function

- pass struct vidtv_psi_eit_write_args as a pointer;
- avoid initializing struct fields multiple times.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

show more ...


# 5a5b9fb1 24-Nov-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: vidtv: simplify NIT write function

- pass struct vidtv_psi_nit_write_args as a pointer;
- avoid initializing struct fields multiple times.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawe

media: vidtv: simplify NIT write function

- pass struct vidtv_psi_nit_write_args as a pointer;
- avoid initializing struct fields multiple times.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

show more ...


# 6286a4b7 24-Nov-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: vidtv: simplify SDT write function

- pass struct vidtv_psi_sdt_write_args as a pointer;
- avoid initializing struct fields multiple times.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawe

media: vidtv: simplify SDT write function

- pass struct vidtv_psi_sdt_write_args as a pointer;
- avoid initializing struct fields multiple times.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

show more ...


# db9569f6 24-Nov-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: vidtv: cleanup PMT write table function

- Pass struct vidtv_psi_pmt_write_args as a pointer;
- Avoid initializing structs multiple times.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei

media: vidtv: cleanup PMT write table function

- Pass struct vidtv_psi_pmt_write_args as a pointer;
- Avoid initializing structs multiple times.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

show more ...


# 7f957515 24-Nov-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: vidtv: cleanup PAT write function

Avoid initializing the structs multiple times and pass the
PAT struct as a pointer, instead of a var.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@k

media: vidtv: cleanup PAT write function

Avoid initializing the structs multiple times and pass the
PAT struct as a pointer, instead of a var.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

show more ...


# c570fb9f 24-Nov-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: vidtv: cleanup PSI table header function

- Pass struct header_write_args as a pointer, instead of
passing as a var;

- Initialize the psi_args struct only once.

Signed-off-by: Mauro Carval

media: vidtv: cleanup PSI table header function

- Pass struct header_write_args as a pointer, instead of
passing as a var;

- Initialize the psi_args struct only once.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

show more ...


# 974ea176 24-Nov-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: vidtv: cleanup PSI descriptor write function

This function initializes the psi_args twice, and receives
a struct, instead of a pointer to a struct.

Clean it up.

Signed-off-by: Mauro Carvalh

media: vidtv: cleanup PSI descriptor write function

This function initializes the psi_args twice, and receives
a struct, instead of a pointer to a struct.

Clean it up.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

show more ...


# 9e006741 24-Nov-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: vidtv: simplify the crc writing logic

Cleanup the table_section_crc32_write_into() function
by initializing struct psi_write_args only once and by
passing the args as a pointer.

Signed-off-b

media: vidtv: simplify the crc writing logic

Cleanup the table_section_crc32_write_into() function
by initializing struct psi_write_args only once and by
passing the args as a pointer.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

show more ...


# 5edbd330 24-Nov-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: vidtv: simplify PSI write function

The function vidtv_psi_ts_psi_write_into() initializes the
ts_header fields several times, and receives a struct
as argument, instead of using a pointer to

media: vidtv: simplify PSI write function

The function vidtv_psi_ts_psi_write_into() initializes the
ts_header fields several times, and receives a struct
as argument, instead of using a pointer to struct.

Cleanup the function, in order to reduce its stack usage
and to avoid initializing the ts_header multiple times.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

show more ...


# 16002854 23-Nov-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: vidtv: add date to the current event

The current event is using an undefined date. Instead, it
should be the timestamp when the EIT table was generated.

Signed-off-by: Mauro Carvalho Chehab

media: vidtv: add date to the current event

The current event is using an undefined date. Instead, it
should be the timestamp when the EIT table was generated.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

show more ...


# bfa4aaeb 23-Nov-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: vidtv: fix service_id at SDT table

The service_id there should be equal to the one used
on other tables, otherwise, EIT entries won't be valid.

Signed-off-by: Mauro Carvalho Chehab <mchehab+

media: vidtv: fix service_id at SDT table

The service_id there should be equal to the one used
on other tables, otherwise, EIT entries won't be valid.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

show more ...


# 039b7cae 23-Nov-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: vidtv: add a PID entry for the NIT table

On normal TS streams, the NIT table has its own entry at PAT,
but not at PMT.

While here, properly handle alloc problems when creating
PMT entries.

media: vidtv: add a PID entry for the NIT table

On normal TS streams, the NIT table has its own entry at PAT,
but not at PMT.

While here, properly handle alloc problems when creating
PMT entries.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

show more ...


# 91a8a240 23-Nov-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: vidtv: properly fill EIT service_id

The EIT header ID field should not contain the network ID, but,
instead, the service_id of the program described at EIT.

Signed-off-by: Mauro Carvalho Che

media: vidtv: properly fill EIT service_id

The EIT header ID field should not contain the network ID, but,
instead, the service_id of the program described at EIT.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

show more ...


# 330d1356 20-Nov-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: vidtv: remove some unused functions

Right now, there's no need to access the length of some
tables. So, drop the unused functions.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel

media: vidtv: remove some unused functions

Right now, there's no need to access the length of some
tables. So, drop the unused functions.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

show more ...


# a8bd461c 22-Sep-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: vidtv: do some cleanups at the driver

Do some cleanups at the coding style of the driver:
- remove "inline" declarations;
- use reverse xmas-tree for local var declarations;
- Adjust some ind

media: vidtv: do some cleanups at the driver

Do some cleanups at the coding style of the driver:
- remove "inline" declarations;
- use reverse xmas-tree for local var declarations;
- Adjust some indent to avoid breaking 80-cols;
- Cleanup some comments.

No functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

show more ...


# 31e82355 17-Nov-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: vidtv: don't use recursive functions

The Linux stack is too short. So, using recursive functions
is a very bad idea. Convert those into non-recursive ones.

Signed-off-by: Mauro Carvalho Cheh

media: vidtv: don't use recursive functions

The Linux stack is too short. So, using recursive functions
is a very bad idea. Convert those into non-recursive ones.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

show more ...


# 3be80379 21-Sep-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: vidtv: add error checks

Currently, there are not checks if something gets bad during
memory allocation: it will simply use NULL pointers and
crash.

Add error path at the logic which allocate

media: vidtv: add error checks

Currently, there are not checks if something gets bad during
memory allocation: it will simply use NULL pointers and
crash.

Add error path at the logic which allocates memory for the
MPEG-TS generator code, propagating the errors up to the
vidtv_bridge. Now, if something wents bad, start_streaming
will return an error that userspace can detect:

ERROR DMX_SET_PES_FILTER failed (PID = 0x2000): 12 Cannot allocate memory

and the driver doesn't crash.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

show more ...


# 8922e393 21-Sep-2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

media: vidtv: reorganize includes

- Place the includes on alphabetical order;
- get rid of asm/byteorder.h;
- add bug.h at vidtv_s302m.c, as it is needed by
inux/fixp-arith.h

Signed-off-by: Mauro

media: vidtv: reorganize includes

- Place the includes on alphabetical order;
- get rid of asm/byteorder.h;
- add bug.h at vidtv_s302m.c, as it is needed by
inux/fixp-arith.h

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

show more ...


# c2b6ca66 31-Oct-2020 Daniel W. S. Almeida <dwlsalmeida@gmail.com>

media: vidtv: psi: fix missing assignments in while loops

Some variables were only assigned once but were used in while
loops as if they had been updated at every iteration. Fix this.

Signed-off-by

media: vidtv: psi: fix missing assignments in while loops

Some variables were only assigned once but were used in while
loops as if they had been updated at every iteration. Fix this.

Signed-off-by: Daniel W. S. Almeida <dwlsalmeida@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

show more ...


12