media: venus: add debugfs support
Subsystems (4)
PATCH v2 1/1 media: venus: add debugfs support
Enable logs in venus through debugfs to print
debug information.
--- drivers/media/platform/qcom/venus/core.c | 62 ++++++++- drivers/media/platform/qcom/venus/core.h | 32 +++++ drivers/media/platform/qcom/venus/firmware.c | 6 +- drivers/media/platform/qcom/venus/helpers.c | 51 +++++-- drivers/media/platform/qcom/venus/hfi.c | 93 ++++++++++--- drivers/media/platform/qcom/venus/hfi_cmds.c | 33 +++-- drivers/media/platform/qcom/venus/hfi_msgs.c | 5 + drivers/media/platform/qcom/venus/vdec.c | 185 +++++++++++++++++++------ drivers/media/platform/qcom/venus/vdec_ctrls.c | 7 +- drivers/media/platform/qcom/venus/venc.c | 139 +++++++++++++++---- drivers/media/platform/qcom/venus/venc_ctrls.c | 9 +- 11 files changed, 512 insertions(+), 110 deletions(-)
drivers/media/platform/qcom/venus/core.c +59 -3
@@ -13,6 +13,7 @@* */ #include <linux/clk.h> +#include <linux/debugfs.h> #include <linux/init.h> #include <linux/ioctl.h> #include <linux/list.h>
@@ -31,6 +32,50 @@#include "venc.h" #include "firmware.h" +struct dentry *debugfs_root; +int venus_debug =ERR ; +EXPORT_SYMBOL_GPL (venus_debug); + +static struct dentry *venus_debugfs_init_drv (void ) +{ +bool ok = false; +struct dentry *dir =NULL ; + + dir =debugfs_create_dir ("venus" ,NULL ); +if (IS_ERR_OR_NULL (dir)) { + dir =NULL ; +pr_err ("failed to create debug dir" ); + goto failed_create_dir; + } + +#define __debugfs_create (__type, __fname, __value) ({ \ + struct dentry *f = debugfs_create_##__type(__fname, 0644, \ + dir, __value); \ + if (IS_ERR_OR_NULL(f)) { \ + dprintk(ERR, "Failed creating debugfs file '%pd/%s'\n", \ + dir, __fname); \ + f = NULL; \ + } \ + f; \ +}) + + ok = +__debugfs_create (x32,"debug_level" , &venus_debug); + +#undef __debugfs_create + +if (!ok) + goto failed_create_dir; + +return dir; + +failed_create_dir: +if (dir) +debugfs_remove_recursive (debugfs_root); + +return NULL ; +} +static void venus_event_notify (struct venus_core *core,u32 event) {struct venus_inst *inst;
@@ -137,6 +182,7 @@ static int venus_clks_enable(struct venus_core *core)return 0 ; err: +dprintk (ERR ,"Failed to enable clk:%d\n" , i);while (i--)clk_disable_unprepare (core->clks[i]);
@@ -236,6 +282,8 @@ static int venus_probe(struct platform_device *pdev)struct resource *r;int ret; + debugfs_root =venus_debugfs_init_drv (); + core =devm_kzalloc (dev,sizeof (*core),GFP_KERNEL );if (!core)return -ENOMEM ;
@@ -245,8 +293,10 @@ static int venus_probe(struct platform_device *pdev) r =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); core->base =devm_ioremap_resource (dev, r); -if (IS_ERR (core->base)) +if (IS_ERR (core->base)) { +dprintk (ERR ,"Failed to ioremap platform resources" );return PTR_ERR (core->base); + } core->irq =platform_get_irq (pdev,0 );if (core->irq <0 )
@@ -297,8 +347,10 @@ static int venus_probe(struct platform_device *pdev) goto err_runtime_disable; ret =venus_firmware_init (core); -if (ret) +if (ret) { +dprintk (ERR ,"Failed to init video firmware\n" ); goto err_runtime_disable; + } ret =venus_boot (core);if (ret)
@@ -321,8 +373,10 @@ static int venus_probe(struct platform_device *pdev) goto err_venus_shutdown; ret =v4l2_device_register (dev, &core->v4l2_dev); -if (ret) +if (ret) { +dprintk (ERR ,"Failed to register v4l2 device\n" ); goto err_core_deinit; + } ret =pm_runtime_put_sync (dev);if (ret)
@@ -366,6 +420,8 @@ static int venus_remove(struct platform_device *pdev)v4l2_device_unregister (&core->v4l2_dev); +debugfs_remove_recursive (debugfs_root); +return ret; }
drivers/media/platform/qcom/venus/core.h +32 -0
@@ -25,6 +25,38 @@#define VIDC_CLKS_NUM_MAX 4 +extern int venus_debug; +enum venus_msg_prio { +ERR =0x0001 , +WARN =0x0002 , +INFO =0x0004 , +DBG =0x0008 , +}; + +static inline char *get_debug_level_str (int level) +{ +switch (level) { +case ERR : +return "err" ; +case WARN : +return "warn" ; +case INFO : +return "info" ; +case DBG : +return "dbg" ; +default : +return "???" ; + } +} + +#define dprintk(dbg_lvl, fmt, arg...) \ + do { \ + if (venus_debug & dbg_lvl) \ + pr_info("venus:" fmt, \ + get_debug_level_str(dbg_lvl), \ + ## arg); \ + } while (0) +struct freq_tbl {unsigned int load;unsigned long freq;
drivers/media/platform/qcom/venus/firmware.c +4 -2
@@ -142,7 +142,8 @@ static int venus_boot_no_tz(struct venus_core *core, phys_addr_t mem_phys,dev_err (dev,"could not map video firmware region\n" );return ret; } - +dprintk (DBG ,"%s: Successfully mapped and performed test translation\n" , +dev_name (dev));venus_reset_cpu (core);return 0 ;
@@ -258,7 +259,8 @@ int venus_firmware_init(struct venus_core *core)dev_err (core->fw.dev,"could not attach device\n" ); goto err_iommu_free; } - +dprintk (DBG ,"Attached and created mapping for %s\n" , +dev_name (core->fw.dev)); core->fw.iommu_domain = iommu_dom;of_node_put (np);
drivers/media/platform/qcom/venus/helpers.c +42 -9
143 lines not on this page · raw message
drivers/media/platform/qcom/venus/hfi.c +76 -17
214 lines not on this page · raw message
drivers/media/platform/qcom/venus/hfi_cmds.c +25 -8
@@ -16,6 +16,7 @@#include <linux/hash.h> #include "hfi_cmds.h" +#include "core.h" static enum hfi_version hfi_ver;
@@ -161,8 +162,10 @@ void pkt_sys_image_version(struct hfi_sys_get_property_pkt *pkt)int pkt_session_init (struct hfi_session_init_pkt *pkt,void *cookie,u32 session_type,u32 codec) { -if (!pkt || !cookie || !codec) +if (!pkt || !cookie || !codec) { +dprintk (ERR ,"%s invalid parameters\n" , __func__);return -EINVAL ; + } pkt->shdr.hdr.size =sizeof (*pkt); pkt->shdr.hdr.pkt_type =HFI_CMD_SYS_SESSION_INIT ;
@@ -185,8 +188,10 @@ int pkt_session_set_buffers(struct hfi_session_set_buffers_pkt *pkt, {unsigned int i; -if (!cookie || !pkt || !bd) +if (!cookie || !pkt || !bd) { +dprintk (ERR ,"%s - invalid params\n" , __func__);return -EINVAL ; + } pkt->shdr.hdr.pkt_type =HFI_CMD_SESSION_SET_BUFFERS ; pkt->shdr.session_id =hash32_ptr (cookie);
@@ -215,7 +220,8 @@ int pkt_session_set_buffers(struct hfi_session_set_buffers_pkt *pkt, } pkt->buffer_type = bd->buffer_type; - +dprintk (DBG ,"buftype:%d buffer addr: %x\n" , + pkt->buffer_type, bd->device_addr);return 0 ; }
@@ -263,9 +269,11 @@ int pkt_session_unset_buffers(struct hfi_session_release_buffer_pkt *pkt,int pkt_session_etb_decoder (struct hfi_session_empty_buffer_compressed_pkt *pkt,void *cookie,struct hfi_frame_data *in_frame) { -if (!cookie || !in_frame->device_addr) +if (!cookie || !in_frame->device_addr) { +dprintk (ERR ,"%s: invalid params addr: %#x\n" , + __func__, in_frame->device_addr);return -EINVAL ; - + } pkt->shdr.hdr.size =sizeof (*pkt); pkt->shdr.hdr.pkt_type =HFI_CMD_SESSION_EMPTY_BUFFER ; pkt->shdr.session_id =hash32_ptr (cookie);
@@ -287,8 +295,11 @@ int pkt_session_etb_encoder(struct hfi_session_empty_buffer_uncompressed_plane0_pkt *pkt, void *cookie, struct hfi_frame_data *in_frame) { - if (!cookie || !in_frame->device_addr) + if (!cookie || !in_frame->device_addr) { + dprintk(ERR, "%s: invalid params addr: %#x\n", + __func__, in_frame->device_addr);return -EINVAL ; + } pkt->shdr.hdr.size =sizeof (*pkt); pkt->shdr.hdr.pkt_type =HFI_CMD_SESSION_EMPTY_BUFFER ;
@@ -312,8 +323,11 @@ int pkt_session_etb_encoder(int pkt_session_ftb (struct hfi_session_fill_buffer_pkt *pkt,void *cookie,struct hfi_frame_data *out_frame) { -if (!cookie || !out_frame || !out_frame->device_addr) +if (!cookie || !out_frame || !out_frame->device_addr) { +dprintk (ERR ,"%s: invalid params addr: %#x\n" , + __func__, out_frame->device_addr);return -EINVAL ; + } pkt->shdr.hdr.size =sizeof (*pkt); pkt->shdr.hdr.pkt_type =HFI_CMD_SESSION_FILL_BUFFER ;
@@ -339,8 +353,11 @@ int pkt_session_parse_seq_header( struct hfi_session_parse_sequence_header_pkt *pkt, void *cookie, u32 seq_hdr, u32 seq_hdr_len) { - if (!cookie || !seq_hdr || !seq_hdr_len) + if (!cookie || !seq_hdr || !seq_hdr_len) { + dprintk(ERR, "%s: invalid params hdr: %d, hdr_len:%d\n", + __func__, seq_hdr, seq_hdr_len);return -EINVAL ; + } pkt->shdr.hdr.size =sizeof (*pkt); pkt->shdr.hdr.pkt_type =HFI_CMD_SESSION_PARSE_SEQUENCE_HEADER ;
drivers/media/platform/qcom/venus/hfi_msgs.c +5 -0
@@ -238,9 +238,14 @@ static void hfi_sys_init_done(struct venus_core *core, struct venus_inst *inst, } error =hfi_parser (core, inst, pkt->data, rem_bytes); +dprintk (DBG , +"supported_codecs[%d]: enc = %#x, dec = %#x\n" , + core->codecs_count, core->enc_codecs, + core->dec_codecs); done: core->error = error; +dprintk (INFO ,"sys init ret: %d" , core->error);complete (&core->done); }
drivers/media/platform/qcom/venus/vdec.c +145 -40
406 lines not on this page · raw message
drivers/media/platform/qcom/venus/vdec_ctrls.c +6 -1
@@ -91,8 +91,11 @@ int vdec_ctrl_init(struct venus_inst *inst)int ret; ret =v4l2_ctrl_handler_init (&inst->ctrl_handler,7 ); -if (ret) +if (ret) { +dprintk (ERR ,"CTRL ERR: Control handler init failed, %d\n" , + inst->ctrl_handler.error);return ret; + } ctrl = v4l2_ctrl_new_std_menu(&inst->ctrl_handler, &vdec_ctrl_ops, V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE,
@@ -147,6 +150,8 @@ int vdec_ctrl_init(struct venus_inst *inst) ret = inst->ctrl_handler.error;if (ret) { +dprintk (ERR ,"Error adding ctrl to ctrl handle, %d\n" , + inst->ctrl_handler.error);v4l2_ctrl_handler_free (&inst->ctrl_handler);return ret; }
drivers/media/platform/qcom/venus/venc.c +111 -28
300 lines not on this page · raw message
drivers/media/platform/qcom/venus/venc_ctrls.c +7 -2
@@ -203,6 +203,7 @@ static int venc_op_s_ctrl(struct v4l2_ctrl *ctrl)mutex_unlock (&inst->lock);break ;default : +dprintk (ERR ,"Unsupported ctrl: %x\n" , ctrl->id);return -EINVAL ; }
@@ -218,9 +219,11 @@ int venc_ctrl_init(struct venus_inst *inst)int ret; ret =v4l2_ctrl_handler_init (&inst->ctrl_handler,28 ); -if (ret) +if (ret) { +dprintk (ERR ,"CTRL ERR: Control handler init failed, %d\n" , + inst->ctrl_handler.error);return ret; - + } v4l2_ctrl_new_std_menu(&inst->ctrl_handler, &venc_ctrl_ops, V4L2_CID_MPEG_VIDEO_BITRATE_MODE, V4L2_MPEG_VIDEO_BITRATE_MODE_CBR,
@@ -351,6 +354,8 @@ int venc_ctrl_init(struct venus_inst *inst)return 0 ; err: +dprintk (ERR ,"Error adding ctrl to ctrl handle, %d\n" , + inst->ctrl_handler.error);v4l2_ctrl_handler_free (&inst->ctrl_handler);return ret; }
Signature · 1 line
1.9.1
kbuild test robot
build botThank you for the patch! Perhaps something to improve:
Hi Malathi,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linuxtv-media/master]
[also build test WARNING on next-20181224]
[cannot apply to v4.20]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Malathi-Gottam/media-venus-add-debugfs-support/20181228-172634 base: git://linuxtv.org/media_tree.git master config: i386-allmodconfig (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=i386
All warnings (new ones prefixed by >>):
In file included from include/linux/printk.h:7:0,
from include/linux/kernel.h:14,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/core.c:15:
drivers/media/platform/qcom/venus/core.c: In function 'venus_debugfs_init_drv':
>> include/linux/kern_levels.h:5:18: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'struct dentry *' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:315:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
drivers/media/platform/qcom/venus/core.h:55:4: note: in expansion of macro 'pr_info'
pr_info("venus:" fmt, \
^~~~~~~
drivers/media/platform/qcom/venus/core.c:55:3: note: in expansion of macro 'dprintk'
dprintk(ERR, "Failed creating debugfs file '%pd/%s'\n", \
^~~~~~~
drivers/media/platform/qcom/venus/core.c:63:2: note: in expansion of macro '__debugfs_create'
__debugfs_create(x32, "debug_level", &venus_debug);
^~~~~~~~~~~~~~~~
drivers/media/platform/qcom/venus/core.c:55:52: note: format string is defined here
dprintk(ERR, "Failed creating debugfs file '%pd/%s'\n", \
~^
In file included from include/linux/printk.h:7:0,
from include/linux/kernel.h:14,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/core.c:15:
include/linux/kern_levels.h:5:18: warning: too many arguments for format [-Wformat-extra-args]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:315:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
drivers/media/platform/qcom/venus/core.h:55:4: note: in expansion of macro 'pr_info'
pr_info("venus:" fmt, \
^~~~~~~
drivers/media/platform/qcom/venus/core.c:55:3: note: in expansion of macro 'dprintk'
dprintk(ERR, "Failed creating debugfs file '%pd/%s'\n", \
^~~~~~~
drivers/media/platform/qcom/venus/core.c:63:2: note: in expansion of macro '__debugfs_create'
__debugfs_create(x32, "debug_level", &venus_debug);
^~~~~~~~~~~~~~~~
drivers/media/platform/qcom/venus/core.c: In function 'venus_clks_enable':
include/linux/kern_levels.h:5:18: warning: format '%d' expects argument of type 'int', but argument 2 has type 'char *' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:315:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
drivers/media/platform/qcom/venus/core.h:55:4: note: in expansion of macro 'pr_info'
pr_info("venus:" fmt, \
^~~~~~~
drivers/media/platform/qcom/venus/core.c:185:2: note: in expansion of macro 'dprintk'
dprintk(ERR, "Failed to enable clk:%d\n", i);
^~~~~~~
drivers/media/platform/qcom/venus/core.c:185:38: note: format string is defined here
dprintk(ERR, "Failed to enable clk:%d\n", i);
~^
%s
In file included from include/linux/printk.h:7:0,
from include/linux/kernel.h:14,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/core.c:15:
include/linux/kern_levels.h:5:18: warning: too many arguments for format [-Wformat-extra-args]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:315:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
drivers/media/platform/qcom/venus/core.h:55:4: note: in expansion of macro 'pr_info'
pr_info("venus:" fmt, \
^~~~~~~
drivers/media/platform/qcom/venus/core.c:185:2: note: in expansion of macro 'dprintk'
dprintk(ERR, "Failed to enable clk:%d\n", i);
^~~~~~~
drivers/media/platform/qcom/venus/core.c: In function 'venus_probe':
include/linux/kern_levels.h:5:18: warning: too many arguments for format [-Wformat-extra-args]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:315:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
drivers/media/platform/qcom/venus/core.h:55:4: note: in expansion of macro 'pr_info'
pr_info("venus:" fmt, \
^~~~~~~
drivers/media/platform/qcom/venus/core.c:297:3: note: in expansion of macro 'dprintk'
dprintk(ERR, "Failed to ioremap platform resources");
^~~~~~~
include/linux/kern_levels.h:5:18: warning: too many arguments for format [-Wformat-extra-args]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^vim +5 include/linux/kern_levels.h
314ba352 Joe Perches 2012-07-30 404d2c8c8 Joe Perches 2012-07-30 @5 #define KERN_SOH "\001" /* ASCII Start Of Header */04d2c8c8 Joe Perches 2012-07-30 6 #define KERN_SOH_ASCII '\001'04d2c8c8 Joe Perches 2012-07-30 7
:::::: The code at line 5 was first introduced by commit
:::::: 04d2c8c83d0e3ac5f78aeede51babb3236200112 printk: convert the format for KERN_<LEVEL> to a 2 byte pattern
:::::: TO: Joe Perches <[email protected]>
:::::: CC: Linus Torvalds <[email protected]>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
kbuild test robot
build botThank you for the patch! Yet something to improve:
Hi Malathi,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on next-20181224]
[cannot apply to v4.20]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Malathi-Gottam/media-venus-add-debugfs-support/20181228-172634 base: git://linuxtv.org/media_tree.git master config: microblaze-allyesconfig (attached as .config) compiler: microblaze-linux-gcc (GCC) 8.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.1.0 make.cross ARCH=microblaze
All errors (new ones prefixed by >>):
In file included from include/linux/kernel.h:14,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/helpers.c:15:
drivers/media/platform/qcom/venus/helpers.c: In function 'venus_helper_check_codec':
>> drivers/media/platform/qcom/venus/helpers.c:78:40: error: 'pixfmt' undeclared (first use in this function); did you mean 'pr_fmt'?
dprintk(WARN, "Unknown format:%x\n", pixfmt);
^~~~~~
include/linux/printk.h:315:34: note: in definition of macro 'pr_info'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
drivers/media/platform/qcom/venus/helpers.c:78:3: note: in expansion of macro 'dprintk'
dprintk(WARN, "Unknown format:%x\n", pixfmt);
^~~~~~~
drivers/media/platform/qcom/venus/helpers.c:78:40: note: each undeclared identifier is reported only once for each function it appears in
dprintk(WARN, "Unknown format:%x\n", pixfmt);
^~~~~~
include/linux/printk.h:315:34: note: in definition of macro 'pr_info'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
drivers/media/platform/qcom/venus/helpers.c:78:3: note: in expansion of macro 'dprintk'
dprintk(WARN, "Unknown format:%x\n", pixfmt);
^~~~~~~
In file included from include/linux/printk.h:7,
from include/linux/kernel.h:14,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/helpers.c:15:
drivers/media/platform/qcom/venus/helpers.c: In function 'venus_helper_queue_dpb_bufs':
include/linux/kern_levels.h:5:18: warning: format '%d' expects argument of type 'int', but argument 3 has type 'const char *' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^~~~~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:315:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
drivers/media/platform/qcom/venus/core.h:55:4: note: in expansion of macro 'pr_info'
pr_info("venus:" fmt, \
^~~~~~~
drivers/media/platform/qcom/venus/helpers.c:107:4: note: in expansion of macro 'dprintk'
dprintk(ERR, "%s: Failed to queue dpb buf to hfi: %d\n",
^~~~~~~
drivers/media/platform/qcom/venus/helpers.c:107:55: note: format string is defined here
dprintk(ERR, "%s: Failed to queue dpb buf to hfi: %d\n",
~^
%s
In file included from include/linux/printk.h:7,
from include/linux/kernel.h:14,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/helpers.c:15:
include/linux/kern_levels.h:5:18: warning: too many arguments for format [-Wformat-extra-args]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^~~~~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:315:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
drivers/media/platform/qcom/venus/core.h:55:4: note: in expansion of macro 'pr_info'
pr_info("venus:" fmt, \
^~~~~~~
drivers/media/platform/qcom/venus/helpers.c:107:4: note: in expansion of macro 'dprintk'
dprintk(ERR, "%s: Failed to queue dpb buf to hfi: %d\n",
^~~~~~~
drivers/media/platform/qcom/venus/helpers.c: In function 'venus_helper_alloc_dpb_bufs':
include/linux/kern_levels.h:5:18: warning: format '%d' expects argument of type 'int', but argument 2 has type 'char *' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^~~~~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:315:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
drivers/media/platform/qcom/venus/core.h:55:4: note: in expansion of macro 'pr_info'
pr_info("venus:" fmt, \
^~~~~~~
drivers/media/platform/qcom/venus/helpers.c:164:2: note: in expansion of macro 'dprintk'
dprintk(DBG, "buf count min %d", count);
^~~~~~~
drivers/media/platform/qcom/venus/helpers.c:164:31: note: format string is defined here
dprintk(DBG, "buf count min %d", count);
~^
%s
In file included from include/linux/printk.h:7,
from include/linux/kernel.h:14,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/helpers.c:15:
include/linux/kern_levels.h:5:18: warning: too many arguments for format [-Wformat-extra-args]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^~~~~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:315:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
drivers/media/platform/qcom/venus/core.h:55:4: note: in expansion of macro 'pr_info'
pr_info("venus:" fmt, \
^~~~~~~
drivers/media/platform/qcom/venus/helpers.c:164:2: note: in expansion of macro 'dprintk'
dprintk(DBG, "buf count min %d", count);
^~~~~~~
include/linux/kern_levels.h:5:18: warning: too many arguments for format [-Wformat-extra-args]
--
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
drivers/media/platform/qcom/venus/core.h:55:4: note: in expansion of macro 'pr_info'
pr_info("venus:" fmt, \
^~~~~~~
drivers/media/platform/qcom/venus/helpers.c:756:3: note: in expansion of macro 'dprintk'
dprintk(ERR,
^~~~~~~
include/linux/kern_levels.h:5:18: warning: format '%d' expects argument of type 'int', but argument 2 has type 'char *' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^~~~~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:315:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
drivers/media/platform/qcom/venus/core.h:55:4: note: in expansion of macro 'pr_info'
pr_info("venus:" fmt, \
^~~~~~~
drivers/media/platform/qcom/venus/helpers.c:766:3: note: in expansion of macro 'dprintk'
dprintk(ERR,
^~~~~~~
drivers/media/platform/qcom/venus/helpers.c:767:40: note: format string is defined here
"Failed to set actual buffer count %d for buffer type %d\n",
~^
%s
In file included from include/linux/printk.h:7,
from include/linux/kernel.h:14,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/helpers.c:15:
include/linux/kern_levels.h:5:18: warning: too many arguments for format [-Wformat-extra-args]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^~~~~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:315:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
drivers/media/platform/qcom/venus/core.h:55:4: note: in expansion of macro 'pr_info'
pr_info("venus:" fmt, \
^~~~~~~
drivers/media/platform/qcom/venus/helpers.c:766:3: note: in expansion of macro 'dprintk'
dprintk(ERR,
^~~~~~~
include/linux/kern_levels.h:5:18: warning: format '%d' expects argument of type 'int', but argument 2 has type 'char *' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^~~~~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:315:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
drivers/media/platform/qcom/venus/core.h:55:4: note: in expansion of macro 'pr_info'
pr_info("venus:" fmt, \
^~~~~~~
drivers/media/platform/qcom/venus/helpers.c:771:2: note: in expansion of macro 'dprintk'
dprintk(DBG, "output buf: num = %d, input buf = %d\n",
^~~~~~~
drivers/media/platform/qcom/venus/helpers.c:771:35: note: format string is defined here
dprintk(DBG, "output buf: num = %d, input buf = %d\n",
~^
%s
In file included from include/linux/printk.h:7,
from include/linux/kernel.h:14,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/helpers.c:15:
include/linux/kern_levels.h:5:18: warning: too many arguments for format [-Wformat-extra-args]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^~~~~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:315:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
drivers/media/platform/qcom/venus/core.h:55:4: note: in expansion of macro 'pr_info'
pr_info("venus:" fmt, \
^~~~~~~
drivers/media/platform/qcom/venus/helpers.c:771:2: note: in expansion of macro 'dprintk'
dprintk(DBG, "output buf: num = %d, input buf = %d\n",
^~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:7,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/helpers.c:15:
include/linux/export.h:79:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
extern typeof(sym) sym; \
^~~~~~
include/linux/export.h:120:25: note: in expansion of macro '___EXPORT_SYMBOL'
#define __EXPORT_SYMBOL ___EXPORT_SYMBOL
^~~~~~~~~~~~~~~~
include/linux/export.h:127:2: note: in expansion of macro '__EXPORT_SYMBOL'
__EXPORT_SYMBOL(sym, "_gpl")
^~~~~~~~~~~~~~~
drivers/media/platform/qcom/venus/helpers.c:782:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(venus_helper_set_num_bufs);
^~~~~~~~~~~~~~~~~
>> drivers/media/platform/qcom/venus/helpers.c:795:19: error: non-static declaration of 'venus_helper_set_raw_format' follows static declaration
EXPORT_SYMBOL_GPL(venus_helper_set_raw_format);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:79:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
drivers/media/platform/qcom/venus/helpers.c:795:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(venus_helper_set_raw_format);
^~~~~~~~~~~~~~~~~
drivers/media/platform/qcom/venus/helpers.c:784:5: note: previous definition of 'venus_helper_set_raw_format' was here
int venus_helper_set_raw_format(struct venus_inst *inst, u32 hfi_format,
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/printk.h:7,
from include/linux/kernel.h:14,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/helpers.c:15:
drivers/media/platform/qcom/venus/helpers.c: In function 'venus_helper_set_color_format':
include/linux/kern_levels.h:5:18: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'char *' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^~~~~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:315:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
drivers/media/platform/qcom/venus/core.h:55:4: note: in expansion of macro 'pr_info'
pr_info("venus:" fmt, \
^~~~~~~
drivers/media/platform/qcom/venus/helpers.c:810:3: note: in expansion of macro 'dprintk'
dprintk(ERR, "Using unsupported colorformat %#x\n",
^~~~~~~
drivers/media/platform/qcom/venus/helpers.c:810:49: note: format string is defined here
dprintk(ERR, "Using unsupported colorformat %#x\n",
~~^
%#s
In file included from include/linux/printk.h:7,
from include/linux/kernel.h:14,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/helpers.c:15:
include/linux/kern_levels.h:5:18: warning: too many arguments for format [-Wformat-extra-args]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^~~~~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:315:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
drivers/media/platform/qcom/venus/core.h:55:4: note: in expansion of macro 'pr_info'
pr_info("venus:" fmt, \
^~~~~~~
drivers/media/platform/qcom/venus/helpers.c:810:3: note: in expansion of macro 'dprintk'
dprintk(ERR, "Using unsupported colorformat %#x\n",
^~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:7,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/helpers.c:15:
drivers/media/platform/qcom/venus/helpers.c: In function 'venus_helper_set_num_bufs':
>> drivers/media/platform/qcom/venus/helpers.c:817:19: error: non-static declaration of 'venus_helper_set_color_format' follows static declaration
EXPORT_SYMBOL_GPL(venus_helper_set_color_format);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:79:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
drivers/media/platform/qcom/venus/helpers.c:817:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(venus_helper_set_color_format);
^~~~~~~~~~~~~~~~~
drivers/media/platform/qcom/venus/helpers.c:797:5: note: previous definition of 'venus_helper_set_color_format' was here
int venus_helper_set_color_format(struct venus_inst *inst, u32 pixfmt)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:7,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/helpers.c:15:
drivers/media/platform/qcom/venus/helpers.c:838:19: error: non-static declaration of 'venus_helper_set_multistream' follows static declaration
EXPORT_SYMBOL_GPL(venus_helper_set_multistream);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:79:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
drivers/media/platform/qcom/venus/helpers.c:838:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(venus_helper_set_multistream);
^~~~~~~~~~~~~~~~~
drivers/media/platform/qcom/venus/helpers.c:819:5: note: previous definition of 'venus_helper_set_multistream' was here
int venus_helper_set_multistream(struct venus_inst *inst, bool out_en,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:7,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/helpers.c:15:
drivers/media/platform/qcom/venus/helpers.c:860:19: error: non-static declaration of 'venus_helper_set_dyn_bufmode' follows static declaration
EXPORT_SYMBOL_GPL(venus_helper_set_dyn_bufmode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:79:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
drivers/media/platform/qcom/venus/helpers.c:860:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(venus_helper_set_dyn_bufmode);
^~~~~~~~~~~~~~~~~
drivers/media/platform/qcom/venus/helpers.c:840:5: note: previous definition of 'venus_helper_set_dyn_bufmode' was here
int venus_helper_set_dyn_bufmode(struct venus_inst *inst)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:7,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/helpers.c:15:
>> drivers/media/platform/qcom/venus/helpers.c:872:19: error: non-static declaration of 'venus_helper_set_bufsize' follows static declaration
EXPORT_SYMBOL_GPL(venus_helper_set_bufsize);
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:79:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
drivers/media/platform/qcom/venus/helpers.c:872:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(venus_helper_set_bufsize);
^~~~~~~~~~~~~~~~~
drivers/media/platform/qcom/venus/helpers.c:862:5: note: previous definition of 'venus_helper_set_bufsize' was here
int venus_helper_set_bufsize(struct venus_inst *inst, u32 bufsize, u32 buftype)
^~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:7,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/helpers.c:15:
>> drivers/media/platform/qcom/venus/helpers.c:887:19: error: non-static declaration of 'venus_helper_get_opb_size' follows static declaration
EXPORT_SYMBOL_GPL(venus_helper_get_opb_size);
^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:79:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
drivers/media/platform/qcom/venus/helpers.c:887:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(venus_helper_get_opb_size);
^~~~~~~~~~~~~~~~~
drivers/media/platform/qcom/venus/helpers.c:874:14: note: previous definition of 'venus_helper_get_opb_size' was here
unsigned int venus_helper_get_opb_size(struct venus_inst *inst)
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/qcom/venus/helpers.c:889:13: error: invalid storage class for function 'delayed_process_buf_func'
static void delayed_process_buf_func(struct work_struct *work)
^~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:7,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/helpers.c:15:
drivers/media/platform/qcom/venus/helpers.c:928:19: error: non-static declaration of 'venus_helper_release_buf_ref' follows static declaration
EXPORT_SYMBOL_GPL(venus_helper_release_buf_ref);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:79:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
drivers/media/platform/qcom/venus/helpers.c:928:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(venus_helper_release_buf_ref);
^~~~~~~~~~~~~~~~~
drivers/media/platform/qcom/venus/helpers.c:916:6: note: previous definition of 'venus_helper_release_buf_ref' was here
void venus_helper_release_buf_ref(struct venus_inst *inst, unsigned int idx)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:7,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/helpers.c:15:
drivers/media/platform/qcom/venus/helpers.c:936:19: error: non-static declaration of 'venus_helper_acquire_buf_ref' follows static declaration
EXPORT_SYMBOL_GPL(venus_helper_acquire_buf_ref);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:79:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
drivers/media/platform/qcom/venus/helpers.c:936:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(venus_helper_acquire_buf_ref);
^~~~~~~~~~~~~~~~~
drivers/media/platform/qcom/venus/helpers.c:930:6: note: previous definition of 'venus_helper_acquire_buf_ref' was here
void venus_helper_acquire_buf_ref(struct vb2_v4l2_buffer *vbuf)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/qcom/venus/helpers.c:938:12: error: invalid storage class for function 'is_buf_refed'
static int is_buf_refed(struct venus_inst *inst, struct vb2_v4l2_buffer *vbuf)
^~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:7,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/helpers.c:15:
>> drivers/media/platform/qcom/venus/helpers.c:961:19: error: non-static declaration of 'venus_helper_find_buf' follows static declaration
EXPORT_SYMBOL_GPL(venus_helper_find_buf);
^~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:79:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
drivers/media/platform/qcom/venus/helpers.c:961:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(venus_helper_find_buf);
^~~~~~~~~~~~~~~~~
drivers/media/platform/qcom/venus/helpers.c:952:1: note: previous definition of 'venus_helper_find_buf' was here
venus_helper_find_buf(struct venus_inst *inst, unsigned int type, u32 idx)
^~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:7,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/helpers.c:15:
drivers/media/platform/qcom/venus/helpers.c:982:19: error: non-static declaration of 'venus_helper_vb2_buf_init' follows static declaration
EXPORT_SYMBOL_GPL(venus_helper_vb2_buf_init);
^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:79:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
drivers/media/platform/qcom/venus/helpers.c:982:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(venus_helper_vb2_buf_init);
^~~~~~~~~~~~~~~~~
drivers/media/platform/qcom/venus/helpers.c:963:5: note: previous definition of 'venus_helper_vb2_buf_init' was here
int venus_helper_vb2_buf_init(struct vb2_buffer *vb)
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:7,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/helpers.c:15:
>> drivers/media/platform/qcom/venus/helpers.c:998:19: error: non-static declaration of 'venus_helper_vb2_buf_prepare' follows static declaration
EXPORT_SYMBOL_GPL(venus_helper_vb2_buf_prepare);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:79:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
drivers/media/platform/qcom/venus/helpers.c:998:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(venus_helper_vb2_buf_prepare);
^~~~~~~~~~~~~~~~~
drivers/media/platform/qcom/venus/helpers.c:984:5: note: previous definition of 'venus_helper_vb2_buf_prepare' was here
int venus_helper_vb2_buf_prepare(struct vb2_buffer *vb)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:7,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/helpers.c:15:
drivers/media/platform/qcom/venus/helpers.c:1025:19: error: non-static declaration of 'venus_helper_vb2_buf_queue' follows static declaration
EXPORT_SYMBOL_GPL(venus_helper_vb2_buf_queue);
^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:79:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
drivers/media/platform/qcom/venus/helpers.c:1025:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(venus_helper_vb2_buf_queue);
^~~~~~~~~~~~~~~~~
drivers/media/platform/qcom/venus/helpers.c:1000:6: note: previous definition of 'venus_helper_vb2_buf_queue' was here
void venus_helper_vb2_buf_queue(struct vb2_buffer *vb)
^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:7,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/helpers.c:15:
>> drivers/media/platform/qcom/venus/helpers.c:1037:19: error: non-static declaration of 'venus_helper_buffers_done' follows static declaration
EXPORT_SYMBOL_GPL(venus_helper_buffers_done);
^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:79:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
drivers/media/platform/qcom/venus/helpers.c:1037:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(venus_helper_buffers_done);
^~~~~~~~~~~~~~~~~
drivers/media/platform/qcom/venus/helpers.c:1027:6: note: previous definition of 'venus_helper_buffers_done' was here
void venus_helper_buffers_done(struct venus_inst *inst,
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:7,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/helpers.c:15:
drivers/media/platform/qcom/venus/helpers.c:1075:19: error: non-static declaration of 'venus_helper_vb2_stop_streaming' follows static declaration
EXPORT_SYMBOL_GPL(venus_helper_vb2_stop_streaming);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:79:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
drivers/media/platform/qcom/venus/helpers.c:1075:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(venus_helper_vb2_stop_streaming);
^~~~~~~~~~~~~~~~~
drivers/media/platform/qcom/venus/helpers.c:1039:6: note: previous definition of 'venus_helper_vb2_stop_streaming' was here
void venus_helper_vb2_stop_streaming(struct vb2_queue *q)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:7,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/helpers.c:15:
>> drivers/media/platform/qcom/venus/helpers.c:1116:19: error: non-static declaration of 'venus_helper_vb2_start_streaming' follows static declaration
EXPORT_SYMBOL_GPL(venus_helper_vb2_start_streaming);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:79:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
drivers/media/platform/qcom/venus/helpers.c:1116:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(venus_helper_vb2_start_streaming);
^~~~~~~~~~~~~~~~~
drivers/media/platform/qcom/venus/helpers.c:1077:5: note: previous definition of 'venus_helper_vb2_start_streaming' was here
int venus_helper_vb2_start_streaming(struct venus_inst *inst)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:7,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/helpers.c:15:
>> drivers/media/platform/qcom/venus/helpers.c:1141:19: error: non-static declaration of 'venus_helper_m2m_device_run' follows static declaration
EXPORT_SYMBOL_GPL(venus_helper_m2m_device_run);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:79:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
drivers/media/platform/qcom/venus/helpers.c:1141:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(venus_helper_m2m_device_run);
^~~~~~~~~~~~~~~~~
drivers/media/platform/qcom/venus/helpers.c:1118:6: note: previous definition of 'venus_helper_m2m_device_run' was here
void venus_helper_m2m_device_run(void *priv)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:7,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/helpers.c:15:
>> drivers/media/platform/qcom/venus/helpers.c:1149:19: error: non-static declaration of 'venus_helper_m2m_job_abort' follows static declaration
EXPORT_SYMBOL_GPL(venus_helper_m2m_job_abort);
^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:79:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
drivers/media/platform/qcom/venus/helpers.c:1149:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(venus_helper_m2m_job_abort);
^~~~~~~~~~~~~~~~~
drivers/media/platform/qcom/venus/helpers.c:1143:6: note: previous definition of 'venus_helper_m2m_job_abort' was here
void venus_helper_m2m_job_abort(void *priv)
^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:7,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/helpers.c:15:
drivers/media/platform/qcom/venus/helpers.c:1159:19: error: non-static declaration of 'venus_helper_init_instance' follows static declaration
EXPORT_SYMBOL_GPL(venus_helper_init_instance);
^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:79:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
drivers/media/platform/qcom/venus/helpers.c:1159:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(venus_helper_init_instance);
^~~~~~~~~~~~~~~~~
drivers/media/platform/qcom/venus/helpers.c:1151:6: note: previous definition of 'venus_helper_init_instance' was here
void venus_helper_init_instance(struct venus_inst *inst)
^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/qcom/venus/helpers.c:1161:13: error: invalid storage class for function 'find_fmt_from_caps'
static bool find_fmt_from_caps(struct venus_caps *caps, u32 buftype, u32 fmt)
^~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:7,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/helpers.c:15:
>> drivers/media/platform/qcom/venus/helpers.c:1220:19: error: non-static declaration of 'venus_helper_get_out_fmts' follows static declaration
EXPORT_SYMBOL_GPL(venus_helper_get_out_fmts);
^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:79:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
drivers/media/platform/qcom/venus/helpers.c:1220:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(venus_helper_get_out_fmts);
^~~~~~~~~~~~~~~~~
drivers/media/platform/qcom/venus/helpers.c:1174:5: note: previous definition of 'venus_helper_get_out_fmts' was here
int venus_helper_get_out_fmts(struct venus_inst *inst, u32 v4l2_fmt,
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:7,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/helpers.c:15:
>> drivers/media/platform/qcom/venus/helpers.c:1269:19: error: non-static declaration of 'venus_helper_power_enable' follows static declaration
EXPORT_SYMBOL_GPL(venus_helper_power_enable);
^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:79:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
drivers/media/platform/qcom/venus/helpers.c:1269:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(venus_helper_power_enable);
^~~~~~~~~~~~~~~~~
drivers/media/platform/qcom/venus/helpers.c:1222:5: note: previous definition of 'venus_helper_power_enable' was here
int venus_helper_power_enable(struct venus_core *core, u32 session_type,
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:7,
from include/linux/clk.h:16,
from drivers/media/platform/qcom/venus/helpers.c:15:
>> include/linux/export.h:67:22: error: expected declaration or statement at end of input
static const struct kernel_symbol __ksymtab_##sym \
^~~~~~~~~~~~~
include/linux/export.h:84:2: note: in expansion of macro '__KSYMTAB_ENTRY'
__KSYMTAB_ENTRY(sym, sec)
^~~~~~~~~~~~~~~
include/linux/export.h:120:25: note: in expansion of macro '___EXPORT_SYMBOL'
#define __EXPORT_SYMBOL ___EXPORT_SYMBOL
^~~~~~~~~~~~~~~~
include/linux/export.h:127:2: note: in expansion of macro '__EXPORT_SYMBOL'
__EXPORT_SYMBOL(sym, "_gpl")
^~~~~~~~~~~~~~~
drivers/media/platform/qcom/venus/helpers.c:1269:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(venus_helper_power_enable);
^~~~~~~~~~~~~~~~~
include/linux/export.h:67:22: warning: control reaches end of non-void function [-Wreturn-type]
static const struct kernel_symbol __ksymtab_##sym \
^~~~~~~~~~~~~
include/linux/export.h:84:2: note: in expansion of macro '__KSYMTAB_ENTRY'
__KSYMTAB_ENTRY(sym, sec)
^~~~~~~~~~~~~~~
include/linux/export.h:120:25: note: in expansion of macro '___EXPORT_SYMBOL'
#define __EXPORT_SYMBOL ___EXPORT_SYMBOL
^~~~~~~~~~~~~~~~
include/linux/export.h:127:2: note: in expansion of macro '__EXPORT_SYMBOL'
__EXPORT_SYMBOL(sym, "_gpl")
^~~~~~~~~~~~~~~
drivers/media/platform/qcom/venus/helpers.c:1269:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(venus_helper_power_enable);
^~~~~~~~~~~~~~~~~..
vim +78 drivers/media/platform/qcom/venus/helpers.c
> 15 #include <linux/clk.h>
16 #include <linux/iopoll.h>
17 #include <linux/list.h>
18 #include <linux/mutex.h>
19 #include <linux/pm_runtime.h>
20 #include <linux/slab.h>
21 #include <media/videobuf2-dma-sg.h>
22 #include <media/v4l2-mem2mem.h>
23 #include <asm/div64.h>
24
25 #include "core.h"
26 #include "helpers.h"
27 #include "hfi_helper.h"
28 #include "hfi_venus_io.h"
29
30 struct intbuf {
31 struct list_head list;
32 u32 type;
33 size_t size;
34 void *va;
35 dma_addr_t da;
36 unsigned long attrs;
37 };
38
39 bool venus_helper_check_codec(struct venus_inst *inst, u32 v4l2_pixfmt)
40 {
41 struct venus_core *core = inst->core;
42 u32 session_type = inst->session_type;
43 u32 codec;
44
45 switch (v4l2_pixfmt) {
46 case V4L2_PIX_FMT_H264:
47 codec = HFI_VIDEO_CODEC_H264;
48 break;
49 case V4L2_PIX_FMT_H263:
50 codec = HFI_VIDEO_CODEC_H263;
51 break;
52 case V4L2_PIX_FMT_MPEG1:
53 codec = HFI_VIDEO_CODEC_MPEG1;
54 break;
55 case V4L2_PIX_FMT_MPEG2:
56 codec = HFI_VIDEO_CODEC_MPEG2;
57 break;
58 case V4L2_PIX_FMT_MPEG4:
59 codec = HFI_VIDEO_CODEC_MPEG4;
60 break;
61 case V4L2_PIX_FMT_VC1_ANNEX_G:
62 case V4L2_PIX_FMT_VC1_ANNEX_L:
63 codec = HFI_VIDEO_CODEC_VC1;
64 break;
65 case V4L2_PIX_FMT_VP8:
66 codec = HFI_VIDEO_CODEC_VP8;
67 break;
68 case V4L2_PIX_FMT_VP9:
69 codec = HFI_VIDEO_CODEC_VP9;
70 break;
71 case V4L2_PIX_FMT_XVID:
72 codec = HFI_VIDEO_CODEC_DIVX;
73 break;
74 case V4L2_PIX_FMT_HEVC:
75 codec = HFI_VIDEO_CODEC_HEVC;
76 break;
77 default:
> 78 dprintk(WARN, "Unknown format:%x\n", pixfmt);
79 return false;
80 }
81
82 if (session_type == VIDC_SESSION_TYPE_ENC && core->enc_codecs & codec)
83 return true;
84
85 if (session_type == VIDC_SESSION_TYPE_DEC && core->dec_codecs & codec)
86 return true;
87
88 return false;
89 }
90 EXPORT_SYMBOL_GPL(venus_helper_check_codec);
91 ---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation