Commit Graph

7 Commits

Author SHA1 Message Date
Yangtao Li 5e22c19f7e media: platform: sti: remove bdisp_dbg_declare() and hva_dbg_declare()
We already have the DEFINE_SHOW_ATTRIBUTE. There is no need to define
bdisp_dbg_declare and hva_dbg_declare, so remove them. Also use
DEFINE_SHOW_ATTRIBUTE to simplify some code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Reviewed-by: Fabien Dessenne <fabien.dessenne@st.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-01-21 15:41:17 -02:00
Benjamin Gaignard 9ed785a926 media: platform: sti: Adopt SPDX identifier
Add SPDX identifiers to files under sti directory

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Reviewed-by: Fabien Dessenne <fabien.dessenne@st.com>
Acked-by: Philippe Ombredanne <pombredanne@nexb.com>
Acked-by: Hugues Fruchet <hugues.fruchet@st.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-12-13 09:54:41 -05:00
Markus Elfring dbe127ecae media: bdisp-debug: Replace a seq_puts() call by seq_putc() in seven functions
Seven single characters (line breaks) should be put into a sequence.
Thus use the corresponding function "seq_putc".

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-24 09:34:08 -03:00
Pan Bian d54a90c4c1 [media] media: platform: sti: return -ENOMEM on errors
Function bdisp_debugfs_create() returns 0 even on errors. So its caller
cannot detect the errors. It may be better to return "-ENOMEM" on the
exception paths.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188801

Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-02-03 07:58:37 -02:00
Fabien Dessenne 24310279eb [media] bdisp: add debug info for RGB24 format
Add this missing debug information

Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-07-17 09:53:20 -03:00
Mauro Carvalho Chehab 82d229cde0 [media] bdisp-debug: don't try to divide by s64
There are several warnings there, on some architectures, related
to dividing a s32 by a s64 value:

drivers/media/platform/sti/bdisp/bdisp-debug.c:594: warning: comparison of distinct pointer types lacks a cast
drivers/media/platform/sti/bdisp/bdisp-debug.c:594: warning: right shift count >= width of type
drivers/media/platform/sti/bdisp/bdisp-debug.c:594: warning: passing argument 1 of '__div64_32' from incompatible pointer type
drivers/media/platform/sti/bdisp/bdisp-debug.c:595: warning: comparison of distinct pointer types lacks a cast
drivers/media/platform/sti/bdisp/bdisp-debug.c:595: warning: right shift count >= width of type
drivers/media/platform/sti/bdisp/bdisp-debug.c:595: warning: passing argument 1 of '__div64_32' from incompatible pointer type  CC [M]  drivers/media/tuners/mt2060.o
drivers/media/platform/sti/bdisp/bdisp-debug.c:596: warning: comparison of distinct pointer types lacks a cast
drivers/media/platform/sti/bdisp/bdisp-debug.c:596: warning: right shift count >= width of type
drivers/media/platform/sti/bdisp/bdisp-debug.c:596: warning: passing argument 1 of '__div64_32' from incompatible pointer type
drivers/media/platform/sti/bdisp/bdisp-debug.c:597: warning: comparison of distinct pointer types lacks a cast
drivers/media/platform/sti/bdisp/bdisp-debug.c:597: warning: right shift count >= width of type
drivers/media/platform/sti/bdisp/bdisp-debug.c:597: warning: passing argument 1 of '__div64_32' from incompatible pointer type

That doesn't make much sense. What the driver is actually trying
to do is to divide one second by a value. So, check the range
before dividing. That warrants the right result and will remove
the warnings on non-64 bits archs.

Also fixes this warning:
drivers/media/platform/sti/bdisp/bdisp-debug.c:588: warning: comparison of distinct pointer types lacks a cast

by using div64_s64() instead of calling do_div() directly.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-11 07:34:30 -03:00
Fabien Dessenne 34b6beb65b [media] bdisp: add debug file system
Creates 5 debugfs entries to dump the last HW request, the last HW node
(=command), the HW registers and the recent HW performance (time & fps)

Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-09 18:12:28 -03:00