We combine CM4 and the DPI display, however, we cannot enter the emulator and it only stuck in booting. It can work normally if we change to an HDMI display.
This seems like a problem with the DPI configuration/driver. Does Raspbian Lite works normally with the configuration - does it boot to a text console/terminal ? What emulator are you starting ? By default, RetroPie boots to EmulationStation, not to an emulator.
There is also a solution that we install retropie in Raspbian image, however, it also has a problem. It will flash the desktop of Raspbian when starting, begin the game, or exit from the game.
RetroPie is based on Raspbian Lite (not the Full/Desktop), running RetroPie (EmulationStation) under a desktop env on a Pi is not a supported or tested configuration.