Add faster mode for the Librem 5

This commit is contained in:
Martijn Braam
2023-07-20 22:38:21 +02:00
parent 6fbb99a637
commit 23ec7fd7e4
2 changed files with 15 additions and 0 deletions

View File

@@ -21,6 +21,18 @@ Rear: {
{Type: "Mode", Entity: "csi"},
);
},
{
Width: 1052;
Height: 780;
Rate: 30;
Format: "GRBG8";
Rotate: 270;
Pipeline: (
{Type: "Mode", Entity: "s5k3l6xx"},
{Type: "Mode", Entity: "imx8mq-mipi-csi2"},
{Type: "Mode", Entity: "csi"},
);
},
);
};

View File

@@ -274,6 +274,9 @@ libmegapixels_mode_width_to_bytes(int index, uint32_t width)
uint32_t
libmegapixels_mode_width_to_padding(int index, uint32_t width)
{
if (mode_lut[index].bpp == 8) {
return 0;
}
uint64_t bytes_per_width = libmegapixels_mode_width_to_bytes(index, width);
uint64_t remainder = bytes_per_width % 8;
if (remainder == 0)