Commit d19954ee authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents c537e12d 69d6c6fc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
+11 −17
Original line number Diff line number Diff line
@@ -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,
+1 −1
Original line number Diff line number Diff line
@@ -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
+29 −0
Original line number Diff line number Diff line
@@ -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;
+0 −7
Original line number Diff line number Diff line
@@ -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)
Loading