Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+68 -50
+1 -1
Documentation/userspace-api/media/v4l/metafmt-arm-mali-c55.rst
··· 44 44 struct v4l2_isp_params_buffer *params = 45 45 (struct v4l2_isp_params_buffer *)buffer; 46 46 47 - params->version = MALI_C55_PARAM_BUFFER_V1; 47 + params->version = V4L2_ISP_PARAMS_VERSION_V1; 48 48 params->data_size = 0; 49 49 50 50 void *data = (void *)params->data;
+11 -17
drivers/media/i2c/ov02c10.c
··· 165 165 {0x3809, 0x88}, 166 166 {0x380a, 0x04}, 167 167 {0x380b, 0x44}, 168 - {0x3810, 0x00}, 169 - {0x3811, 0x02}, 170 - {0x3812, 0x00}, 171 - {0x3813, 0x02}, 172 168 {0x3814, 0x01}, 173 169 {0x3815, 0x01}, 174 170 {0x3816, 0x01}, 175 171 {0x3817, 0x01}, 176 172 177 - {0x3820, 0xa0}, 173 + {0x3820, 0xa8}, 178 174 {0x3821, 0x00}, 179 175 {0x3822, 0x80}, 180 176 {0x3823, 0x08}, ··· 381 385 struct v4l2_ctrl *vblank; 382 386 struct v4l2_ctrl *hblank; 383 387 struct v4l2_ctrl *exposure; 384 - struct v4l2_ctrl *hflip; 385 - struct v4l2_ctrl *vflip; 386 388 387 389 struct clk *img_clk; 388 390 struct gpio_desc *reset; ··· 459 465 break; 460 466 461 467 case V4L2_CID_HFLIP: 468 + cci_write(ov02c10->regmap, OV02C10_ISP_X_WIN_CONTROL, 469 + ctrl->val ? 2 : 1, &ret); 462 470 cci_update_bits(ov02c10->regmap, OV02C10_ROTATE_CONTROL, 463 - BIT(3), ov02c10->hflip->val << 3, &ret); 471 + BIT(3), ctrl->val ? 0 : BIT(3), &ret); 464 472 break; 465 473 466 474 case V4L2_CID_VFLIP: 475 + cci_write(ov02c10->regmap, OV02C10_ISP_Y_WIN_CONTROL, 476 + ctrl->val ? 2 : 1, &ret); 467 477 cci_update_bits(ov02c10->regmap, OV02C10_ROTATE_CONTROL, 468 - BIT(4), ov02c10->vflip->val << 4, &ret); 478 + BIT(4), ctrl->val << 4, &ret); 469 479 break; 470 480 471 481 default: ··· 547 549 OV02C10_EXPOSURE_STEP, 548 550 exposure_max); 549 551 550 - ov02c10->hflip = v4l2_ctrl_new_std(ctrl_hdlr, &ov02c10_ctrl_ops, 551 - V4L2_CID_HFLIP, 0, 1, 1, 0); 552 - if (ov02c10->hflip) 553 - ov02c10->hflip->flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT; 552 + v4l2_ctrl_new_std(ctrl_hdlr, &ov02c10_ctrl_ops, V4L2_CID_HFLIP, 553 + 0, 1, 1, 0); 554 554 555 - ov02c10->vflip = v4l2_ctrl_new_std(ctrl_hdlr, &ov02c10_ctrl_ops, 556 - V4L2_CID_VFLIP, 0, 1, 1, 0); 557 - if (ov02c10->vflip) 558 - ov02c10->vflip->flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT; 555 + v4l2_ctrl_new_std(ctrl_hdlr, &ov02c10_ctrl_ops, V4L2_CID_VFLIP, 556 + 0, 1, 1, 0); 559 557 560 558 v4l2_ctrl_new_std_menu_items(ctrl_hdlr, &ov02c10_ctrl_ops, 561 559 V4L2_CID_TEST_PATTERN,
+1 -1
drivers/media/pci/intel/Kconfig
··· 6 6 7 7 config IPU_BRIDGE 8 8 tristate "Intel IPU Bridge" 9 - depends on ACPI || COMPILE_TEST 9 + depends on ACPI 10 10 depends on I2C 11 11 help 12 12 The IPU bridge is a helper library for Intel IPU drivers to
+29
drivers/media/pci/intel/ipu-bridge.c
··· 5 5 #include <acpi/acpi_bus.h> 6 6 #include <linux/cleanup.h> 7 7 #include <linux/device.h> 8 + #include <linux/dmi.h> 8 9 #include <linux/i2c.h> 9 10 #include <linux/mei_cl_bus.h> 10 11 #include <linux/platform_device.h> ··· 97 96 IPU_SENSOR_CONFIG("SONY471A", 1, 200000000), 98 97 /* Toshiba T4KA3 */ 99 98 IPU_SENSOR_CONFIG("XMCC0003", 1, 321468000), 99 + }; 100 + 101 + /* 102 + * DMI matches for laptops which have their sensor mounted upside-down 103 + * without reporting a rotation of 180° in neither the SSDB nor the _PLD. 104 + */ 105 + static const struct dmi_system_id upside_down_sensor_dmi_ids[] = { 106 + { 107 + .matches = { 108 + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."), 109 + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "XPS 13 9350"), 110 + }, 111 + .driver_data = "OVTI02C1", 112 + }, 113 + { 114 + .matches = { 115 + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."), 116 + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "XPS 16 9640"), 117 + }, 118 + .driver_data = "OVTI02C1", 119 + }, 120 + {} /* Terminating entry */ 100 121 }; 101 122 102 123 static const struct ipu_property_names prop_names = { ··· 271 248 static u32 ipu_bridge_parse_rotation(struct acpi_device *adev, 272 249 struct ipu_sensor_ssdb *ssdb) 273 250 { 251 + const struct dmi_system_id *dmi_id; 252 + 253 + dmi_id = dmi_first_match(upside_down_sensor_dmi_ids); 254 + if (dmi_id && acpi_dev_hid_match(adev, dmi_id->driver_data)) 255 + return 180; 256 + 274 257 switch (ssdb->degree) { 275 258 case IPU_SENSOR_ROTATION_NORMAL: 276 259 return 0;
-7
drivers/media/platform/arm/mali-c55/mali-c55-params.c
··· 582 582 struct mali_c55 *mali_c55 = params->mali_c55; 583 583 int ret; 584 584 585 - if (config->version != MALI_C55_PARAM_BUFFER_V1) { 586 - dev_dbg(mali_c55->dev, 587 - "Unsupported extensible format version: %u\n", 588 - config->version); 589 - return -EINVAL; 590 - } 591 - 592 585 ret = v4l2_isp_params_validate_buffer_size(mali_c55->dev, vb, 593 586 v4l2_isp_params_buffer_size(MALI_C55_PARAMS_MAX_SIZE)); 594 587 if (ret)
+26 -15
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
··· 96 96 97 97 #define VSRSTS_RETRIES 20 98 98 99 - #define RZG2L_CSI2_MIN_WIDTH 320 100 - #define RZG2L_CSI2_MIN_HEIGHT 240 101 - #define RZG2L_CSI2_MAX_WIDTH 2800 102 - #define RZG2L_CSI2_MAX_HEIGHT 4095 103 - 104 - #define RZG2L_CSI2_DEFAULT_WIDTH RZG2L_CSI2_MIN_WIDTH 105 - #define RZG2L_CSI2_DEFAULT_HEIGHT RZG2L_CSI2_MIN_HEIGHT 106 99 #define RZG2L_CSI2_DEFAULT_FMT MEDIA_BUS_FMT_UYVY8_1X16 107 100 108 101 enum rzg2l_csi2_pads { ··· 130 137 int (*dphy_enable)(struct rzg2l_csi2 *csi2); 131 138 int (*dphy_disable)(struct rzg2l_csi2 *csi2); 132 139 bool has_system_clk; 140 + unsigned int min_width; 141 + unsigned int min_height; 142 + unsigned int max_width; 143 + unsigned int max_height; 133 144 }; 134 145 135 146 struct rzg2l_csi2_timings { ··· 415 418 .dphy_enable = rzg2l_csi2_dphy_enable, 416 419 .dphy_disable = rzg2l_csi2_dphy_disable, 417 420 .has_system_clk = true, 421 + .min_width = 320, 422 + .min_height = 240, 423 + .max_width = 2800, 424 + .max_height = 4095, 418 425 }; 419 426 420 427 static int rzg2l_csi2_dphy_setting(struct v4l2_subdev *sd, bool on) ··· 543 542 .dphy_enable = rzv2h_csi2_dphy_enable, 544 543 .dphy_disable = rzv2h_csi2_dphy_disable, 545 544 .has_system_clk = false, 545 + .min_width = 320, 546 + .min_height = 240, 547 + .max_width = 4096, 548 + .max_height = 4096, 546 549 }; 547 550 548 551 static int rzg2l_csi2_mipi_link_setting(struct v4l2_subdev *sd, bool on) ··· 636 631 struct v4l2_subdev_state *state, 637 632 struct v4l2_subdev_format *fmt) 638 633 { 634 + struct rzg2l_csi2 *csi2 = sd_to_csi2(sd); 639 635 struct v4l2_mbus_framefmt *src_format; 640 636 struct v4l2_mbus_framefmt *sink_format; 641 637 ··· 659 653 sink_format->ycbcr_enc = fmt->format.ycbcr_enc; 660 654 sink_format->quantization = fmt->format.quantization; 661 655 sink_format->width = clamp_t(u32, fmt->format.width, 662 - RZG2L_CSI2_MIN_WIDTH, RZG2L_CSI2_MAX_WIDTH); 656 + csi2->info->min_width, 657 + csi2->info->max_width); 663 658 sink_format->height = clamp_t(u32, fmt->format.height, 664 - RZG2L_CSI2_MIN_HEIGHT, RZG2L_CSI2_MAX_HEIGHT); 659 + csi2->info->min_height, 660 + csi2->info->max_height); 665 661 fmt->format = *sink_format; 666 662 667 663 /* propagate format to source pad */ ··· 676 668 struct v4l2_subdev_state *sd_state) 677 669 { 678 670 struct v4l2_subdev_format fmt = { .pad = RZG2L_CSI2_SINK, }; 671 + struct rzg2l_csi2 *csi2 = sd_to_csi2(sd); 679 672 680 - fmt.format.width = RZG2L_CSI2_DEFAULT_WIDTH; 681 - fmt.format.height = RZG2L_CSI2_DEFAULT_HEIGHT; 673 + fmt.format.width = csi2->info->min_width; 674 + fmt.format.height = csi2->info->min_height; 682 675 fmt.format.field = V4L2_FIELD_NONE; 683 676 fmt.format.code = RZG2L_CSI2_DEFAULT_FMT; 684 677 fmt.format.colorspace = V4L2_COLORSPACE_SRGB; ··· 706 697 struct v4l2_subdev_state *sd_state, 707 698 struct v4l2_subdev_frame_size_enum *fse) 708 699 { 700 + struct rzg2l_csi2 *csi2 = sd_to_csi2(sd); 701 + 709 702 if (fse->index != 0) 710 703 return -EINVAL; 711 704 712 705 if (!rzg2l_csi2_code_to_fmt(fse->code)) 713 706 return -EINVAL; 714 707 715 - fse->min_width = RZG2L_CSI2_MIN_WIDTH; 716 - fse->min_height = RZG2L_CSI2_MIN_HEIGHT; 717 - fse->max_width = RZG2L_CSI2_MAX_WIDTH; 718 - fse->max_height = RZG2L_CSI2_MAX_HEIGHT; 708 + fse->min_width = csi2->info->min_width; 709 + fse->min_height = csi2->info->min_height; 710 + fse->max_width = csi2->info->max_width; 711 + fse->max_height = csi2->info->max_height; 719 712 720 713 return 0; 721 714 }
-9
include/uapi/linux/media/arm/mali-c55-config.h
··· 195 195 } __attribute__((packed)); 196 196 197 197 /** 198 - * enum mali_c55_param_buffer_version - Mali-C55 parameters block versioning 199 - * 200 - * @MALI_C55_PARAM_BUFFER_V1: First version of Mali-C55 parameters block 201 - */ 202 - enum mali_c55_param_buffer_version { 203 - MALI_C55_PARAM_BUFFER_V1, 204 - }; 205 - 206 - /** 207 198 * enum mali_c55_param_block_type - Enumeration of Mali-C55 parameter blocks 208 199 * 209 200 * This enumeration defines the types of Mali-C55 parameters block. Each block