media: rockchip: cif change image offset to match isp unite

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I00b658f7ac2cf551fab4c94fd914c62893891b47
This commit is contained in:
Zefa Chen
2021-11-15 18:14:28 +08:00
committed by Tao Huang
parent 334a27b6c1
commit 11258c2028
2 changed files with 5 additions and 4 deletions

View File

@@ -21,6 +21,7 @@
#include <media/v4l2-fwnode.h>
#include "dev.h"
#include <linux/regulator/consumer.h>
#include <linux/rk-camera-module.h>
static inline struct sditf_priv *to_sditf_priv(struct v4l2_subdev *subdev)
{
@@ -339,7 +340,7 @@ static int sditf_channel_enable(struct sditf_priv *priv, int user)
}
if (user == 0) {
if (priv->toisp_inf.link_mode == TOISP_UNITE)
width = priv->cap_info.width / 2 + 256;
width = priv->cap_info.width / 2 + RKMOUDLE_UNITE_EXTEND_PIXEL;
rkcif_write_register_or(cif_dev, CIF_REG_TOISP0_CTRL, ctrl_val);
if (width && height) {
rkcif_write_register(cif_dev, CIF_REG_TOISP0_CROP,
@@ -352,8 +353,8 @@ static int sditf_channel_enable(struct sditf_priv *priv, int user)
rkcif_write_register_or(cif_dev, CIF_REG_GLB_INTEN, int_en);
} else {
if (priv->toisp_inf.link_mode == TOISP_UNITE) {
offset_x = priv->cap_info.width / 2 - 256;
width = priv->cap_info.width / 2 + 256;
offset_x = priv->cap_info.width / 2 - RKMOUDLE_UNITE_EXTEND_PIXEL;
width = priv->cap_info.width / 2 + RKMOUDLE_UNITE_EXTEND_PIXEL;
}
rkcif_write_register_or(cif_dev, CIF_REG_TOISP1_CTRL, ctrl_val);
if (width && height) {

View File

@@ -21,7 +21,7 @@
#define RKISP0_DEVNAME "rkisp0"
#define RKISP1_DEVNAME "rkisp1"
#define RKISP_UNITE_DEVNAME "rkisp_unite"
#define RKISP_UNITE_DEVNAME "rkisp-unite"
#define RKCIF_TOISP_CH0 0
#define RKCIF_TOISP_CH1 1