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

drm: atmel-hlcdc: add LCD controller layer definition for sam9x75

Add the LCD controller layer definition and descriptor structure for
sam9x75 for the following layers:
- Base Layer
- Overlay1 Layer
- Overlay2 Layer
- High End Overlay

Signed-off-by: Manikandan Muralidharan <manikandan.m@microchip.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240424053351.589830-9-manikandan.m@microchip.com

authored by

Manikandan Muralidharan and committed by
Sam Ravnborg
86266829 d0e78f53

+100
+100
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
··· 467 467 .ops = &atmel_hlcdc_ops, 468 468 }; 469 469 470 + static const struct atmel_hlcdc_layer_desc atmel_xlcdc_sam9x75_layers[] = { 471 + { 472 + .name = "base", 473 + .formats = &atmel_hlcdc_plane_rgb_formats, 474 + .regs_offset = 0x60, 475 + .id = 0, 476 + .type = ATMEL_HLCDC_BASE_LAYER, 477 + .cfgs_offset = 0x1c, 478 + .layout = { 479 + .xstride = { 2 }, 480 + .default_color = 3, 481 + .general_config = 4, 482 + .disc_pos = 5, 483 + .disc_size = 6, 484 + }, 485 + .clut_offset = 0x700, 486 + }, 487 + { 488 + .name = "overlay1", 489 + .formats = &atmel_hlcdc_plane_rgb_formats, 490 + .regs_offset = 0x160, 491 + .id = 1, 492 + .type = ATMEL_HLCDC_OVERLAY_LAYER, 493 + .cfgs_offset = 0x1c, 494 + .layout = { 495 + .pos = 2, 496 + .size = 3, 497 + .xstride = { 4 }, 498 + .pstride = { 5 }, 499 + .default_color = 6, 500 + .chroma_key = 7, 501 + .chroma_key_mask = 8, 502 + .general_config = 9, 503 + }, 504 + .clut_offset = 0xb00, 505 + }, 506 + { 507 + .name = "overlay2", 508 + .formats = &atmel_hlcdc_plane_rgb_formats, 509 + .regs_offset = 0x260, 510 + .id = 2, 511 + .type = ATMEL_HLCDC_OVERLAY_LAYER, 512 + .cfgs_offset = 0x1c, 513 + .layout = { 514 + .pos = 2, 515 + .size = 3, 516 + .xstride = { 4 }, 517 + .pstride = { 5 }, 518 + .default_color = 6, 519 + .chroma_key = 7, 520 + .chroma_key_mask = 8, 521 + .general_config = 9, 522 + }, 523 + .clut_offset = 0xf00, 524 + }, 525 + { 526 + .name = "high-end-overlay", 527 + .formats = &atmel_hlcdc_plane_rgb_and_yuv_formats, 528 + .regs_offset = 0x360, 529 + .id = 3, 530 + .type = ATMEL_HLCDC_OVERLAY_LAYER, 531 + .cfgs_offset = 0x30, 532 + .layout = { 533 + .pos = 2, 534 + .size = 3, 535 + .memsize = 4, 536 + .xstride = { 5, 7 }, 537 + .pstride = { 6, 8 }, 538 + .default_color = 9, 539 + .chroma_key = 10, 540 + .chroma_key_mask = 11, 541 + .general_config = 12, 542 + .csc = 16, 543 + .scaler_config = 23, 544 + .vxs_config = 30, 545 + .hxs_config = 31, 546 + }, 547 + .clut_offset = 0x1300, 548 + }, 549 + }; 550 + 551 + static const struct atmel_hlcdc_dc_desc atmel_xlcdc_dc_sam9x75 = { 552 + .min_width = 0, 553 + .min_height = 0, 554 + .max_width = 2048, 555 + .max_height = 2048, 556 + .max_spw = 0x3ff, 557 + .max_vpw = 0x3ff, 558 + .max_hpw = 0x3ff, 559 + .fixed_clksrc = true, 560 + .is_xlcdc = true, 561 + .nlayers = ARRAY_SIZE(atmel_xlcdc_sam9x75_layers), 562 + .layers = atmel_xlcdc_sam9x75_layers, 563 + .ops = &atmel_xlcdc_ops, 564 + }; 565 + 470 566 static const struct of_device_id atmel_hlcdc_of_match[] = { 471 567 { 472 568 .compatible = "atmel,at91sam9n12-hlcdc", ··· 587 491 { 588 492 .compatible = "microchip,sam9x60-hlcdc", 589 493 .data = &atmel_hlcdc_dc_sam9x60, 494 + }, 495 + { 496 + .compatible = "microchip,sam9x75-xlcdc", 497 + .data = &atmel_xlcdc_dc_sam9x75, 590 498 }, 591 499 { /* sentinel */ }, 592 500 };