Skip to content

Commit 7766ae8

Browse files
committed
drm/vkms: Change YUV helpers to support u16 inputs for conversion
Some YUV format uses 16 bit values, so change the helper function for conversion to support those new formats. Reviewed-by: Maíra Canal <mcanal@igalia.com> Acked-by: Daniel Stone <daniels@collabora.com> Link: https://lore.kernel.org/r/20250703-b4-new-color-formats-v7-6-15fd8fd2e15c@bootlin.com Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
1 parent 50c58f4 commit 7766ae8

3 files changed

Lines changed: 85 additions & 84 deletions

File tree

drivers/gpu/drm/vkms/tests/vkms_format_test.c

Lines changed: 71 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@
1414
MODULE_IMPORT_NS("EXPORTED_FOR_KUNIT_TESTING");
1515

1616
/**
17-
* struct pixel_yuv_u8 - Internal representation of a pixel color.
18-
* @y: Luma value, stored in 8 bits, without padding, using
17+
* struct pixel_yuv_u16 - Internal representation of a pixel color.
18+
* @y: Luma value, stored in 16 bits, without padding, using
1919
* machine endianness
20-
* @u: Blue difference chroma value, stored in 8 bits, without padding, using
20+
* @u: Blue difference chroma value, stored in 16 bits, without padding, using
2121
* machine endianness
22-
* @v: Red difference chroma value, stored in 8 bits, without padding, using
22+
* @v: Red difference chroma value, stored in 16 bits, without padding, using
2323
* machine endianness
2424
*/
25-
struct pixel_yuv_u8 {
26-
u8 y, u, v;
25+
struct pixel_yuv_u16 {
26+
u16 y, u, v;
2727
};
2828

2929
/*
30-
* struct yuv_u8_to_argb_u16_case - Reference values to test the color
30+
* struct yuv_u16_to_argb_u16_case - Reference values to test the color
3131
* conversions in VKMS between YUV to ARGB
3232
*
3333
* @encoding: Encoding used to convert RGB to YUV
@@ -39,13 +39,13 @@ struct pixel_yuv_u8 {
3939
* @format_pair.yuv: Same color as @format_pair.rgb, but converted to
4040
* YUV using @encoding and @range.
4141
*/
42-
struct yuv_u8_to_argb_u16_case {
42+
struct yuv_u16_to_argb_u16_case {
4343
enum drm_color_encoding encoding;
4444
enum drm_color_range range;
4545
size_t n_colors;
4646
struct format_pair {
4747
char *name;
48-
struct pixel_yuv_u8 yuv;
48+
struct pixel_yuv_u16 yuv;
4949
struct pixel_argb_u16 argb;
5050
} colors[TEST_BUFF_SIZE];
5151
};
@@ -57,14 +57,14 @@ struct yuv_u8_to_argb_u16_case {
5757
* For more information got to the docs:
5858
* https://colour.readthedocs.io/en/master/generated/colour.RGB_to_YCbCr.html
5959
*/
60-
static struct yuv_u8_to_argb_u16_case yuv_u8_to_argb_u16_cases[] = {
60+
static struct yuv_u16_to_argb_u16_case yuv_u16_to_argb_u16_cases[] = {
6161
/*
6262
* colour.RGB_to_YCbCr(<rgb color in 16 bit form>,
6363
* K=colour.WEIGHTS_YCBCR["ITU-R BT.601"],
6464
* in_bits = 16,
6565
* in_legal = False,
6666
* in_int = True,
67-
* out_bits = 8,
67+
* out_bits = 16,
6868
* out_legal = False,
6969
* out_int = True)
7070
*
@@ -76,21 +76,21 @@ static struct yuv_u8_to_argb_u16_case yuv_u8_to_argb_u16_cases[] = {
7676
.range = DRM_COLOR_YCBCR_FULL_RANGE,
7777
.n_colors = 6,
7878
.colors = {
79-
{ "white", { 0xff, 0x80, 0x80 }, { 0xffff, 0xffff, 0xffff, 0xffff }},
80-
{ "gray", { 0x80, 0x80, 0x80 }, { 0xffff, 0x8080, 0x8080, 0x8080 }},
81-
{ "black", { 0x00, 0x80, 0x80 }, { 0xffff, 0x0000, 0x0000, 0x0000 }},
82-
{ "red", { 0x4c, 0x55, 0xff }, { 0xffff, 0xffff, 0x0000, 0x0000 }},
83-
{ "green", { 0x96, 0x2c, 0x15 }, { 0xffff, 0x0000, 0xffff, 0x0000 }},
84-
{ "blue", { 0x1d, 0xff, 0x6b }, { 0xffff, 0x0000, 0x0000, 0xffff }},
85-
},
79+
{ "white", { 0xffff, 0x8000, 0x8000 }, { 0xffff, 0xffff, 0xffff, 0xffff }},
80+
{ "gray", { 0x8080, 0x8000, 0x8000 }, { 0xffff, 0x8080, 0x8080, 0x8080 }},
81+
{ "black", { 0x0000, 0x8000, 0x8000 }, { 0xffff, 0x0000, 0x0000, 0x0000 }},
82+
{ "red", { 0x4c8b, 0x54ce, 0xffff }, { 0xffff, 0xffff, 0x0000, 0x0000 }},
83+
{ "green", { 0x9645, 0x2b33, 0x14d1 }, { 0xffff, 0x0000, 0xffff, 0x0000 }},
84+
{ "blue", { 0x1d2f, 0xffff, 0x6b2f }, { 0xffff, 0x0000, 0x0000, 0xffff }},
85+
}
8686
},
8787
/*
8888
* colour.RGB_to_YCbCr(<rgb color in 16 bit form>,
8989
* K=colour.WEIGHTS_YCBCR["ITU-R BT.601"],
9090
* in_bits = 16,
9191
* in_legal = False,
9292
* in_int = True,
93-
* out_bits = 8,
93+
* out_bits = 16,
9494
* out_legal = True,
9595
* out_int = True)
9696
* Tests cases for color conversion generated by converting RGB
@@ -101,21 +101,21 @@ static struct yuv_u8_to_argb_u16_case yuv_u8_to_argb_u16_cases[] = {
101101
.range = DRM_COLOR_YCBCR_LIMITED_RANGE,
102102
.n_colors = 6,
103103
.colors = {
104-
{ "white", { 0xeb, 0x80, 0x80 }, { 0xffff, 0xffff, 0xffff, 0xffff }},
105-
{ "gray", { 0x7e, 0x80, 0x80 }, { 0xffff, 0x8080, 0x8080, 0x8080 }},
106-
{ "black", { 0x10, 0x80, 0x80 }, { 0xffff, 0x0000, 0x0000, 0x0000 }},
107-
{ "red", { 0x51, 0x5a, 0xf0 }, { 0xffff, 0xffff, 0x0000, 0x0000 }},
108-
{ "green", { 0x91, 0x36, 0x22 }, { 0xffff, 0x0000, 0xffff, 0x0000 }},
109-
{ "blue", { 0x29, 0xf0, 0x6e }, { 0xffff, 0x0000, 0x0000, 0xffff }},
110-
},
104+
{ "white", { 0xeb00, 0x8000, 0x8000 }, { 0xffff, 0xffff, 0xffff, 0xffff }},
105+
{ "gray", { 0x7dee, 0x8000, 0x8000 }, { 0xffff, 0x8080, 0x8080, 0x8080 }},
106+
{ "black", { 0x1000, 0x8000, 0x8000 }, { 0xffff, 0x0000, 0x0000, 0x0000 }},
107+
{ "red", { 0x517b, 0x5a34, 0xf000 }, { 0xffff, 0xffff, 0x0000, 0x0000 }},
108+
{ "green", { 0x908e, 0x35cc, 0x2237 }, { 0xffff, 0x0000, 0xffff, 0x0000 }},
109+
{ "blue", { 0x28f7, 0xf000, 0x6dc9 }, { 0xffff, 0x0000, 0x0000, 0xffff }},
110+
}
111111
},
112112
/*
113113
* colour.RGB_to_YCbCr(<rgb color in 16 bit form>,
114114
* K=colour.WEIGHTS_YCBCR["ITU-R BT.709"],
115115
* in_bits = 16,
116116
* in_legal = False,
117117
* in_int = True,
118-
* out_bits = 8,
118+
* out_bits = 16,
119119
* out_legal = False,
120120
* out_int = True)
121121
* Tests cases for color conversion generated by converting RGB
@@ -126,21 +126,21 @@ static struct yuv_u8_to_argb_u16_case yuv_u8_to_argb_u16_cases[] = {
126126
.range = DRM_COLOR_YCBCR_FULL_RANGE,
127127
.n_colors = 6,
128128
.colors = {
129-
{ "white", { 0xff, 0x80, 0x80 }, { 0xffff, 0xffff, 0xffff, 0xffff }},
130-
{ "gray", { 0x80, 0x80, 0x80 }, { 0xffff, 0x8080, 0x8080, 0x8080 }},
131-
{ "black", { 0x00, 0x80, 0x80 }, { 0xffff, 0x0000, 0x0000, 0x0000 }},
132-
{ "red", { 0x36, 0x63, 0xff }, { 0xffff, 0xffff, 0x0000, 0x0000 }},
133-
{ "green", { 0xb6, 0x1e, 0x0c }, { 0xffff, 0x0000, 0xffff, 0x0000 }},
134-
{ "blue", { 0x12, 0xff, 0x74 }, { 0xffff, 0x0000, 0x0000, 0xffff }},
135-
},
129+
{ "white", { 0xffff, 0x8000, 0x8000 }, { 0xffff, 0xffff, 0xffff, 0xffff }},
130+
{ "gray", { 0x8080, 0x8000, 0x8000 }, { 0xffff, 0x8080, 0x8080, 0x8080 }},
131+
{ "black", { 0x0000, 0x8000, 0x8000 }, { 0xffff, 0x0000, 0x0000, 0x0000 }},
132+
{ "red", { 0x366d, 0x62ac, 0xffff }, { 0xffff, 0xffff, 0x0000, 0x0000 }},
133+
{ "green", { 0xb717, 0x1d55, 0x0bbd }, { 0xffff, 0x0000, 0xffff, 0x0000 }},
134+
{ "blue", { 0x127c, 0xffff, 0x7443 }, { 0xffff, 0x0000, 0x0000, 0xffff }},
135+
}
136136
},
137137
/*
138138
* colour.RGB_to_YCbCr(<rgb color in 16 bit form>,
139139
* K=colour.WEIGHTS_YCBCR["ITU-R BT.709"],
140140
* in_bits = 16,
141-
* int_legal = False,
141+
* in_legal = False,
142142
* in_int = True,
143-
* out_bits = 8,
143+
* out_bits = 16,
144144
* out_legal = True,
145145
* out_int = True)
146146
* Tests cases for color conversion generated by converting RGB
@@ -151,21 +151,21 @@ static struct yuv_u8_to_argb_u16_case yuv_u8_to_argb_u16_cases[] = {
151151
.range = DRM_COLOR_YCBCR_LIMITED_RANGE,
152152
.n_colors = 6,
153153
.colors = {
154-
{ "white", { 0xeb, 0x80, 0x80 }, { 0xffff, 0xffff, 0xffff, 0xffff }},
155-
{ "gray", { 0x7e, 0x80, 0x80 }, { 0xffff, 0x8080, 0x8080, 0x8080 }},
156-
{ "black", { 0x10, 0x80, 0x80 }, { 0xffff, 0x0000, 0x0000, 0x0000 }},
157-
{ "red", { 0x3f, 0x66, 0xf0 }, { 0xffff, 0xffff, 0x0000, 0x0000 }},
158-
{ "green", { 0xad, 0x2a, 0x1a }, { 0xffff, 0x0000, 0xffff, 0x0000 }},
159-
{ "blue", { 0x20, 0xf0, 0x76 }, { 0xffff, 0x0000, 0x0000, 0xffff }},
160-
},
154+
{ "white", { 0xeb00, 0x8000, 0x8000 }, { 0xffff, 0xffff, 0xffff, 0xffff }},
155+
{ "gray", { 0x7dee, 0x8000, 0x8000 }, { 0xffff, 0x8080, 0x8080, 0x8080 }},
156+
{ "black", { 0x1000, 0x8000, 0x8000 }, { 0xffff, 0x0000, 0x0000, 0x0000 }},
157+
{ "red", { 0x3e8f, 0x6656, 0xf000 }, { 0xffff, 0xffff, 0x0000, 0x0000 }},
158+
{ "green", { 0xaca1, 0x29aa, 0x1a45 }, { 0xffff, 0x0000, 0xffff, 0x0000 }},
159+
{ "blue", { 0x1fd0, 0xf000, 0x75bb }, { 0xffff, 0x0000, 0x0000, 0xffff }},
160+
}
161161
},
162162
/*
163163
* colour.RGB_to_YCbCr(<rgb color in 16 bit form>,
164164
* K=colour.WEIGHTS_YCBCR["ITU-R BT.2020"],
165165
* in_bits = 16,
166166
* in_legal = False,
167167
* in_int = True,
168-
* out_bits = 8,
168+
* out_bits = 16,
169169
* out_legal = False,
170170
* out_int = True)
171171
* Tests cases for color conversion generated by converting RGB
@@ -176,21 +176,21 @@ static struct yuv_u8_to_argb_u16_case yuv_u8_to_argb_u16_cases[] = {
176176
.range = DRM_COLOR_YCBCR_FULL_RANGE,
177177
.n_colors = 6,
178178
.colors = {
179-
{ "white", { 0xff, 0x80, 0x80 }, { 0xffff, 0xffff, 0xffff, 0xffff }},
180-
{ "gray", { 0x80, 0x80, 0x80 }, { 0xffff, 0x8080, 0x8080, 0x8080 }},
181-
{ "black", { 0x00, 0x80, 0x80 }, { 0xffff, 0x0000, 0x0000, 0x0000 }},
182-
{ "red", { 0x43, 0x5c, 0xff }, { 0xffff, 0xffff, 0x0000, 0x0000 }},
183-
{ "green", { 0xad, 0x24, 0x0b }, { 0xffff, 0x0000, 0xffff, 0x0000 }},
184-
{ "blue", { 0x0f, 0xff, 0x76 }, { 0xffff, 0x0000, 0x0000, 0xffff }},
185-
},
179+
{ "white", { 0xffff, 0x8000, 0x8000 }, { 0xffff, 0xffff, 0xffff, 0xffff }},
180+
{ "gray", { 0x8080, 0x8000, 0x8000 }, { 0xffff, 0x8080, 0x8080, 0x8080 }},
181+
{ "black", { 0x0000, 0x8000, 0x8000 }, { 0xffff, 0x0000, 0x0000, 0x0000 }},
182+
{ "red", { 0x4340, 0x5c41, 0xffff }, { 0xffff, 0xffff, 0x0000, 0x0000 }},
183+
{ "green", { 0xad91, 0x23bf, 0x0a4c }, { 0xffff, 0x0000, 0xffff, 0x0000 }},
184+
{ "blue", { 0x0f2e, 0xffff, 0x75b5 }, { 0xffff, 0x0000, 0x0000, 0xffff }},
185+
}
186186
},
187187
/*
188188
* colour.RGB_to_YCbCr(<rgb color in 16 bit form>,
189189
* K=colour.WEIGHTS_YCBCR["ITU-R BT.2020"],
190190
* in_bits = 16,
191191
* in_legal = False,
192192
* in_int = True,
193-
* out_bits = 8,
193+
* out_bits = 16,
194194
* out_legal = True,
195195
* out_int = True)
196196
* Tests cases for color conversion generated by converting RGB
@@ -201,32 +201,30 @@ static struct yuv_u8_to_argb_u16_case yuv_u8_to_argb_u16_cases[] = {
201201
.range = DRM_COLOR_YCBCR_LIMITED_RANGE,
202202
.n_colors = 6,
203203
.colors = {
204-
{ "white", { 0xeb, 0x80, 0x80 }, { 0xffff, 0xffff, 0xffff, 0xffff }},
205-
{ "gray", { 0x7e, 0x80, 0x80 }, { 0xffff, 0x8080, 0x8080, 0x8080 }},
206-
{ "black", { 0x10, 0x80, 0x80 }, { 0xffff, 0x0000, 0x0000, 0x0000 }},
207-
{ "red", { 0x4a, 0x61, 0xf0 }, { 0xffff, 0xffff, 0x0000, 0x0000 }},
208-
{ "green", { 0xa4, 0x2f, 0x19 }, { 0xffff, 0x0000, 0xffff, 0x0000 }},
209-
{ "blue", { 0x1d, 0xf0, 0x77 }, { 0xffff, 0x0000, 0x0000, 0xffff }},
210-
},
204+
{ "white", { 0xeb00, 0x8000, 0x8000 }, { 0xffff, 0xffff, 0xffff, 0xffff }},
205+
{ "gray", { 0x7dee, 0x8000, 0x8000 }, { 0xffff, 0x8080, 0x8080, 0x8080 }},
206+
{ "black", { 0x1000, 0x8000, 0x8000 }, { 0xffff, 0x0000, 0x0000, 0x0000 }},
207+
{ "red", { 0x4988, 0x60b9, 0xf000 }, { 0xffff, 0xffff, 0x0000, 0x0000 }},
208+
{ "green", { 0xa47b, 0x2f47, 0x1902 }, { 0xffff, 0x0000, 0xffff, 0x0000 }},
209+
{ "blue", { 0x1cfd, 0xf000, 0x76fe }, { 0xffff, 0x0000, 0x0000, 0xffff }},
210+
}
211211
},
212212
};
213213

214214
/*
215-
* vkms_format_test_yuv_u8_to_argb_u16 - Testing the conversion between YUV
215+
* vkms_format_test_yuv_u16_to_argb_u16 - Testing the conversion between YUV
216216
* colors to ARGB colors in VKMS
217217
*
218218
* This test will use the functions get_conversion_matrix_to_argb_u16 and
219-
* argb_u16_from_yuv888 to convert YUV colors (stored in
220-
* yuv_u8_to_argb_u16_cases) into ARGB colors.
219+
* argb_u16_from_yuv161616 to convert YUV colors (stored in
220+
* yuv_u16_to_argb_u16_cases) into ARGB colors.
221221
*
222222
* The conversion between YUV and RGB is not totally reversible, so there may be
223223
* some difference between the expected value and the result.
224-
* In addition, there may be some rounding error as the input color is 8 bits
225-
* and output color is 16 bits.
226224
*/
227-
static void vkms_format_test_yuv_u8_to_argb_u16(struct kunit *test)
225+
static void vkms_format_test_yuv_u16_to_argb_u16(struct kunit *test)
228226
{
229-
const struct yuv_u8_to_argb_u16_case *param = test->param_value;
227+
const struct yuv_u16_to_argb_u16_case *param = test->param_value;
230228
struct pixel_argb_u16 argb;
231229

232230
for (size_t i = 0; i < param->n_colors; i++) {
@@ -236,7 +234,8 @@ static void vkms_format_test_yuv_u8_to_argb_u16(struct kunit *test)
236234
get_conversion_matrix_to_argb_u16
237235
(DRM_FORMAT_NV12, param->encoding, param->range, &matrix);
238236

239-
argb = argb_u16_from_yuv888(color->yuv.y, color->yuv.u, color->yuv.v, &matrix);
237+
argb = argb_u16_from_yuv161616(&matrix, color->yuv.y, color->yuv.u,
238+
color->yuv.v);
240239

241240
KUNIT_EXPECT_LE_MSG(test, abs_diff(argb.a, color->argb.a), 0x1ff,
242241
"On the A channel of the color %s expected 0x%04x, got 0x%04x",
@@ -253,19 +252,19 @@ static void vkms_format_test_yuv_u8_to_argb_u16(struct kunit *test)
253252
}
254253
}
255254

256-
static void vkms_format_test_yuv_u8_to_argb_u16_case_desc(struct yuv_u8_to_argb_u16_case *t,
257-
char *desc)
255+
static void vkms_format_test_yuv_u16_to_argb_u16_case_desc(struct yuv_u16_to_argb_u16_case *t,
256+
char *desc)
258257
{
259258
snprintf(desc, KUNIT_PARAM_DESC_SIZE, "%s - %s",
260259
drm_get_color_encoding_name(t->encoding), drm_get_color_range_name(t->range));
261260
}
262261

263-
KUNIT_ARRAY_PARAM(yuv_u8_to_argb_u16, yuv_u8_to_argb_u16_cases,
264-
vkms_format_test_yuv_u8_to_argb_u16_case_desc
262+
KUNIT_ARRAY_PARAM(yuv_u16_to_argb_u16, yuv_u16_to_argb_u16_cases,
263+
vkms_format_test_yuv_u16_to_argb_u16_case_desc
265264
);
266265

267266
static struct kunit_case vkms_format_test_cases[] = {
268-
KUNIT_CASE_PARAM(vkms_format_test_yuv_u8_to_argb_u16, yuv_u8_to_argb_u16_gen_params),
267+
KUNIT_CASE_PARAM(vkms_format_test_yuv_u16_to_argb_u16, yuv_u16_to_argb_u16_gen_params),
269268
{}
270269
};
271270

drivers/gpu/drm/vkms/vkms_formats.c

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -269,16 +269,17 @@ static struct pixel_argb_u16 argb_u16_from_BGR565(const __le16 *pixel)
269269
return out_pixel;
270270
}
271271

272-
VISIBLE_IF_KUNIT struct pixel_argb_u16 argb_u16_from_yuv888(u8 y, u8 channel_1, u8 channel_2,
273-
const struct conversion_matrix *matrix)
272+
VISIBLE_IF_KUNIT
273+
struct pixel_argb_u16 argb_u16_from_yuv161616(const struct conversion_matrix *matrix,
274+
u16 y, u16 channel_1, u16 channel_2)
274275
{
275276
u16 r, g, b;
276277
s64 fp_y, fp_channel_1, fp_channel_2;
277278
s64 fp_r, fp_g, fp_b;
278279

279-
fp_y = drm_int2fixp(((int)y - matrix->y_offset) * 257);
280-
fp_channel_1 = drm_int2fixp(((int)channel_1 - 128) * 257);
281-
fp_channel_2 = drm_int2fixp(((int)channel_2 - 128) * 257);
280+
fp_y = drm_int2fixp((int)y - matrix->y_offset * 257);
281+
fp_channel_1 = drm_int2fixp((int)channel_1 - 128 * 257);
282+
fp_channel_2 = drm_int2fixp((int)channel_2 - 128 * 257);
282283

283284
fp_r = drm_fixp_mul(matrix->matrix[0][0], fp_y) +
284285
drm_fixp_mul(matrix->matrix[0][1], fp_channel_1) +
@@ -300,7 +301,7 @@ VISIBLE_IF_KUNIT struct pixel_argb_u16 argb_u16_from_yuv888(u8 y, u8 channel_1,
300301

301302
return argb_u16_from_u16161616(0xffff, r, g, b);
302303
}
303-
EXPORT_SYMBOL_IF_KUNIT(argb_u16_from_yuv888);
304+
EXPORT_SYMBOL_IF_KUNIT(argb_u16_from_yuv161616);
304305

305306
/**
306307
* READ_LINE() - Generic generator for a read_line function which can be used for format with one
@@ -498,8 +499,8 @@ static void semi_planar_yuv_read_line(const struct vkms_plane_state *plane, int
498499
const struct conversion_matrix *conversion_matrix = &plane->conversion_matrix;
499500

500501
for (int i = 0; i < count; i++) {
501-
*out_pixel = argb_u16_from_yuv888(y_plane[0], uv_plane[0], uv_plane[1],
502-
conversion_matrix);
502+
*out_pixel = argb_u16_from_yuv161616(conversion_matrix, y_plane[0] * 257,
503+
uv_plane[0] * 257, uv_plane[1] * 257);
503504
out_pixel += 1;
504505
y_plane += step_y;
505506
if ((i + subsampling_offset + 1) % subsampling == 0)
@@ -543,8 +544,9 @@ static void planar_yuv_read_line(const struct vkms_plane_state *plane, int x_sta
543544
const struct conversion_matrix *conversion_matrix = &plane->conversion_matrix;
544545

545546
for (int i = 0; i < count; i++) {
546-
*out_pixel = argb_u16_from_yuv888(*y_plane, *channel_1_plane, *channel_2_plane,
547-
conversion_matrix);
547+
*out_pixel = argb_u16_from_yuv161616(conversion_matrix,
548+
*y_plane * 257, *channel_1_plane * 257,
549+
*channel_2_plane * 257);
548550
out_pixel += 1;
549551
y_plane += step_y;
550552
if ((i + subsampling_offset + 1) % subsampling == 0) {

drivers/gpu/drm/vkms/vkms_formats.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ void get_conversion_matrix_to_argb_u16(u32 format, enum drm_color_encoding encod
1414
struct conversion_matrix *matrix);
1515

1616
#if IS_ENABLED(CONFIG_KUNIT)
17-
struct pixel_argb_u16 argb_u16_from_yuv888(u8 y, u8 channel_1, u8 channel_2,
18-
const struct conversion_matrix *matrix);
17+
struct pixel_argb_u16 argb_u16_from_yuv161616(const struct conversion_matrix *matrix,
18+
u16 y, u16 channel_1, u16 channel_2);
1919
#endif
2020

2121
#endif /* _VKMS_FORMATS_H_ */

0 commit comments

Comments
 (0)