xf86drm: dedupe drmGetDeviceName() logic