Boosting clocks with disk encryption + secure boot

Hi,

I’m running into the issue posted here: Jetson_clocks --show failed if secureBoot + disk encryption is enabled

The memory isnt as important as the vi/isp/nvcsi clocks, when I try to boost them like this:

echo 1 > /sys/kernel/debug/bpmp/debug/clk/vi/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/isp/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/nvcsi/mrq_rate_locked
cat /sys/kernel/debug/bpmp/debug/clk/vi/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/vi/rate
cat /sys/kernel/debug/bpmp/debug/clk/isp/max_rate | tee  /sys/kernel/debug/bpmp/debug/clk/isp/rate
cat /sys/kernel/debug/bpmp/debug/clk/nvcsi/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/nvcsi/rate

it fails:

cat: /sys/kernel/debug/bpmp/debug/clk/vi/max_rate: No such file or directory
tee: /sys/kernel/debug/bpmp/debug/clk/vi/rate: No such file or directory
cat: /sys/kernel/debug/bpmp/debug/clk/isp/max_rate: No such file or directory
tee: /sys/kernel/debug/bpmp/debug/clk/isp/rate: No such file or directory
cat: /sys/kernel/debug/bpmp/debug/clk/nvcsi/max_rate: No such file or directory
tee: /sys/kernel/debug/bpmp/debug/clk/nvcsi/rate: No such file or directory

hello kjasper,

may I know what’s the real use-case?
that’s due to the debug access (i.e. bpmp debugfs) will be disabled when the you’ve also burn the SecurityMode bit.

hence,
please use the nvpmodel GUI, if you would like to toggle the clock configuration.

Under heavy load the camera will fail if the clocks are not maxed out, I don’t have a GUI only command line. I see VIC controls under the link you sent but not NVCSI or ISP

hello kjasper,

but… maximum clocks it should be evaluation purpose instead of production solution.

Yes but we need to tune the clocks in the production environment, so we need to adjust the emc, vic, nvcsi and isp

hello kjasper,

please try to examine your sensor pixel clock settings (i.e. pix_clk_hz), camera software stack based-on it to allocate clock rates.

Ideally we wouldn’t need to adjust the rates but under heavy load we need to adjust the aforementioned clocks for the cameras to function, it just needs to behave the same in the secure boot environment

hello kjasper,

there’re different power modes as you can see in the Supported Modes and Power Efficiency.
you may also adding a mode definition to the file, $ /etc/nvpmodel.conf to define a custom power mode.

see-also, https://developer.nvidia.com/blog/power-optimization-with-nvidia-jetson/

Increasing the pix_clk_hz didnt help unfortunately. I have custom power modes already, how do i control the ISP etc through that interface?

hello kjasper,

as mentioned…

I don’t have fused TX2 devices for testing.
please check whether you’ve this ISP node available? i.e. /sys/kernel/debug/clk/isp/clk_rate

besides,
please try adding below code snippets to configure VI and NVCSI rates at maximum during system boot-up.

diff --git a/drivers/video/tegra/camera/tegra_camera_platform.c b/drivers/video/tegra/camera/tegra_camera_platform.c
index a322b1c19..15356423b 100644
--- a/drivers/video/tegra/camera/tegra_camera_platform.c
+++ b/drivers/video/tegra/camera/tegra_camera_platform.c
@@ -1091,15 +1091,18 @@ static int calculate_and_set_device_clock(struct tegra_camera_info *info,
   dr = bus_width * 100;
   if (dr == 0)
    return -EINVAL;
+ clk_rate = 400000000;
   break;
  case HWTYPE_VI:
   nr = final_pr * overhead;
   dr = 100 * (ppc / ppc_divider);
+ clk_rate = 998400000;
   break;
  case HWTYPE_ISPA:
  case HWTYPE_ISPB:
   nr = final_pr * overhead;
   dr = 100 * ppc;
+ clk_rate = (nr + dr) / dr;
   break;
  case HWTYPE_SLVSEC:
   if (info->sensor_type != SENSORTYPE_SLVSEC)
@@ -1108,13 +1111,14 @@ static int calculate_and_set_device_clock(struct tegra_camera_info *info,
   dr = bus_width * 100;
   if (dr == 0)
    return -EINVAL;
+ clk_rate = (nr + dr) / dr;
   break;
  default:
   return -EINVAL;
  }
 
  /* avoid rounding errors by adding dr to nr */
- clk_rate = (nr + dr) / dr;
+ //clk_rate = (nr + dr) / dr;

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.