All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
To: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>,
	kever.yang@rock-chips.com, Eddie Cai <eddie.cai@rock-chips.com>
Cc: Helen Koike <helen.koike@collabora.com>,
	linux-media@vger.kernel.org,
	christoph.muellner@theobroma-systems.com,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Subject: rkisp in mainline (destaging) vs. rk3326/px30 uapi differences
Date: Thu, 07 Jan 2021 21:23:56 +0100	[thread overview]
Message-ID: <3342088.iIbC2pHGDl@diego> (raw)

Hi,

the rkisp driver in the mainline Linux kernel moved out of staging with
5.11-rc1, so the uapi will be fixed after 5.11 proper is released.

The rkisp driver currently only supports the rk3399 and while working
on porting the support for rk3326/px30 I noticed discrepancies.

Hence it would be somewhat urgent to clarify this, as later it will get
really cumbersome.

----

The rkisp on the px30 (v12) has some changes compared to the rk3399 (v10).
Some sub-blocks moved around or seem to have been replaced with newer
variants and the gist of changes can be seen in [0] with the important
part being the uapi changes [1] and those values also exist in mainline.


See functions in that patch:
- isp_goc_config_v12()
- rkisp1_stats_get_aec_meas_v12()
- rkisp1_stats_get_hst_meas_v12()

Looking at the code, the register locations are different, for gammas and
the histogram the actual amount of raw registers is the same, while the
"aec" seems to use 25 registers on V10 while 21 registers on V12. Though
their content gets split into multiple values in that v12 variant.


As somehow expected the whole thing is pretty undocumented and I
have no clue what these "bins" or "gammas" mean and why the amount of
entries now differs and how this relates to userspace at all.

Also looking through libcamera as the one open user of the driver,
the whole rkisp1_cif_isp_isp_other_cfg (containing the gamma config)
as well as the rkisp1_cif_isp_stat struct (for ae and histogram)
don't seem to be used so far.

Hence I also added some Rockchip people in the hope of getting
a bit of clarification ;-) .


Ideas on how to proceed?

Thanks
Heiko


[0] https://github.com/rockchip-linux/kernel/commit/2ff670508e8fdfefd67318e885effb8cee4a0f4c
[1]
diff --git a/include/uapi/linux/rkisp1-config.h b/include/uapi/linux/rkisp1-config.h
index b471f01a8459..fbeb6b5dba03 100644
--- a/include/uapi/linux/rkisp1-config.h
+++ b/include/uapi/linux/rkisp1-config.h
@@ -32,8 +32,8 @@
 #define CIFISP_CTK_COEFF_MAX            0x100
 #define CIFISP_CTK_OFFSET_MAX           0x800
 
-#define CIFISP_AE_MEAN_MAX              25
-#define CIFISP_HIST_BIN_N_MAX           16
+#define CIFISP_AE_MEAN_MAX              81
+#define CIFISP_HIST_BIN_N_MAX           32
 #define CIFISP_AFM_MAX_WINDOWS          3
 #define CIFISP_DEGAMMA_CURVE_SIZE       17
 
@@ -69,7 +69,7 @@
  * Gamma out
  */
 /* Maximum number of color samples supported */
-#define CIFISP_GAMMA_OUT_MAX_SAMPLES       17
+#define CIFISP_GAMMA_OUT_MAX_SAMPLES       34




             reply	other threads:[~2021-01-07 20:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-07 20:23 Heiko Stuebner [this message]
2021-01-08 11:17 ` rkisp in mainline (destaging) vs. rk3326/px30 uapi differences Dafna Hirschfeld
2021-01-08 12:05   ` Heiko Stuebner
2021-01-08 15:21     ` Dafna Hirschfeld
2021-01-09  1:21       ` Laurent Pinchart
2021-01-11 10:53         ` Heiko Stuebner
2021-01-11 11:04           ` Laurent Pinchart
2021-01-11 15:05             ` Heiko Stuebner
2021-01-11 15:23               ` Laurent Pinchart
2021-01-12  6:10               ` Tomasz Figa
2021-01-12  8:17                 ` Heiko Stuebner
2021-01-12  6:04 ` Tomasz Figa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3342088.iIbC2pHGDl@diego \
    --to=heiko.stuebner@theobroma-systems.com \
    --cc=christoph.muellner@theobroma-systems.com \
    --cc=dafna.hirschfeld@collabora.com \
    --cc=eddie.cai@rock-chips.com \
    --cc=helen.koike@collabora.com \
    --cc=kever.yang@rock-chips.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.