|
| 1 | +media: v4l2-mediabus: Drop legacy V4L2_MBUS_CSI2_CHANNEL_* flags |
| 2 | + |
| 3 | +jira LE-3262 |
| 4 | +Rebuild_History Non-Buildable kernel-5.14.0-570.22.1.el9_6 |
| 5 | +commit-author Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> |
| 6 | +commit 5a6ac3f4b46fd86d13e1d8ab4a55e4d89f3ab400 |
| 7 | +Empty-Commit: Cherry-Pick Conflicts during history rebuild. |
| 8 | +Will be included in final tarball splat. Ref for failed cherry-pick at: |
| 9 | +ciq/ciq_backports/kernel-5.14.0-570.22.1.el9_6/5a6ac3f4.failed |
| 10 | + |
| 11 | +The V4L2_MBUS_CSI2_CHANNEL_* flags are a legacy API. Only |
| 12 | +V4L2_MBUS_CSI2_CHANNEL_0 is used, set in a single driver, and never |
| 13 | +read. Drop those flags. Virtual channel information should be conveyed |
| 14 | +through frame descriptors instead. |
| 15 | + |
| 16 | + Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> |
| 17 | + Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> |
| 18 | + Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> |
| 19 | +(cherry picked from commit 5a6ac3f4b46fd86d13e1d8ab4a55e4d89f3ab400) |
| 20 | + Signed-off-by: Jonathan Maple <jmaple@ciq.com> |
| 21 | + |
| 22 | +# Conflicts: |
| 23 | +# drivers/media/i2c/adv7180.c |
| 24 | +# include/media/v4l2-mediabus.h |
| 25 | +diff --cc drivers/media/i2c/adv7180.c |
| 26 | +index 811619651329,3ff37a550810..000000000000 |
| 27 | +--- a/drivers/media/i2c/adv7180.c |
| 28 | ++++ b/drivers/media/i2c/adv7180.c |
| 29 | +@@@ -768,8 -784,8 +768,13 @@@ static int adv7180_get_mbus_config(stru |
| 30 | + |
| 31 | + if (state->chip_info->flags & ADV7180_FLAG_MIPI_CSI2) { |
| 32 | + cfg->type = V4L2_MBUS_CSI2_DPHY; |
| 33 | +++<<<<<<< HEAD |
| 34 | + + cfg->flags = V4L2_MBUS_CSI2_1_LANE | |
| 35 | + + V4L2_MBUS_CSI2_CHANNEL_0 | |
| 36 | +++======= |
| 37 | ++ cfg->bus.mipi_csi2.num_data_lanes = 1; |
| 38 | ++ cfg->bus.mipi_csi2.flags = |
| 39 | +++>>>>>>> 5a6ac3f4b46f (media: v4l2-mediabus: Drop legacy V4L2_MBUS_CSI2_CHANNEL_* flags) |
| 40 | + V4L2_MBUS_CSI2_CONTINUOUS_CLOCK; |
| 41 | + } else { |
| 42 | + /* |
| 43 | +diff --cc include/media/v4l2-mediabus.h |
| 44 | +index b77871485306,c6626a22b394..000000000000 |
| 45 | +--- a/include/media/v4l2-mediabus.h |
| 46 | ++++ b/include/media/v4l2-mediabus.h |
| 47 | +@@@ -76,10 -71,54 +71,61 @@@ |
| 48 | + #define V4L2_MBUS_CSI2_CONTINUOUS_CLOCK BIT(8) |
| 49 | + #define V4L2_MBUS_CSI2_NONCONTINUOUS_CLOCK BIT(9) |
| 50 | + |
| 51 | +++<<<<<<< HEAD |
| 52 | + +#define V4L2_MBUS_CSI2_CHANNELS (V4L2_MBUS_CSI2_CHANNEL_0 | \ |
| 53 | + + V4L2_MBUS_CSI2_CHANNEL_1 | \ |
| 54 | + + V4L2_MBUS_CSI2_CHANNEL_2 | \ |
| 55 | + + V4L2_MBUS_CSI2_CHANNEL_3) |
| 56 | +++======= |
| 57 | ++ #define V4L2_MBUS_CSI2_MAX_DATA_LANES 8 |
| 58 | ++ |
| 59 | ++ /** |
| 60 | ++ * struct v4l2_mbus_config_mipi_csi2 - MIPI CSI-2 data bus configuration |
| 61 | ++ * @flags: media bus (V4L2_MBUS_*) flags |
| 62 | ++ * @data_lanes: an array of physical data lane indexes |
| 63 | ++ * @clock_lane: physical lane index of the clock lane |
| 64 | ++ * @num_data_lanes: number of data lanes |
| 65 | ++ * @lane_polarities: polarity of the lanes. The order is the same of |
| 66 | ++ * the physical lanes. |
| 67 | ++ */ |
| 68 | ++ struct v4l2_mbus_config_mipi_csi2 { |
| 69 | ++ unsigned int flags; |
| 70 | ++ unsigned char data_lanes[V4L2_MBUS_CSI2_MAX_DATA_LANES]; |
| 71 | ++ unsigned char clock_lane; |
| 72 | ++ unsigned char num_data_lanes; |
| 73 | ++ bool lane_polarities[1 + V4L2_MBUS_CSI2_MAX_DATA_LANES]; |
| 74 | ++ }; |
| 75 | ++ |
| 76 | ++ /** |
| 77 | ++ * struct v4l2_mbus_config_parallel - parallel data bus configuration |
| 78 | ++ * @flags: media bus (V4L2_MBUS_*) flags |
| 79 | ++ * @bus_width: bus width in bits |
| 80 | ++ * @data_shift: data shift in bits |
| 81 | ++ */ |
| 82 | ++ struct v4l2_mbus_config_parallel { |
| 83 | ++ unsigned int flags; |
| 84 | ++ unsigned char bus_width; |
| 85 | ++ unsigned char data_shift; |
| 86 | ++ }; |
| 87 | ++ |
| 88 | ++ /** |
| 89 | ++ * struct v4l2_mbus_config_mipi_csi1 - CSI-1/CCP2 data bus configuration |
| 90 | ++ * @clock_inv: polarity of clock/strobe signal |
| 91 | ++ * false - not inverted, true - inverted |
| 92 | ++ * @strobe: false - data/clock, true - data/strobe |
| 93 | ++ * @lane_polarity: the polarities of the clock (index 0) and data lanes |
| 94 | ++ * index (1) |
| 95 | ++ * @data_lane: the number of the data lane |
| 96 | ++ * @clock_lane: the number of the clock lane |
| 97 | ++ */ |
| 98 | ++ struct v4l2_mbus_config_mipi_csi1 { |
| 99 | ++ unsigned char clock_inv:1; |
| 100 | ++ unsigned char strobe:1; |
| 101 | ++ bool lane_polarity[2]; |
| 102 | ++ unsigned char data_lane; |
| 103 | ++ unsigned char clock_lane; |
| 104 | ++ }; |
| 105 | +++>>>>>>> 5a6ac3f4b46f (media: v4l2-mediabus: Drop legacy V4L2_MBUS_CSI2_CHANNEL_* flags) |
| 106 | + |
| 107 | + /** |
| 108 | + * enum v4l2_mbus_type - media bus type |
| 109 | +* Unmerged path drivers/media/i2c/adv7180.c |
| 110 | +* Unmerged path include/media/v4l2-mediabus.h |
0 commit comments