sde_rotator_r3_debug.c 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved.
  4. * Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
  5. */
  6. #define pr_fmt(fmt) "%s: " fmt, __func__
  7. #include <linux/types.h>
  8. #include <linux/kernel.h>
  9. #include <linux/slab.h>
  10. #include <linux/uaccess.h>
  11. #include <linux/debugfs.h>
  12. #include "sde_rotator_r3_debug.h"
  13. #include "sde_rotator_core.h"
  14. #include "sde_rotator_r3.h"
  15. #include "sde_rotator_r3_internal.h"
  16. #if defined(CONFIG_MSM_SDE_ROTATOR_EVTLOG_DEBUG) && \
  17. defined(CONFIG_DEBUG_FS)
  18. /*
  19. * sde_rotator_r3_create_debugfs - Setup rotator r3 debugfs directory structure.
  20. * @rot_dev: Pointer to rotator device
  21. */
  22. int sde_rotator_r3_create_debugfs(struct sde_rot_mgr *mgr,
  23. struct dentry *debugfs_root)
  24. {
  25. struct sde_hw_rotator *hw_data;
  26. if (!mgr || !debugfs_root || !mgr->hw_data)
  27. return -EINVAL;
  28. hw_data = mgr->hw_data;
  29. debugfs_create_bool("dbgmem", 0644, debugfs_root, &hw_data->dbgmem);
  30. debugfs_create_u32("koff_timeout", 0644, debugfs_root, &hw_data->koff_timeout);
  31. debugfs_create_u32("vid_trigger", 0644, debugfs_root, &hw_data->vid_trigger);
  32. debugfs_create_u32("cmd_trigger", 0644, debugfs_root, &hw_data->cmd_trigger);
  33. debugfs_create_u32("sbuf_headroom", 0644, debugfs_root, &hw_data->sbuf_headroom);
  34. debugfs_create_u32("solid_fill", 0644, debugfs_root, &hw_data->solid_fill);
  35. return 0;
  36. }
  37. #endif