mipi: Make panel init callback work directly on DSI transaction types

Hardware / Coreboot - Julius Werner [chromium.org] - 11 September 2021 01:42 UTC

Our MIPI panel initialization framework differentiates between DCS and GENERIC commands, but the exact interpretation of those terms is left to the platform drivers. In practice, the MIPI DSI transaction codes for these are standardized and platforms always need to do the same operation of combining the command length and transfer type into a correct DSI protocol code. This patch factors out the various platform-specific DSI protocol definitions into a single global one and moves the transaction type calculation into the common panel framework.

The Qualcomm SC7180 implementation which previously only supported DCS commands is enhanced to (hopefully? untested for now...) also support GENERIC commands. While we're rewriting that whole section also fix some other issues about how exactly long and short commands need to be passed to that hardware which we identified in the meantime.

4757a7ea33 mipi: Make panel init callback work directly on DSI transaction types
src/drivers/mipi/panel.c | 48 +++++++--
src/include/mipi/dsi.h | 112 +++++++++++++++++++++
src/include/mipi/panel.h | 3 +-
src/soc/mediatek/common/dsi.c | 55 ++--------
src/soc/mediatek/common/include/soc/dsi_common.h | 107 +-------------------
src/soc/nvidia/tegra210/include/soc/mipi_display.h | 112 +--------------------
src/soc/nvidia/tegra210/include/soc/mipi_dsi.h | 6 +-
src/soc/qualcomm/sc7180/display/dsi.c | 29 ++++--
src/soc/rockchip/rk3399/include/soc/mipi.h | 12 +--
9 files changed, 188 insertions(+), 296 deletions(-)

Upstream: review.coreboot.org

  • Share