How to write to registers at /sys/kernel/debug/tegradc.1/regs?


I want to change some video register’s value from the terminal (i cannot compile the kernel, so i’m looking for run time solution).
I found the register with the following command:

sudo cat /sys/kernel/debug/tegradc.1/regs

i got a list of registers with their address and values.
I want to write to some registers, is it possible?

“regs” is shown as a file in linux OS, so not each register is mapped as a stand alone file.



I don’t know what you want to do here… but if you just want to write register, you can directly check the TRM document for the address and use devmem to write it.

devmem is from busybox which is 3rdparty tool.

I tried to write to nvdisp_csc2_control_r (address 0x4ef). But I got an error.
According to the TRM document section Xavier Address Map i understand that the base address is 0x15200000, so i tried:

sudo busybox devmem 0x152004ef

I got a “Bus error”.
What is the right base address?

You can directly check the driver code.

Acctually I checked the kernel sources before posting my previous reply.
I saw usage of nvdisp_csc2_control_r() in the following file:
But couldn’t find the value or base address of the register.



Sometimes you cannot write the register is due to the clock has to be disabled when writing value. For such case, you better programming it through the driver.

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