To disable the LCD unit set the "Type" registry key to "-1" in the Display driver registry settings. The pins used for the LCD can then be used as normal GPIOs or with any other alternate function available on these pins. You also need to disable the SplashScreen if you want to use the LCD pins as GPIOs at boot-up time.
To disable the LCD unit set the "BootupStyle" registry key to "0x00010" or "0x00020" i.e. CRT or HDMI in the [Display driver registry settings for Txx].