STRUCT RPPX1_LIN_PARAMS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct rppx1_lin_params(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual ✨ β€” this is the page for struct rppx1_lin_params, aka the linearization (sensor de-gamma) config, and honestly? it's giving "small struct, big responsibilities" πŸ‘‘


🌸 NAME 🌸

struct rppx1_lin_params β€” the linearization (sensor de-gamma) configuration πŸŽ€


✨ SYNOPSIS ✨

struct rppx1_lin_params {
    struct v4l2_isp_params_block_header header;
    __u32 curve_r[RPPX1_LIN_DEGAMMA_CURVE_NUM];
    __u32 curve_g[RPPX1_LIN_DEGAMMA_CURVE_NUM];
    __u32 curve_b[RPPX1_LIN_DEGAMMA_CURVE_NUM];
    __u8 dx[RPPX1_LIN_SAMPLE_POINTS_NUM];
    __u32 reserved;
 };

no cap, that's the whole vibe right there 🫢


πŸ¦‹ Members πŸ¦‹

  • header β€” the block header, and its type is literally either RPPX1_PARAMS_BLOCK_TYPE_LIN_PRE1 or RPPX1_PARAMS_BLOCK_TYPE_LIN_PRE2 πŸ’… that's how you tell it which pipe you're on
  • curve_r β€” the de-gamma linearization curve for the red channel πŸ“
  • curve_g β€” the de-gamma linearization curve for the green channel 🌿
  • curve_b β€” the de-gamma linearization curve for the blue channel πŸ¦‹
  • dx β€” the input sampling points πŸ“
  • reserved β€” padding, it's just there chillin' (don't touch it, bestie) πŸ™ˆ

🌈 Description 🌈

so the RPP-X1 linearization module is available on the PRE1 and PRE2 pre-fusion pipes πŸ”₯ and userspace gets to pick which pipe it's operating on by setting the header.type field to RPPX1_PARAMS_BLOCK_TYPE_LIN_PRE1 or RPPX1_PARAMS_BLOCK_TYPE_LIN_PRE2 β€” main character energy, you choose πŸ‘‘

The LIN module applies the per-color channel de-gamma linearization curves curve_r, curve_g and curve_b, all defined on the input sampling points dx. teamwork, fr fr 🀝

Now here's the part where the bit-depth match matters, so lock in 🧠✨:

  • For the PRE1 pipe, the de-gamma curve values are 24-bits πŸ’–
  • For the PRE2 pipe, the de-gamma curve values are 12-bits πŸŽ€
  • For the PRE1 pipe, the de-gamma module sampling points dx values are in the range [0, 15] (4 bits) 🌸
  • For the PRE2 pipe, the de-gamma module sampling points values are in the range [0, 7] (3 bits) πŸ¦‹
⚠️ ok so this is the important one: userspace is expected to provide the curve values and the sampling points with a bit-depth matching the one of the pipe in use. mismatch = not the move, bestie 😭

πŸ’œ SEE ALSO πŸ’œ

Kernel file ./include/uapi/linux/media/dreamchip/rppx1-config.h β€” plus the whole friend group πŸ‘―β€β™€οΈ:

  • struct rppx1_window(9)
  • enum rppx1_meas_chan(9)
  • enum rppx1_params_block_type(9)
  • enum rppx1_wbmeas_mode(9)
  • struct rppx1_wbmeas_params(9)
  • struct rppx1_awbg_params(9)
  • enum rppx1_exm_mode(9)
  • struct rppx1_exm_params(9)
  • enum rppx1_hist_mode(9)
  • struct rppx1_hist_params(9)
  • struct rppx1_bls_fixed(9)
  • enum rppx1_bls_mode(9)
  • enum rppx1_bls_win_en(9)
  • struct rppx1_bls_params(9)
  • struct rppx1_ccor_params(9)
  • struct rppx1_lsc_params(9)
  • enum rppx1_ga_seg_mode(9)
  • struct rppx1_ga_params(9)
  • RPPX1_PARAMS_MAX_SIZE(9)
  • enum rppx1_stats_block_type(9)
  • struct rppx1_wbmeas_stats(9)
  • struct rppx1_exm_stats(9)
  • struct rppx1_hist_stats(9)
  • RPPX1_STATS_MAX_SIZE(9)

and that's the page!! πŸ’… this one lives at ./include/uapi/linux/media/dre... and it's stamped October 2026 β€” so go off, read the headers, slay your de-gamma curves, and remember: match that bit-depth bestie, iykyk πŸ’–βœ¨πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from