Loading drivers/media/platform/msm/npu/npu_common.h +9 −2 Original line number Diff line number Diff line Loading @@ -55,6 +55,15 @@ enum npu_power_level { NPU_PWRLEVEL_OFF = 0xFFFFFFFF, }; #define NPU_ERR(fmt, args...) \ pr_err("NPU_ERR: %s: %d " fmt "\n", __func__, __LINE__, ##args) #define NPU_WARN(fmt, args...) \ pr_warn("NPU_WARN: %s: %d " fmt "\n", __func__, __LINE__, ##args) #define NPU_INFO(fmt, args...) \ pr_info("NPU_INFO: %s: %d " fmt "\n", __func__, __LINE__, ##args) #define NPU_DBG(fmt, args...) \ pr_debug("NPU_DBG: %s: %d " fmt "\n", __func__, __LINE__, ##args) /* ------------------------------------------------------------------------- * Data Structures * ------------------------------------------------------------------------- Loading Loading @@ -159,7 +168,6 @@ struct npu_pwrctrl { uint32_t num_pwrlevels; struct device *devbw; uint32_t bwmon_enabled; uint32_t uc_pwrlevel; uint32_t cdsprm_pwrlevel; uint32_t fmax_pwrlevel; Loading Loading @@ -206,7 +214,6 @@ struct npu_device { struct npu_io_data tcm_io; struct npu_io_data qdsp_io; struct npu_io_data apss_shared_io; struct npu_io_data bwmon_io; struct npu_io_data qfprom_io; uint32_t core_clk_num; Loading drivers/media/platform/msm/npu/npu_dbg.c +3 −5 Original line number Diff line number Diff line Loading @@ -3,8 +3,6 @@ * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt /* ------------------------------------------------------------------------- * Includes * ------------------------------------------------------------------------- Loading @@ -24,9 +22,9 @@ void npu_dump_debug_timeout_stats(struct npu_device *npu_dev) uint32_t reg_val; reg_val = REGR(npu_dev, REG_FW_JOB_CNT_START); pr_info("fw jobs execute started count = %d\n", reg_val); NPU_INFO("fw jobs execute started count = %d\n", reg_val); reg_val = REGR(npu_dev, REG_FW_JOB_CNT_END); pr_info("fw jobs execute finished count = %d\n", reg_val); NPU_INFO("fw jobs execute finished count = %d\n", reg_val); reg_val = REGR(npu_dev, REG_NPU_FW_DEBUG_DATA); pr_info("fw jobs aco parser debug = %d\n", reg_val); NPU_INFO("fw jobs aco parser debug = %d\n", reg_val); } drivers/media/platform/msm/npu/npu_debugfs.c +32 −34 Original line number Diff line number Diff line Loading @@ -3,8 +3,6 @@ * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt /* ------------------------------------------------------------------------- * Includes * ------------------------------------------------------------------------- Loading Loading @@ -120,7 +118,7 @@ static ssize_t npu_debug_reg_write(struct file *file, buf[count] = 0; /* end of string */ cnt = sscanf(buf, "%zx %x", &off, &data); pr_debug("%s %s 0x%zx, 0x%08x\n", __func__, buf, off, data); NPU_DBG("%s 0x%zx, 0x%08x\n", buf, off, data); return count; if (cnt < 2) Loading @@ -133,7 +131,7 @@ static ssize_t npu_debug_reg_write(struct file *file, npu_disable_core_power(npu_dev); pr_debug("write: addr=%zx data=%x\n", off, data); NPU_DBG("write: addr=%zx data=%x\n", off, data); return count; } Loading Loading @@ -193,9 +191,9 @@ static ssize_t npu_debug_reg_read(struct file *file, return 0; /* done reading */ len = min(count, debugfs->buf_len - (size_t) *ppos); pr_debug("read %zi %zi\n", count, debugfs->buf_len - (size_t) *ppos); NPU_DBG("read %zi %zi\n", count, debugfs->buf_len - (size_t) *ppos); if (copy_to_user(user_buf, debugfs->buf + *ppos, len)) { pr_err("failed to copy to user\n"); NPU_ERR("failed to copy to user\n"); return -EFAULT; } Loading @@ -216,7 +214,7 @@ static ssize_t npu_debug_off_write(struct file *file, struct npu_device *npu_dev = file->private_data; struct npu_debugfs_ctx *debugfs; pr_debug("npu_dev %pK %pK\n", npu_dev, g_npu_dev); NPU_DBG("npu_dev %pK %pK\n", npu_dev, g_npu_dev); npu_dev = g_npu_dev; debugfs = &npu_dev->debugfs_ctx; Loading @@ -231,7 +229,7 @@ static ssize_t npu_debug_off_write(struct file *file, cnt = sscanf(buf, "%zx %x", &off, ®_cnt); if (cnt == 1) reg_cnt = DEFAULT_REG_DUMP_NUM; pr_debug("reg off = %zx, %d cnt=%d\n", off, reg_cnt, cnt); NPU_DBG("reg off = %zx, %d cnt=%d\n", off, reg_cnt, cnt); if (cnt >= 1) { debugfs->reg_off = off; debugfs->reg_cnt = reg_cnt; Loading @@ -248,7 +246,7 @@ static ssize_t npu_debug_off_read(struct file *file, struct npu_device *npu_dev = file->private_data; struct npu_debugfs_ctx *debugfs; pr_debug("npu_dev %pK %pK\n", npu_dev, g_npu_dev); NPU_DBG("npu_dev %pK %pK\n", npu_dev, g_npu_dev); npu_dev = g_npu_dev; debugfs = &npu_dev->debugfs_ctx; Loading @@ -259,7 +257,7 @@ static ssize_t npu_debug_off_read(struct file *file, debugfs->reg_off, debugfs->reg_cnt); if (copy_to_user(user_buf, buf, len)) { pr_err("failed to copy to user\n"); NPU_ERR("failed to copy to user\n"); return -EFAULT; } Loading @@ -278,7 +276,7 @@ static ssize_t npu_debug_log_read(struct file *file, struct npu_device *npu_dev = file->private_data; struct npu_debugfs_ctx *debugfs; pr_debug("npu_dev %pK %pK\n", npu_dev, g_npu_dev); NPU_DBG("npu_dev %pK %pK\n", npu_dev, g_npu_dev); npu_dev = g_npu_dev; debugfs = &npu_dev->debugfs_ctx; Loading @@ -298,7 +296,7 @@ static ssize_t npu_debug_log_read(struct file *file, if (copy_to_user(dst_addr, src_addr, remaining_to_end)) { pr_err("%s failed to copy to user\n", __func__); NPU_ERR("failed to copy to user\n"); mutex_unlock(&debugfs->log_lock); return -EFAULT; } Loading @@ -307,7 +305,7 @@ static ssize_t npu_debug_log_read(struct file *file, if (copy_to_user(dst_addr, src_addr, debugfs->log_num_bytes_buffered - remaining_to_end)) { pr_err("%s failed to copy to user\n", __func__); NPU_ERR("failed to copy to user\n"); mutex_unlock(&debugfs->log_lock); return -EFAULT; } Loading @@ -318,7 +316,7 @@ static ssize_t npu_debug_log_read(struct file *file, if (copy_to_user(user_buf, (debugfs->log_buf + debugfs->log_read_index), debugfs->log_num_bytes_buffered)) { pr_err("%s failed to copy to user\n", __func__); NPU_ERR("failed to copy to user\n"); mutex_unlock(&debugfs->log_lock); return -EFAULT; } Loading Loading @@ -350,7 +348,7 @@ static ssize_t npu_debug_ctrl_write(struct file *file, int32_t rc = 0; uint32_t val; pr_debug("npu_dev %pK %pK\n", npu_dev, g_npu_dev); NPU_DBG("npu_dev %pK %pK\n", npu_dev, g_npu_dev); npu_dev = g_npu_dev; debugfs = &npu_dev->debugfs_ctx; Loading @@ -366,14 +364,14 @@ static ssize_t npu_debug_ctrl_write(struct file *file, buf[count-1] = 0;/* remove line feed */ if (strcmp(buf, "on") == 0) { pr_info("triggering fw_init\n"); NPU_INFO("triggering fw_init\n"); if (fw_init(npu_dev) != 0) pr_info("error in fw_init\n"); NPU_INFO("error in fw_init\n"); } else if (strcmp(buf, "off") == 0) { pr_info("triggering fw_deinit\n"); NPU_INFO("triggering fw_deinit\n"); fw_deinit(npu_dev, false, true); } else if (strcmp(buf, "ssr") == 0) { pr_info("trigger error irq\n"); NPU_INFO("trigger error irq\n"); if (npu_enable_core_power(npu_dev)) return -EPERM; Loading @@ -381,20 +379,20 @@ static ssize_t npu_debug_ctrl_write(struct file *file, REGW(npu_dev, NPU_MASTERn_ERROR_IRQ_SET(0), 2); npu_disable_core_power(npu_dev); } else if (strcmp(buf, "ssr_wdt") == 0) { pr_info("trigger wdt irq\n"); NPU_INFO("trigger wdt irq\n"); npu_disable_post_pil_clocks(npu_dev); } else if (strcmp(buf, "loopback") == 0) { pr_debug("loopback test\n"); NPU_DBG("loopback test\n"); rc = npu_host_loopback_test(npu_dev); pr_debug("loopback test end: %d\n", rc); NPU_DBG("loopback test end: %d\n", rc); } else { rc = kstrtou32(buf, 10, &val); if (rc) { pr_err("Invalid input for power level settings\n"); NPU_ERR("Invalid input for power level settings\n"); } else { val = min(val, npu_dev->pwrctrl.max_pwrlevel); npu_dev->pwrctrl.active_pwrlevel = val; pr_info("setting power state to %d\n", val); NPU_INFO("setting power state to %d\n", val); } } Loading @@ -414,62 +412,62 @@ int npu_debugfs_init(struct npu_device *npu_dev) debugfs->root = debugfs_create_dir("npu", NULL); if (IS_ERR_OR_NULL(debugfs->root)) { pr_err("debugfs_create_dir for npu failed, error %ld\n", NPU_ERR("debugfs_create_dir for npu failed, error %ld\n", PTR_ERR(debugfs->root)); return -ENODEV; } if (!debugfs_create_file("reg", 0644, debugfs->root, npu_dev, &npu_reg_fops)) { pr_err("debugfs_create_file reg fail\n"); NPU_ERR("debugfs_create_file reg fail\n"); goto err; } if (!debugfs_create_file("off", 0644, debugfs->root, npu_dev, &npu_off_fops)) { pr_err("debugfs_create_file off fail\n"); NPU_ERR("debugfs_create_file off fail\n"); goto err; } if (!debugfs_create_file("log", 0644, debugfs->root, npu_dev, &npu_log_fops)) { pr_err("debugfs_create_file log fail\n"); NPU_ERR("debugfs_create_file log fail\n"); goto err; } if (!debugfs_create_file("ctrl", 0644, debugfs->root, npu_dev, &npu_ctrl_fops)) { pr_err("debugfs_create_file ctrl fail\n"); NPU_ERR("debugfs_create_file ctrl fail\n"); goto err; } if (!debugfs_create_bool("sys_cache_disable", 0644, debugfs->root, &(host_ctx->sys_cache_disable))) { pr_err("debugfs_creat_bool fail for sys cache\n"); NPU_ERR("debugfs_creat_bool fail for sys cache\n"); goto err; } if (!debugfs_create_u32("fw_dbg_mode", 0644, debugfs->root, &(host_ctx->fw_dbg_mode))) { pr_err("debugfs_create_u32 fail for fw_dbg_mode\n"); NPU_ERR("debugfs_create_u32 fail for fw_dbg_mode\n"); goto err; } if (!debugfs_create_u32("fw_state", 0444, debugfs->root, &(host_ctx->fw_state))) { pr_err("debugfs_create_u32 fail for fw_state\n"); NPU_ERR("debugfs_create_u32 fail for fw_state\n"); goto err; } if (!debugfs_create_u32("pwr_level", 0444, debugfs->root, &(pwr->active_pwrlevel))) { pr_err("debugfs_create_u32 fail for pwr_level\n"); NPU_ERR("debugfs_create_u32 fail for pwr_level\n"); goto err; } if (!debugfs_create_u32("exec_flags", 0644, debugfs->root, &(host_ctx->exec_flags_override))) { pr_err("debugfs_create_u32 fail for exec_flags\n"); NPU_ERR("debugfs_create_u32 fail for exec_flags\n"); goto err; } Loading drivers/media/platform/msm/npu/npu_dev.c +120 −170 File changed.Preview size limit exceeded, changes collapsed. Show changes drivers/media/platform/msm/npu/npu_host_ipc.c +3 −5 Original line number Diff line number Diff line Loading @@ -3,8 +3,6 @@ * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt /* ------------------------------------------------------------------------- * Includes * ------------------------------------------------------------------------- Loading Loading @@ -169,9 +167,9 @@ static int npu_host_ipc_send_cmd_hfi(struct npu_device *npu_dev, } if (status == 0) pr_debug("Cmd Msg put on Command Queue - SUCCESSS\n"); NPU_DBG("Cmd Msg put on Command Queue - SUCCESSS\n"); else pr_err("Cmd Msg put on Command Queue - FAILURE\n"); NPU_ERR("Cmd Msg put on Command Queue - FAILURE\n"); return status; } Loading Loading @@ -232,7 +230,7 @@ static int ipc_queue_read(struct npu_device *npu_dev, MEMR(npu_dev, (void *)((size_t)read_ptr), packet, 4); packet_size = *((uint32_t *)packet); pr_debug("target_que: %d, packet_size: %d\n", NPU_DBG("target_que: %d, packet_size: %d\n", target_que, packet_size); Loading Loading
drivers/media/platform/msm/npu/npu_common.h +9 −2 Original line number Diff line number Diff line Loading @@ -55,6 +55,15 @@ enum npu_power_level { NPU_PWRLEVEL_OFF = 0xFFFFFFFF, }; #define NPU_ERR(fmt, args...) \ pr_err("NPU_ERR: %s: %d " fmt "\n", __func__, __LINE__, ##args) #define NPU_WARN(fmt, args...) \ pr_warn("NPU_WARN: %s: %d " fmt "\n", __func__, __LINE__, ##args) #define NPU_INFO(fmt, args...) \ pr_info("NPU_INFO: %s: %d " fmt "\n", __func__, __LINE__, ##args) #define NPU_DBG(fmt, args...) \ pr_debug("NPU_DBG: %s: %d " fmt "\n", __func__, __LINE__, ##args) /* ------------------------------------------------------------------------- * Data Structures * ------------------------------------------------------------------------- Loading Loading @@ -159,7 +168,6 @@ struct npu_pwrctrl { uint32_t num_pwrlevels; struct device *devbw; uint32_t bwmon_enabled; uint32_t uc_pwrlevel; uint32_t cdsprm_pwrlevel; uint32_t fmax_pwrlevel; Loading Loading @@ -206,7 +214,6 @@ struct npu_device { struct npu_io_data tcm_io; struct npu_io_data qdsp_io; struct npu_io_data apss_shared_io; struct npu_io_data bwmon_io; struct npu_io_data qfprom_io; uint32_t core_clk_num; Loading
drivers/media/platform/msm/npu/npu_dbg.c +3 −5 Original line number Diff line number Diff line Loading @@ -3,8 +3,6 @@ * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt /* ------------------------------------------------------------------------- * Includes * ------------------------------------------------------------------------- Loading @@ -24,9 +22,9 @@ void npu_dump_debug_timeout_stats(struct npu_device *npu_dev) uint32_t reg_val; reg_val = REGR(npu_dev, REG_FW_JOB_CNT_START); pr_info("fw jobs execute started count = %d\n", reg_val); NPU_INFO("fw jobs execute started count = %d\n", reg_val); reg_val = REGR(npu_dev, REG_FW_JOB_CNT_END); pr_info("fw jobs execute finished count = %d\n", reg_val); NPU_INFO("fw jobs execute finished count = %d\n", reg_val); reg_val = REGR(npu_dev, REG_NPU_FW_DEBUG_DATA); pr_info("fw jobs aco parser debug = %d\n", reg_val); NPU_INFO("fw jobs aco parser debug = %d\n", reg_val); }
drivers/media/platform/msm/npu/npu_debugfs.c +32 −34 Original line number Diff line number Diff line Loading @@ -3,8 +3,6 @@ * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt /* ------------------------------------------------------------------------- * Includes * ------------------------------------------------------------------------- Loading Loading @@ -120,7 +118,7 @@ static ssize_t npu_debug_reg_write(struct file *file, buf[count] = 0; /* end of string */ cnt = sscanf(buf, "%zx %x", &off, &data); pr_debug("%s %s 0x%zx, 0x%08x\n", __func__, buf, off, data); NPU_DBG("%s 0x%zx, 0x%08x\n", buf, off, data); return count; if (cnt < 2) Loading @@ -133,7 +131,7 @@ static ssize_t npu_debug_reg_write(struct file *file, npu_disable_core_power(npu_dev); pr_debug("write: addr=%zx data=%x\n", off, data); NPU_DBG("write: addr=%zx data=%x\n", off, data); return count; } Loading Loading @@ -193,9 +191,9 @@ static ssize_t npu_debug_reg_read(struct file *file, return 0; /* done reading */ len = min(count, debugfs->buf_len - (size_t) *ppos); pr_debug("read %zi %zi\n", count, debugfs->buf_len - (size_t) *ppos); NPU_DBG("read %zi %zi\n", count, debugfs->buf_len - (size_t) *ppos); if (copy_to_user(user_buf, debugfs->buf + *ppos, len)) { pr_err("failed to copy to user\n"); NPU_ERR("failed to copy to user\n"); return -EFAULT; } Loading @@ -216,7 +214,7 @@ static ssize_t npu_debug_off_write(struct file *file, struct npu_device *npu_dev = file->private_data; struct npu_debugfs_ctx *debugfs; pr_debug("npu_dev %pK %pK\n", npu_dev, g_npu_dev); NPU_DBG("npu_dev %pK %pK\n", npu_dev, g_npu_dev); npu_dev = g_npu_dev; debugfs = &npu_dev->debugfs_ctx; Loading @@ -231,7 +229,7 @@ static ssize_t npu_debug_off_write(struct file *file, cnt = sscanf(buf, "%zx %x", &off, ®_cnt); if (cnt == 1) reg_cnt = DEFAULT_REG_DUMP_NUM; pr_debug("reg off = %zx, %d cnt=%d\n", off, reg_cnt, cnt); NPU_DBG("reg off = %zx, %d cnt=%d\n", off, reg_cnt, cnt); if (cnt >= 1) { debugfs->reg_off = off; debugfs->reg_cnt = reg_cnt; Loading @@ -248,7 +246,7 @@ static ssize_t npu_debug_off_read(struct file *file, struct npu_device *npu_dev = file->private_data; struct npu_debugfs_ctx *debugfs; pr_debug("npu_dev %pK %pK\n", npu_dev, g_npu_dev); NPU_DBG("npu_dev %pK %pK\n", npu_dev, g_npu_dev); npu_dev = g_npu_dev; debugfs = &npu_dev->debugfs_ctx; Loading @@ -259,7 +257,7 @@ static ssize_t npu_debug_off_read(struct file *file, debugfs->reg_off, debugfs->reg_cnt); if (copy_to_user(user_buf, buf, len)) { pr_err("failed to copy to user\n"); NPU_ERR("failed to copy to user\n"); return -EFAULT; } Loading @@ -278,7 +276,7 @@ static ssize_t npu_debug_log_read(struct file *file, struct npu_device *npu_dev = file->private_data; struct npu_debugfs_ctx *debugfs; pr_debug("npu_dev %pK %pK\n", npu_dev, g_npu_dev); NPU_DBG("npu_dev %pK %pK\n", npu_dev, g_npu_dev); npu_dev = g_npu_dev; debugfs = &npu_dev->debugfs_ctx; Loading @@ -298,7 +296,7 @@ static ssize_t npu_debug_log_read(struct file *file, if (copy_to_user(dst_addr, src_addr, remaining_to_end)) { pr_err("%s failed to copy to user\n", __func__); NPU_ERR("failed to copy to user\n"); mutex_unlock(&debugfs->log_lock); return -EFAULT; } Loading @@ -307,7 +305,7 @@ static ssize_t npu_debug_log_read(struct file *file, if (copy_to_user(dst_addr, src_addr, debugfs->log_num_bytes_buffered - remaining_to_end)) { pr_err("%s failed to copy to user\n", __func__); NPU_ERR("failed to copy to user\n"); mutex_unlock(&debugfs->log_lock); return -EFAULT; } Loading @@ -318,7 +316,7 @@ static ssize_t npu_debug_log_read(struct file *file, if (copy_to_user(user_buf, (debugfs->log_buf + debugfs->log_read_index), debugfs->log_num_bytes_buffered)) { pr_err("%s failed to copy to user\n", __func__); NPU_ERR("failed to copy to user\n"); mutex_unlock(&debugfs->log_lock); return -EFAULT; } Loading Loading @@ -350,7 +348,7 @@ static ssize_t npu_debug_ctrl_write(struct file *file, int32_t rc = 0; uint32_t val; pr_debug("npu_dev %pK %pK\n", npu_dev, g_npu_dev); NPU_DBG("npu_dev %pK %pK\n", npu_dev, g_npu_dev); npu_dev = g_npu_dev; debugfs = &npu_dev->debugfs_ctx; Loading @@ -366,14 +364,14 @@ static ssize_t npu_debug_ctrl_write(struct file *file, buf[count-1] = 0;/* remove line feed */ if (strcmp(buf, "on") == 0) { pr_info("triggering fw_init\n"); NPU_INFO("triggering fw_init\n"); if (fw_init(npu_dev) != 0) pr_info("error in fw_init\n"); NPU_INFO("error in fw_init\n"); } else if (strcmp(buf, "off") == 0) { pr_info("triggering fw_deinit\n"); NPU_INFO("triggering fw_deinit\n"); fw_deinit(npu_dev, false, true); } else if (strcmp(buf, "ssr") == 0) { pr_info("trigger error irq\n"); NPU_INFO("trigger error irq\n"); if (npu_enable_core_power(npu_dev)) return -EPERM; Loading @@ -381,20 +379,20 @@ static ssize_t npu_debug_ctrl_write(struct file *file, REGW(npu_dev, NPU_MASTERn_ERROR_IRQ_SET(0), 2); npu_disable_core_power(npu_dev); } else if (strcmp(buf, "ssr_wdt") == 0) { pr_info("trigger wdt irq\n"); NPU_INFO("trigger wdt irq\n"); npu_disable_post_pil_clocks(npu_dev); } else if (strcmp(buf, "loopback") == 0) { pr_debug("loopback test\n"); NPU_DBG("loopback test\n"); rc = npu_host_loopback_test(npu_dev); pr_debug("loopback test end: %d\n", rc); NPU_DBG("loopback test end: %d\n", rc); } else { rc = kstrtou32(buf, 10, &val); if (rc) { pr_err("Invalid input for power level settings\n"); NPU_ERR("Invalid input for power level settings\n"); } else { val = min(val, npu_dev->pwrctrl.max_pwrlevel); npu_dev->pwrctrl.active_pwrlevel = val; pr_info("setting power state to %d\n", val); NPU_INFO("setting power state to %d\n", val); } } Loading @@ -414,62 +412,62 @@ int npu_debugfs_init(struct npu_device *npu_dev) debugfs->root = debugfs_create_dir("npu", NULL); if (IS_ERR_OR_NULL(debugfs->root)) { pr_err("debugfs_create_dir for npu failed, error %ld\n", NPU_ERR("debugfs_create_dir for npu failed, error %ld\n", PTR_ERR(debugfs->root)); return -ENODEV; } if (!debugfs_create_file("reg", 0644, debugfs->root, npu_dev, &npu_reg_fops)) { pr_err("debugfs_create_file reg fail\n"); NPU_ERR("debugfs_create_file reg fail\n"); goto err; } if (!debugfs_create_file("off", 0644, debugfs->root, npu_dev, &npu_off_fops)) { pr_err("debugfs_create_file off fail\n"); NPU_ERR("debugfs_create_file off fail\n"); goto err; } if (!debugfs_create_file("log", 0644, debugfs->root, npu_dev, &npu_log_fops)) { pr_err("debugfs_create_file log fail\n"); NPU_ERR("debugfs_create_file log fail\n"); goto err; } if (!debugfs_create_file("ctrl", 0644, debugfs->root, npu_dev, &npu_ctrl_fops)) { pr_err("debugfs_create_file ctrl fail\n"); NPU_ERR("debugfs_create_file ctrl fail\n"); goto err; } if (!debugfs_create_bool("sys_cache_disable", 0644, debugfs->root, &(host_ctx->sys_cache_disable))) { pr_err("debugfs_creat_bool fail for sys cache\n"); NPU_ERR("debugfs_creat_bool fail for sys cache\n"); goto err; } if (!debugfs_create_u32("fw_dbg_mode", 0644, debugfs->root, &(host_ctx->fw_dbg_mode))) { pr_err("debugfs_create_u32 fail for fw_dbg_mode\n"); NPU_ERR("debugfs_create_u32 fail for fw_dbg_mode\n"); goto err; } if (!debugfs_create_u32("fw_state", 0444, debugfs->root, &(host_ctx->fw_state))) { pr_err("debugfs_create_u32 fail for fw_state\n"); NPU_ERR("debugfs_create_u32 fail for fw_state\n"); goto err; } if (!debugfs_create_u32("pwr_level", 0444, debugfs->root, &(pwr->active_pwrlevel))) { pr_err("debugfs_create_u32 fail for pwr_level\n"); NPU_ERR("debugfs_create_u32 fail for pwr_level\n"); goto err; } if (!debugfs_create_u32("exec_flags", 0644, debugfs->root, &(host_ctx->exec_flags_override))) { pr_err("debugfs_create_u32 fail for exec_flags\n"); NPU_ERR("debugfs_create_u32 fail for exec_flags\n"); goto err; } Loading
drivers/media/platform/msm/npu/npu_dev.c +120 −170 File changed.Preview size limit exceeded, changes collapsed. Show changes
drivers/media/platform/msm/npu/npu_host_ipc.c +3 −5 Original line number Diff line number Diff line Loading @@ -3,8 +3,6 @@ * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt /* ------------------------------------------------------------------------- * Includes * ------------------------------------------------------------------------- Loading Loading @@ -169,9 +167,9 @@ static int npu_host_ipc_send_cmd_hfi(struct npu_device *npu_dev, } if (status == 0) pr_debug("Cmd Msg put on Command Queue - SUCCESSS\n"); NPU_DBG("Cmd Msg put on Command Queue - SUCCESSS\n"); else pr_err("Cmd Msg put on Command Queue - FAILURE\n"); NPU_ERR("Cmd Msg put on Command Queue - FAILURE\n"); return status; } Loading Loading @@ -232,7 +230,7 @@ static int ipc_queue_read(struct npu_device *npu_dev, MEMR(npu_dev, (void *)((size_t)read_ptr), packet, 4); packet_size = *((uint32_t *)packet); pr_debug("target_que: %d, packet_size: %d\n", NPU_DBG("target_que: %d, packet_size: %d\n", target_que, packet_size); Loading