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

media: vivid: add support for new pixelformats

New RGB444, RGB555 and RGB32 variants were recently added. Now also
support them in vivid.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
4e4f3b99 079a649c

+129 -3
+129 -3
drivers/media/platform/vivid/vivid-vid-common.c
··· 262 262 .can_do_overlay = true, 263 263 }, 264 264 { 265 - .fourcc = V4L2_PIX_FMT_RGB444, /* xxxxrrrr ggggbbbb */ 265 + .fourcc = V4L2_PIX_FMT_RGB444, /* ggggbbbb xxxxrrrr */ 266 266 .vdownsampling = { 1 }, 267 267 .bit_depth = { 16 }, 268 268 .planes = 1, 269 269 .buffers = 1, 270 270 }, 271 271 { 272 - .fourcc = V4L2_PIX_FMT_XRGB444, /* xxxxrrrr ggggbbbb */ 272 + .fourcc = V4L2_PIX_FMT_XRGB444, /* ggggbbbb xxxxrrrr */ 273 273 .vdownsampling = { 1 }, 274 274 .bit_depth = { 16 }, 275 275 .planes = 1, 276 276 .buffers = 1, 277 277 }, 278 278 { 279 - .fourcc = V4L2_PIX_FMT_ARGB444, /* aaaarrrr ggggbbbb */ 279 + .fourcc = V4L2_PIX_FMT_ARGB444, /* ggggbbbb aaaarrrr */ 280 + .vdownsampling = { 1 }, 281 + .bit_depth = { 16 }, 282 + .planes = 1, 283 + .buffers = 1, 284 + .alpha_mask = 0x00f0, 285 + }, 286 + { 287 + .fourcc = V4L2_PIX_FMT_RGBX444, /* bbbbxxxx rrrrgggg */ 288 + .vdownsampling = { 1 }, 289 + .bit_depth = { 16 }, 290 + .planes = 1, 291 + .buffers = 1, 292 + }, 293 + { 294 + .fourcc = V4L2_PIX_FMT_RGBA444, /* bbbbaaaa rrrrgggg */ 295 + .vdownsampling = { 1 }, 296 + .bit_depth = { 16 }, 297 + .planes = 1, 298 + .buffers = 1, 299 + .alpha_mask = 0x00f0, 300 + }, 301 + { 302 + .fourcc = V4L2_PIX_FMT_XBGR444, /* ggggrrrr xxxxbbbb */ 303 + .vdownsampling = { 1 }, 304 + .bit_depth = { 16 }, 305 + .planes = 1, 306 + .buffers = 1, 307 + }, 308 + { 309 + .fourcc = V4L2_PIX_FMT_ABGR444, /* ggggrrrr aaaabbbb */ 310 + .vdownsampling = { 1 }, 311 + .bit_depth = { 16 }, 312 + .planes = 1, 313 + .buffers = 1, 314 + .alpha_mask = 0x00f0, 315 + }, 316 + { 317 + .fourcc = V4L2_PIX_FMT_BGRX444, /* rrrrxxxx bbbbgggg */ 318 + .vdownsampling = { 1 }, 319 + .bit_depth = { 16 }, 320 + .planes = 1, 321 + .buffers = 1, 322 + }, 323 + { 324 + .fourcc = V4L2_PIX_FMT_BGRA444, /* rrrraaaa bbbbgggg */ 280 325 .vdownsampling = { 1 }, 281 326 .bit_depth = { 16 }, 282 327 .planes = 1, ··· 346 301 }, 347 302 { 348 303 .fourcc = V4L2_PIX_FMT_ARGB555, /* gggbbbbb arrrrrgg */ 304 + .vdownsampling = { 1 }, 305 + .bit_depth = { 16 }, 306 + .planes = 1, 307 + .buffers = 1, 308 + .can_do_overlay = true, 309 + .alpha_mask = 0x8000, 310 + }, 311 + { 312 + .fourcc = V4L2_PIX_FMT_RGBX555, /* ggbbbbbx rrrrrggg */ 313 + .vdownsampling = { 1 }, 314 + .bit_depth = { 16 }, 315 + .planes = 1, 316 + .buffers = 1, 317 + .can_do_overlay = true, 318 + }, 319 + { 320 + .fourcc = V4L2_PIX_FMT_RGBA555, /* ggbbbbba rrrrrggg */ 321 + .vdownsampling = { 1 }, 322 + .bit_depth = { 16 }, 323 + .planes = 1, 324 + .buffers = 1, 325 + .can_do_overlay = true, 326 + .alpha_mask = 0x8000, 327 + }, 328 + { 329 + .fourcc = V4L2_PIX_FMT_XBGR555, /* gggrrrrr xbbbbbgg */ 330 + .vdownsampling = { 1 }, 331 + .bit_depth = { 16 }, 332 + .planes = 1, 333 + .buffers = 1, 334 + .can_do_overlay = true, 335 + }, 336 + { 337 + .fourcc = V4L2_PIX_FMT_ABGR555, /* gggrrrrr abbbbbgg */ 338 + .vdownsampling = { 1 }, 339 + .bit_depth = { 16 }, 340 + .planes = 1, 341 + .buffers = 1, 342 + .can_do_overlay = true, 343 + .alpha_mask = 0x8000, 344 + }, 345 + { 346 + .fourcc = V4L2_PIX_FMT_BGRX555, /* ggrrrrrx bbbbbggg */ 347 + .vdownsampling = { 1 }, 348 + .bit_depth = { 16 }, 349 + .planes = 1, 350 + .buffers = 1, 351 + .can_do_overlay = true, 352 + }, 353 + { 354 + .fourcc = V4L2_PIX_FMT_BGRA555, /* ggrrrrra bbbbbggg */ 349 355 .vdownsampling = { 1 }, 350 356 .bit_depth = { 16 }, 351 357 .planes = 1, ··· 485 389 }, 486 390 { 487 391 .fourcc = V4L2_PIX_FMT_ABGR32, /* bgra */ 392 + .vdownsampling = { 1 }, 393 + .bit_depth = { 32 }, 394 + .planes = 1, 395 + .buffers = 1, 396 + .alpha_mask = 0xff000000, 397 + }, 398 + { 399 + .fourcc = V4L2_PIX_FMT_RGBX32, /* rgbx */ 400 + .vdownsampling = { 1 }, 401 + .bit_depth = { 32 }, 402 + .planes = 1, 403 + .buffers = 1, 404 + }, 405 + { 406 + .fourcc = V4L2_PIX_FMT_BGRX32, /* xbgr */ 407 + .vdownsampling = { 1 }, 408 + .bit_depth = { 32 }, 409 + .planes = 1, 410 + .buffers = 1, 411 + }, 412 + { 413 + .fourcc = V4L2_PIX_FMT_RGBA32, /* rgba */ 414 + .vdownsampling = { 1 }, 415 + .bit_depth = { 32 }, 416 + .planes = 1, 417 + .buffers = 1, 418 + .alpha_mask = 0x000000ff, 419 + }, 420 + { 421 + .fourcc = V4L2_PIX_FMT_BGRA32, /* abgr */ 488 422 .vdownsampling = { 1 }, 489 423 .bit_depth = { 32 }, 490 424 .planes = 1,