mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 20:14:06 +02:00
media: ccs: Make supported mbus code bitmask a u64
Prepare for adding more media bus codes. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
026d02ea14
commit
0b216f7f17
|
|
@ -13,6 +13,7 @@
|
|||
* Based on smia-sensor.c by Tuukka Toivonen <tuukkat76@gmail.com>
|
||||
*/
|
||||
|
||||
#include <linux/bits.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/device.h>
|
||||
|
|
@ -1209,7 +1210,7 @@ static int ccs_get_mbus_formats(struct ccs_sensor *sensor)
|
|||
|
||||
dev_dbg(&client->dev, "jolly good! %u\n", j);
|
||||
|
||||
sensor->default_mbus_frame_fmts |= 1 << j;
|
||||
sensor->default_mbus_frame_fmts |= BIT_U64(j);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1242,7 +1243,7 @@ static int ccs_get_mbus_formats(struct ccs_sensor *sensor)
|
|||
f->compressed - sensor->compressed_min_bpp];
|
||||
unsigned int j;
|
||||
|
||||
if (!(sensor->default_mbus_frame_fmts & 1 << i))
|
||||
if (!(sensor->default_mbus_frame_fmts & BIT_U64(i)))
|
||||
continue;
|
||||
|
||||
pll->bits_per_pixel = f->compressed;
|
||||
|
|
@ -2090,7 +2091,7 @@ static const struct ccs_csi_data_format
|
|||
unsigned int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(ccs_csi_data_formats); i++) {
|
||||
if (sensor->mbus_frame_fmts & (1 << i) &&
|
||||
if (sensor->mbus_frame_fmts & BIT_U64(i) &&
|
||||
ccs_csi_data_formats[i].code == code)
|
||||
return &ccs_csi_data_formats[i];
|
||||
}
|
||||
|
|
@ -2120,7 +2121,7 @@ static int ccs_enum_mbus_code(struct v4l2_subdev *subdev,
|
|||
}
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(ccs_csi_data_formats); i++) {
|
||||
if (sensor->mbus_frame_fmts & (1 << i))
|
||||
if (sensor->mbus_frame_fmts & BIT_U64(i))
|
||||
idx++;
|
||||
|
||||
if (idx == code->index) {
|
||||
|
|
|
|||
|
|
@ -222,10 +222,10 @@ struct ccs_sensor {
|
|||
void *ccs_limits;
|
||||
u8 nbinning_subtypes;
|
||||
struct ccs_binning_subtype binning_subtypes[CCS_LIM_BINNING_SUB_TYPE_MAX_N + 1];
|
||||
u32 mbus_frame_fmts;
|
||||
u64 mbus_frame_fmts;
|
||||
const struct ccs_csi_data_format *csi_format;
|
||||
const struct ccs_csi_data_format *internal_csi_format;
|
||||
u32 default_mbus_frame_fmts;
|
||||
u64 default_mbus_frame_fmts;
|
||||
int default_pixel_order;
|
||||
struct ccs_data_container sdata, mdata;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user