Skip to content

Commit

Permalink
Multiple MTL, RPL, ADL releases. (#260)
Browse files Browse the repository at this point in the history
* mtl-p mr1 release

Signed-off-by: zouxiaoh <[email protected]>

* MTL ECR engineer release: 6x IMX390 on kernel v6.6 Ubuntu 22.04

Signed-off-by: zouxiaoh <[email protected]>

* ARL Beta release kernel v6.9

Signed-off-by: zouxiaoh <[email protected]>

* Kernel patches on mainline 6.9

Signed-off-by: zouxiaoh <[email protected]>

* Multiple MTL, RPL, ADL releases.

Signed-off-by: zouxiaoh <[email protected]>

---------

Signed-off-by: zouxiaoh <[email protected]>
  • Loading branch information
zouxiaoh authored Aug 8, 2024
1 parent 4b59660 commit 23af401
Show file tree
Hide file tree
Showing 12 changed files with 846 additions and 207 deletions.
30 changes: 0 additions & 30 deletions drivers/media/i2c/ar0234.c
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,6 @@ static const struct ar0234_mode supported_modes[] = {
},
};


static u32 supported_formats[] = {
MEDIA_BUS_FMT_SGRBG10_1X10,
MEDIA_BUS_FMT_SGRBG8_1X8,
Expand All @@ -1339,9 +1338,6 @@ struct ar0234 {

/* V4L2 Controls */
struct v4l2_ctrl *link_freq;
#ifdef V4L2_CID_MIPI_LANES
struct v4l2_ctrl *mipi_lanes;
#endif
struct v4l2_ctrl *vblank;
struct v4l2_ctrl *exposure;
struct v4l2_ctrl *analogue_gain;
Expand Down Expand Up @@ -1557,11 +1553,6 @@ static int ar0234_set_ctrl(struct v4l2_ctrl *ctrl)
ar0234->cur_mode->height + ctrl->val);
dev_dbg(&client->dev, "set vblank %d\n", ar0234->cur_mode->height + ctrl->val);
break;
#ifdef V4L2_CID_MIPI_LANES
case V4L2_CID_MIPI_LANES:
dev_dbg(&client->dev, "set mipi lane %d\n", ctrl->val);
break;
#endif
case V4L2_CID_FLASH_STROBE_SOURCE:
dev_dbg(&client->dev, "set led flash source %d\n", ctrl->val);
break;
Expand Down Expand Up @@ -1709,9 +1700,6 @@ static int ar0234_init_controls(struct ar0234 *ar0234)
struct v4l2_ctrl_handler *ctrl_hdlr;
s64 exposure_max;
s64 hblank;
#ifdef V4L2_CID_MIPI_LANES
struct v4l2_ctrl_config cfg = { 0 };
#endif
int ret;

ctrl_hdlr = &ar0234->ctrl_handler;
Expand Down Expand Up @@ -1744,15 +1732,6 @@ static int ar0234_init_controls(struct ar0234 *ar0234)
AR0234_EXPOSURE_MIN, exposure_max,
AR0234_EXPOSURE_STEP,
exposure_max);
#ifdef V4L2_CID_MIPI_LANES
cfg.ops = &ar0234_ctrl_ops;
cfg.id = V4L2_CID_MIPI_LANES;
cfg.name = "V4L2_CID_MIPI_LANES";
cfg.type = V4L2_CTRL_TYPE_INTEGER;
cfg.max = 4; cfg.min = 2; cfg.step = 2; cfg.def = 4;
cfg.qmenu = 0; cfg.elem_size = 0;
ar0234->mipi_lanes = v4l2_ctrl_new_custom(ctrl_hdlr, &cfg, NULL);
#endif
ar0234->strobe_source = v4l2_ctrl_new_std_menu(
ctrl_hdlr, &ar0234_ctrl_ops,
V4L2_CID_FLASH_STROBE_SOURCE,
Expand Down Expand Up @@ -1967,9 +1946,6 @@ static int ar0234_set_format(struct v4l2_subdev *sd,
s32 vblank_def;
s64 hblank;
int i;
#ifdef V4L2_CID_MIPI_LANES
s32 mipi_lanes = ar0234->mipi_lanes->val;
#endif

for (i = 0; i < ARRAY_SIZE(supported_modes); i++) {
if (supported_modes[i].width != fmt->format.width
Expand All @@ -1981,12 +1957,6 @@ static int ar0234_set_format(struct v4l2_subdev *sd,
dev_dbg(&client->dev, "pixel format doesn't match\n");
continue;
}
#ifdef V4L2_CID_MIPI_LANES
if (supported_modes[i].lanes != mipi_lanes) {
dev_dbg(&client->dev, "mipi lanes doesn't match\n");
continue;
}
#endif
mode = &supported_modes[i];
break;
}
Expand Down
14 changes: 1 addition & 13 deletions drivers/media/i2c/d4xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include <linux/videodev2.h>
#include <linux/version.h>

#define IPU_VC_SIMPLIFIED
#include <linux/ipu-isys.h>

#include <media/media-entity.h>
Expand Down Expand Up @@ -4472,7 +4471,6 @@ static int ds5_fixed_configuration(struct i2c_client *client, struct ds5 *state)
};

//#undef USE_Y
#ifdef USE_Y
/* Override .width, .height, .code */
fmt.format.width = yw;
fmt.format.height = yh;
Expand All @@ -4482,16 +4480,6 @@ static int ds5_fixed_configuration(struct i2c_client *client, struct ds5 *state)
state->motion_t.sensor.streaming = true;
state->depth.sensor.streaming = true;
ret = __ds5_sensor_set_fmt(state, &state->motion_t.sensor, NULL, &fmt);
#else
fmt.format.width = dw;
fmt.format.height = dh;
fmt.format.code = MEDIA_BUS_FMT_UYVY8_1X16;

//state->mux.sd.mode_prop_idx = 1;
state->motion_t.sensor.streaming = false;
state->depth.sensor.streaming = true;
ret = __ds5_sensor_set_fmt(state, &state->depth.sensor, NULL, &fmt);
#endif
if (ret < 0)
return ret;
}
Expand Down Expand Up @@ -4917,7 +4905,7 @@ static int ds5_chrdev_init(struct i2c_client *c, struct ds5 *state)
dev_dbg(&c->dev, "%s(): <Major, Minor>: <%d, %d>\n",
__func__, MAJOR(*dev_num), MINOR(*dev_num));
/* Create a class : appears at /sys/class */
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0)
*ds5_class = class_create(THIS_MODULE, DS5_DRIVER_NAME_CLASS);
#else
*ds5_class = class_create(DS5_DRIVER_NAME_CLASS);
Expand Down
6 changes: 0 additions & 6 deletions drivers/media/i2c/imx390.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@
* end of dummy CID
*/


#define to_imx390(_sd) container_of(_sd, struct imx390, sd)

/**
Expand Down Expand Up @@ -228,8 +227,6 @@ struct imx390_mode {
const struct imx390_reg_list reg_list;
};



struct imx390 {
struct v4l2_subdev sd;
struct media_pad pad;
Expand Down Expand Up @@ -1068,7 +1065,6 @@ static const struct imx390_mode supported_modes[] = {
},
};


static u32 supported_formats[] = {
MEDIA_BUS_FMT_SGRBG12_1X12,
};
Expand Down Expand Up @@ -1455,7 +1451,6 @@ static int imx390_init_controls(struct imx390 *imx390)
IMX390_ANAL_GAIN_MIN, IMX390_ANAL_GAIN_MAX,
IMX390_ANAL_GAIN_STEP, IMX390_ANAL_GAIN_DEFAULT);


imx390->digital_gain = v4l2_ctrl_new_std(ctrl_hdlr, &imx390_ctrl_ops, V4L2_CID_DIGITAL_GAIN,
IMX390_DGTL_GAIN_MIN, IMX390_DGTL_GAIN_MAX,
IMX390_DGTL_GAIN_STEP, IMX390_DGTL_GAIN_DEFAULT);
Expand Down Expand Up @@ -2016,7 +2011,6 @@ static int imx390_probe(struct i2c_client *client)
return ret;
}


ret = imx390_identify_module(imx390);
if (ret) {
dev_err(&client->dev, "failed to find sensor: %d", ret);
Expand Down
Loading

0 comments on commit 23af401

Please sign in to comment.