Commit 47c0826
committed
drm/panel: panel-simple: Add function to look panel data up
Commit de04bb0 ("drm/panel/panel-simple: Use the new allocation in
place of devm_kzalloc()") moved the call to drm_panel_init into the
devm_drm_panel_alloc(), which needs a connector type to initialize
properly.
In the panel-dpi compatible case, the passed panel_desc structure is an
empty one used as a discriminant, and the connector type it contains
isn't actually initialized.
It is initialized through a call to panel_dpi_probe() later in the
function, which used to be before the call to drm_panel_init() that got
merged into devm_drm_panel_alloc().
So, we do need a proper panel_desc pointer before the call to
devm_drm_panel_alloc() now. All cases associate their panel_desc with
the panel compatible and use of_device_get_match_data, except for the
panel-dpi compatible.
In that case, we're expected to call panel_dpi_probe, which will
allocate and initialize the panel_desc for us.
Let's create such a helper function that would be called first in the
driver and will lookup the desc by compatible, or allocate one if
relevant.
Reported-by: Francesco Dolcini <[email protected]>
Closes: https://lore.kernel.org/all/20250612081834.GA248237@francesco-nb/
Fixes: de04bb0 ("drm/panel/panel-simple: Use the new allocation in place of devm_kzalloc()")
Reviewed-by: Javier Martinez Canillas <[email protected]>
Tested-by: Francesco Dolcini <[email protected]> # Toradex Colibri iMX6
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Maxime Ripard <[email protected]>1 parent 921c41e commit 47c0826
1 file changed
Lines changed: 49 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
139 | 148 | | |
140 | 149 | | |
141 | 150 | | |
| |||
567 | 576 | | |
568 | 577 | | |
569 | 578 | | |
570 | | - | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
571 | 609 | | |
| 610 | + | |
572 | 611 | | |
573 | 612 | | |
574 | 613 | | |
575 | 614 | | |
576 | 615 | | |
577 | 616 | | |
578 | 617 | | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
579 | 622 | | |
580 | 623 | | |
581 | 624 | | |
| |||
608 | 651 | | |
609 | 652 | | |
610 | 653 | | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
624 | 657 | | |
625 | 658 | | |
626 | 659 | | |
| |||
5376 | 5409 | | |
5377 | 5410 | | |
5378 | 5411 | | |
5379 | | - | |
5380 | 5412 | | |
5381 | 5413 | | |
5382 | | - | |
5383 | | - | |
5384 | | - | |
5385 | | - | |
5386 | | - | |
| 5414 | + | |
5387 | 5415 | | |
5388 | 5416 | | |
5389 | 5417 | | |
| |||
5417 | 5445 | | |
5418 | 5446 | | |
5419 | 5447 | | |
5420 | | - | |
5421 | | - | |
5422 | | - | |
5423 | | - | |
5424 | | - | |
5425 | | - | |
5426 | | - | |
5427 | | - | |
5428 | 5448 | | |
5429 | 5449 | | |
5430 | 5450 | | |
| |||
5661 | 5681 | | |
5662 | 5682 | | |
5663 | 5683 | | |
5664 | | - | |
5665 | | - | |
5666 | | - | |
5667 | | - | |
5668 | | - | |
| 5684 | + | |
5669 | 5685 | | |
5670 | 5686 | | |
5671 | 5687 | | |
| |||
0 commit comments