egl/dri2: Guard against invalid fourcc formats