[PATCH 5.4 46/80] drm/mgag200: Extract device type from flags