Commit e14cba9
drm/mediatek: dsi: Use mipi_dsi_pixel_format_to_bpp() helper function
Instead of open coding, use the mipi_dsi_pixel_format_to_bpp() helper
function from drm_mipi_dsi.h in mtk_dsi_poweron() and for validation
in mtk_dsi_bridge_mode_valid().
Note that this function changes the behavior of this driver: previously,
in case of unknown formats, it would (wrongly) assume that it should
account for a 24-bits format - now it will return an error and refuse
to set clocks and/or enable the DSI.
This is done because setting the wrong data rate will only produce a
garbage output that the display will misinterpret both because this
driver doesn't actually provide any extra-spec format support and/or
because the data rate (hence, the HS clock) will be wrong.
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: CK Hu <ck.hu@mediatek.com>
Link: https://patchwork.kernel.org/project/dri-devel/patch/20240215085316.56835-10-angelogioacchino.delregno@collabora.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>1 parent 2aa9514 commit e14cba9
1 file changed
Lines changed: 9 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
613 | 605 | | |
| 606 | + | |
614 | 607 | | |
615 | 608 | | |
616 | 609 | | |
| |||
793 | 786 | | |
794 | 787 | | |
795 | 788 | | |
796 | | - | |
| 789 | + | |
797 | 790 | | |
798 | | - | |
799 | | - | |
800 | | - | |
801 | | - | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
802 | 794 | | |
803 | 795 | | |
804 | 796 | | |
| |||
0 commit comments