Hi Dave, On 14 April 2016 at 03:56, Dave Airlie <airlied@xxxxxxxxx> wrote: > +static enum connector_id connector_id_from_bios_object_id(uint32_t bios_object_id) > +{ > + uint32_t bios_connector_id = gpu_id_from_bios_object_id(bios_object_id); > + > + enum connector_id id; > + > + switch (bios_connector_id) { > + case CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I: > + id = CONNECTOR_ID_SINGLE_LINK_DVII; > + break; > + case CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I: > + id = CONNECTOR_ID_DUAL_LINK_DVII; > + break; > + case CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_D: > + id = CONNECTOR_ID_SINGLE_LINK_DVID; > + break; > + case CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D: > + id = CONNECTOR_ID_DUAL_LINK_DVID; > + break; > + case CONNECTOR_OBJECT_ID_VGA: > + id = CONNECTOR_ID_VGA; > + break; > + case CONNECTOR_OBJECT_ID_HDMI_TYPE_A: > + id = CONNECTOR_ID_HDMI_TYPE_A; > + break; > + case CONNECTOR_OBJECT_ID_LVDS: > + id = CONNECTOR_ID_LVDS; > + break; > + case CONNECTOR_OBJECT_ID_PCIE_CONNECTOR: > + id = CONNECTOR_ID_PCIE; > + break; > + case CONNECTOR_OBJECT_ID_HARDCODE_DVI: > + id = CONNECTOR_ID_HARDCODE_DVI; > + break; > + case CONNECTOR_OBJECT_ID_DISPLAYPORT: > + id = CONNECTOR_ID_DISPLAY_PORT; > + break; > + case CONNECTOR_OBJECT_ID_eDP: > + id = CONNECTOR_ID_EDP; > + break; > + case CONNECTOR_OBJECT_ID_MXM: > + id = CONNECTOR_ID_MXM; > + break; > + default: > + id = CONNECTOR_ID_UNKNOWN; > + break; One could move all the new mappings (meaning - here and follow up patches) to static const table(s), saving a wee bit of space ;-) -Emil _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel