summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/sti/bdisp/bdisp-debug.c
AgeCommit message (Collapse)AuthorFilesLines
2022-03-18media: platform: place stm32/ and sti/ under st/ dirMauro Carvalho Chehab1-658/+0
As the end goal is to have platform drivers split by vendor, move both stm32/ and sti/ for them to be inside st/ directory. Acked-by: Hugues Fruchet <hugues.fruchet@st.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2021-04-09media: platform: sti: Fix runtime PM imbalance in regs_showDinghao Liu1-1/+1
pm_runtime_get_sync() will increase the runtime PM counter even it returns an error. Thus a pairing decrement is needed to prevent refcount leak. Fix this by replacing this API with pm_runtime_resume_and_get(), which will not change the runtime PM counter on error. Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-09-01media: sti: no need to check return value of debugfs_create functionsGreg Kroah-Hartman1-23/+6
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-01-21media: platform: sti: remove bdisp_dbg_declare() and hva_dbg_declare()Yangtao Li1-23/+11
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>
2017-12-13media: platform: sti: Adopt SPDX identifierBenjamin Gaignard1-1/+1
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-06-24media: bdisp-debug: Replace a seq_puts() call by seq_putc() in seven functionsMarkus Elfring1-7/+7
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-02-03[media] media: platform: sti: return -ENOMEM on errorsPan Bian1-1/+1
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>
2015-07-17[media] bdisp: add debug info for RGB24 formatFabien Dessenne1-0/+8
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-06-11[media] bdisp-debug: don't try to divide by s64Mauro Carvalho Chehab1-11/+22
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-09[media] bdisp: add debug file systemFabien Dessenne1-0/+668
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>