Re: [RESEND PATCH v6 17/17] media: qcom: camss: Comment CSID dt_id field

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 27/09/2023 12:42, Hans Verkuil wrote:
+		/*
+		 * DT_ID is a two bit bitfield that is concatenated with
+		 * the four least significant bits of the six bit VC
+		 * bitfield to generate an internal CID value.
+		 *
+		 * CSID_RDI_CFG0(vc)
+		 * DT_ID : 28:27
+		 * VC    : 26:22
This is 5 bits, not 6 bits as the comment above says. Which is right?

Yes you're right I had "DT" which is six bits in my head when I wrote this. The VC bitfield is five.


+		 * DT    : 21:16
+		 *
+		 * CID   : VC 3:0 << 2 | DT_ID 1:0
+		 */
  		u8 dt_id = vc;
So if dt_id is 2 bits, and vc can be more than 2 bits in the future,
shouldn't this read "vc & 3"?

Hmm...

val |= dt_id << RDI_CFG0_DT_ID;

yes that would overrun otherwise.

---
bod




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux