[GIT PULL for v6.19-rc6] media fixes

-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE+QmuaPwR3wnBdVwACF8+vY7k4RUFAmlnqP0ACgkQCF8+vY7k
 4RVz9w/+P5aS+tLXMKIu/1GzCHUkQ41kUtx8irZ2kTBHpKTfvNyh4zp+hkOkIrgn
 NAfNoOogAFgAgPoFT4xPnF+wRdER+oqmlbtu4zvVAPtG4By6lHs6QjrT8k4LKYG2
 L/ItH6LCGKt9WiYVBpdp7rHUAPiUyVJnzYUQRu7uyGclJFNIDs2EhCl4/KAwol1a
 yILpU6DiJz75TwtohdNeJ1E4/sXLW7f35aUgF0OqxkOnROGGk09aUAsNkxeh9EVR
 CeXd6cnKWFlbGgcdoZ1tjHlxSFdDHho1wUxhHmK5eyPgLwYmAGHfzt7cFlyxPLYE
 I9fsGHe4yKDXy6A1va5EVNyyI05OpsYaFsu48NeSdpkGe5gYXRbSLkcXuSsMmNCs
 x/MXIMOdTaEEO6jI8YH5/VRUUvj0FKdlpbo391aZfVJZc9sSr23Q9kN/hjllJd5G
 zEy4U31yzN9y8s3GQVxRPnKlIC/dul/cpNNAFJfUW7Bzjp/APuv73NKyIUmELGOV
 Vsu67cDmfDg/aG6ov5+mY2DnXKahoLmHaLcgDF4CYRny8qM+/0l40425hX7z9wgt
 pXxGjEXp5l6rFWqMIL+bUkBJTJpXcFadX0sqwWPiUllvNrBlxyT81x6LKyn8TH6C
 8vCPPewojbholFXe6FBZzVXclPwLnQBlX6nzIOkNnBM0xbD6xg8=
 =XjkH
 -----END PGP SIGNATURE-----

Merge tag 'media/v6.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media fixes from Mauro Carvalho Chehab:

 - ov02c10: some fixes related to preserving bayer pattern and
   horizontal control

 - ipu-bridge: Add quirks for some Dell XPS laptops with inverted
   sensors

 - mali-c55: Fix version identifier logic

 - rzg2l-cru: csi-2: fix RZ/V2H input sizes on some variants

* tag 'media/v6.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  media: ov02c10: Remove unnecessary hflip and vflip pointers
  media: ipu-bridge: Add DMI quirk for Dell XPS laptops with upside down sensors
  media: ov02c10: Fix the horizontal flip control
  media: ov02c10: Adjust x-win/y-win when changing flipping to preserve bayer-pattern
  media: ov02c10: Fix bayer-pattern change after default vflip change
  media: rzg2l-cru: csi-2: Support RZ/V2H input sizes
  media: uapi: mali-c55-config: Remove version identifier
  media: mali-c55: Remove duplicated version check
  media: Documentation: mali-c55: Use v4l2-isp version identifier
This commit is contained in:
Linus Torvalds 2026-01-14 08:18:01 -08:00
commit d19954ee63
7 changed files with 68 additions and 50 deletions

View File

@ -44,7 +44,7 @@ member and userspace must populate the type member with a value from
struct v4l2_isp_params_buffer *params =
(struct v4l2_isp_params_buffer *)buffer;
params->version = MALI_C55_PARAM_BUFFER_V1;
params->version = V4L2_ISP_PARAMS_VERSION_V1;
params->data_size = 0;
void *data = (void *)params->data;

View File

@ -165,16 +165,12 @@ static const struct reg_sequence sensor_1928x1092_30fps_setting[] = {
{0x3809, 0x88},
{0x380a, 0x04},
{0x380b, 0x44},
{0x3810, 0x00},
{0x3811, 0x02},
{0x3812, 0x00},
{0x3813, 0x02},
{0x3814, 0x01},
{0x3815, 0x01},
{0x3816, 0x01},
{0x3817, 0x01},
{0x3820, 0xa0},
{0x3820, 0xa8},
{0x3821, 0x00},
{0x3822, 0x80},
{0x3823, 0x08},
@ -385,8 +381,6 @@ struct ov02c10 {
struct v4l2_ctrl *vblank;
struct v4l2_ctrl *hblank;
struct v4l2_ctrl *exposure;
struct v4l2_ctrl *hflip;
struct v4l2_ctrl *vflip;
struct clk *img_clk;
struct gpio_desc *reset;
@ -465,13 +459,17 @@ static int ov02c10_set_ctrl(struct v4l2_ctrl *ctrl)
break;
case V4L2_CID_HFLIP:
cci_write(ov02c10->regmap, OV02C10_ISP_X_WIN_CONTROL,
ctrl->val ? 2 : 1, &ret);
cci_update_bits(ov02c10->regmap, OV02C10_ROTATE_CONTROL,
BIT(3), ov02c10->hflip->val << 3, &ret);
BIT(3), ctrl->val ? 0 : BIT(3), &ret);
break;
case V4L2_CID_VFLIP:
cci_write(ov02c10->regmap, OV02C10_ISP_Y_WIN_CONTROL,
ctrl->val ? 2 : 1, &ret);
cci_update_bits(ov02c10->regmap, OV02C10_ROTATE_CONTROL,
BIT(4), ov02c10->vflip->val << 4, &ret);
BIT(4), ctrl->val << 4, &ret);
break;
default:
@ -549,15 +547,11 @@ static int ov02c10_init_controls(struct ov02c10 *ov02c10)
OV02C10_EXPOSURE_STEP,
exposure_max);
ov02c10->hflip = v4l2_ctrl_new_std(ctrl_hdlr, &ov02c10_ctrl_ops,
V4L2_CID_HFLIP, 0, 1, 1, 0);
if (ov02c10->hflip)
ov02c10->hflip->flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT;
v4l2_ctrl_new_std(ctrl_hdlr, &ov02c10_ctrl_ops, V4L2_CID_HFLIP,
0, 1, 1, 0);
ov02c10->vflip = v4l2_ctrl_new_std(ctrl_hdlr, &ov02c10_ctrl_ops,
V4L2_CID_VFLIP, 0, 1, 1, 0);
if (ov02c10->vflip)
ov02c10->vflip->flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT;
v4l2_ctrl_new_std(ctrl_hdlr, &ov02c10_ctrl_ops, V4L2_CID_VFLIP,
0, 1, 1, 0);
v4l2_ctrl_new_std_menu_items(ctrl_hdlr, &ov02c10_ctrl_ops,
V4L2_CID_TEST_PATTERN,

View File

@ -6,7 +6,7 @@ source "drivers/media/pci/intel/ivsc/Kconfig"
config IPU_BRIDGE
tristate "Intel IPU Bridge"
depends on ACPI || COMPILE_TEST
depends on ACPI
depends on I2C
help
The IPU bridge is a helper library for Intel IPU drivers to

View File

@ -5,6 +5,7 @@
#include <acpi/acpi_bus.h>
#include <linux/cleanup.h>
#include <linux/device.h>
#include <linux/dmi.h>
#include <linux/i2c.h>
#include <linux/mei_cl_bus.h>
#include <linux/platform_device.h>
@ -98,6 +99,28 @@ static const struct ipu_sensor_config ipu_supported_sensors[] = {
IPU_SENSOR_CONFIG("XMCC0003", 1, 321468000),
};
/*
* DMI matches for laptops which have their sensor mounted upside-down
* without reporting a rotation of 180° in neither the SSDB nor the _PLD.
*/
static const struct dmi_system_id upside_down_sensor_dmi_ids[] = {
{
.matches = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "XPS 13 9350"),
},
.driver_data = "OVTI02C1",
},
{
.matches = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "XPS 16 9640"),
},
.driver_data = "OVTI02C1",
},
{} /* Terminating entry */
};
static const struct ipu_property_names prop_names = {
.clock_frequency = "clock-frequency",
.rotation = "rotation",
@ -248,6 +271,12 @@ static int ipu_bridge_read_acpi_buffer(struct acpi_device *adev, char *id,
static u32 ipu_bridge_parse_rotation(struct acpi_device *adev,
struct ipu_sensor_ssdb *ssdb)
{
const struct dmi_system_id *dmi_id;
dmi_id = dmi_first_match(upside_down_sensor_dmi_ids);
if (dmi_id && acpi_dev_hid_match(adev, dmi_id->driver_data))
return 180;
switch (ssdb->degree) {
case IPU_SENSOR_ROTATION_NORMAL:
return 0;

View File

@ -582,13 +582,6 @@ static int mali_c55_params_buf_prepare(struct vb2_buffer *vb)
struct mali_c55 *mali_c55 = params->mali_c55;
int ret;
if (config->version != MALI_C55_PARAM_BUFFER_V1) {
dev_dbg(mali_c55->dev,
"Unsupported extensible format version: %u\n",
config->version);
return -EINVAL;
}
ret = v4l2_isp_params_validate_buffer_size(mali_c55->dev, vb,
v4l2_isp_params_buffer_size(MALI_C55_PARAMS_MAX_SIZE));
if (ret)

View File

@ -96,13 +96,6 @@
#define VSRSTS_RETRIES 20
#define RZG2L_CSI2_MIN_WIDTH 320
#define RZG2L_CSI2_MIN_HEIGHT 240
#define RZG2L_CSI2_MAX_WIDTH 2800
#define RZG2L_CSI2_MAX_HEIGHT 4095
#define RZG2L_CSI2_DEFAULT_WIDTH RZG2L_CSI2_MIN_WIDTH
#define RZG2L_CSI2_DEFAULT_HEIGHT RZG2L_CSI2_MIN_HEIGHT
#define RZG2L_CSI2_DEFAULT_FMT MEDIA_BUS_FMT_UYVY8_1X16
enum rzg2l_csi2_pads {
@ -137,6 +130,10 @@ struct rzg2l_csi2_info {
int (*dphy_enable)(struct rzg2l_csi2 *csi2);
int (*dphy_disable)(struct rzg2l_csi2 *csi2);
bool has_system_clk;
unsigned int min_width;
unsigned int min_height;
unsigned int max_width;
unsigned int max_height;
};
struct rzg2l_csi2_timings {
@ -418,6 +415,10 @@ static const struct rzg2l_csi2_info rzg2l_csi2_info = {
.dphy_enable = rzg2l_csi2_dphy_enable,
.dphy_disable = rzg2l_csi2_dphy_disable,
.has_system_clk = true,
.min_width = 320,
.min_height = 240,
.max_width = 2800,
.max_height = 4095,
};
static int rzg2l_csi2_dphy_setting(struct v4l2_subdev *sd, bool on)
@ -542,6 +543,10 @@ static const struct rzg2l_csi2_info rzv2h_csi2_info = {
.dphy_enable = rzv2h_csi2_dphy_enable,
.dphy_disable = rzv2h_csi2_dphy_disable,
.has_system_clk = false,
.min_width = 320,
.min_height = 240,
.max_width = 4096,
.max_height = 4096,
};
static int rzg2l_csi2_mipi_link_setting(struct v4l2_subdev *sd, bool on)
@ -631,6 +636,7 @@ static int rzg2l_csi2_set_format(struct v4l2_subdev *sd,
struct v4l2_subdev_state *state,
struct v4l2_subdev_format *fmt)
{
struct rzg2l_csi2 *csi2 = sd_to_csi2(sd);
struct v4l2_mbus_framefmt *src_format;
struct v4l2_mbus_framefmt *sink_format;
@ -653,9 +659,11 @@ static int rzg2l_csi2_set_format(struct v4l2_subdev *sd,
sink_format->ycbcr_enc = fmt->format.ycbcr_enc;
sink_format->quantization = fmt->format.quantization;
sink_format->width = clamp_t(u32, fmt->format.width,
RZG2L_CSI2_MIN_WIDTH, RZG2L_CSI2_MAX_WIDTH);
csi2->info->min_width,
csi2->info->max_width);
sink_format->height = clamp_t(u32, fmt->format.height,
RZG2L_CSI2_MIN_HEIGHT, RZG2L_CSI2_MAX_HEIGHT);
csi2->info->min_height,
csi2->info->max_height);
fmt->format = *sink_format;
/* propagate format to source pad */
@ -668,9 +676,10 @@ static int rzg2l_csi2_init_state(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state)
{
struct v4l2_subdev_format fmt = { .pad = RZG2L_CSI2_SINK, };
struct rzg2l_csi2 *csi2 = sd_to_csi2(sd);
fmt.format.width = RZG2L_CSI2_DEFAULT_WIDTH;
fmt.format.height = RZG2L_CSI2_DEFAULT_HEIGHT;
fmt.format.width = csi2->info->min_width;
fmt.format.height = csi2->info->min_height;
fmt.format.field = V4L2_FIELD_NONE;
fmt.format.code = RZG2L_CSI2_DEFAULT_FMT;
fmt.format.colorspace = V4L2_COLORSPACE_SRGB;
@ -697,16 +706,18 @@ static int rzg2l_csi2_enum_frame_size(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_frame_size_enum *fse)
{
struct rzg2l_csi2 *csi2 = sd_to_csi2(sd);
if (fse->index != 0)
return -EINVAL;
if (!rzg2l_csi2_code_to_fmt(fse->code))
return -EINVAL;
fse->min_width = RZG2L_CSI2_MIN_WIDTH;
fse->min_height = RZG2L_CSI2_MIN_HEIGHT;
fse->max_width = RZG2L_CSI2_MAX_WIDTH;
fse->max_height = RZG2L_CSI2_MAX_HEIGHT;
fse->min_width = csi2->info->min_width;
fse->min_height = csi2->info->min_height;
fse->max_width = csi2->info->max_width;
fse->max_height = csi2->info->max_height;
return 0;
}

View File

@ -194,15 +194,6 @@ struct mali_c55_stats_buffer {
__u32 reserved3[15];
} __attribute__((packed));
/**
* enum mali_c55_param_buffer_version - Mali-C55 parameters block versioning
*
* @MALI_C55_PARAM_BUFFER_V1: First version of Mali-C55 parameters block
*/
enum mali_c55_param_buffer_version {
MALI_C55_PARAM_BUFFER_V1,
};
/**
* enum mali_c55_param_block_type - Enumeration of Mali-C55 parameter blocks
*