/** * drm_eld_mnl - Get ELD monitor name length in bytes. * @eld: pointer to an eld memory structure with mnl set
*/ staticinlineint drm_eld_mnl(const u8 *eld)
{ return (eld[DRM_ELD_CEA_EDID_VER_MNL] & DRM_ELD_MNL_MASK) >> DRM_ELD_MNL_SHIFT;
}
int drm_eld_sad_get(const u8 *eld, int sad_index, struct cea_sad *cta_sad); int drm_eld_sad_set(u8 *eld, int sad_index, conststruct cea_sad *cta_sad);
/** * drm_eld_sad - Get ELD SAD structures. * @eld: pointer to an eld memory structure with sad_count set
*/ staticinlineconst u8 *drm_eld_sad(const u8 *eld)
{ unsignedint ver, mnl;
ver = (eld[DRM_ELD_VER] & DRM_ELD_VER_MASK) >> DRM_ELD_VER_SHIFT; if (ver != 2 && ver != 31) return NULL;
mnl = drm_eld_mnl(eld); if (mnl > 16) return NULL;
return eld + DRM_ELD_CEA_SAD(mnl, 0);
}
/** * drm_eld_sad_count - Get ELD SAD count. * @eld: pointer to an eld memory structure with sad_count set
*/ staticinlineint drm_eld_sad_count(const u8 *eld)
{ return (eld[DRM_ELD_SAD_COUNT_CONN_TYPE] & DRM_ELD_SAD_COUNT_MASK) >>
DRM_ELD_SAD_COUNT_SHIFT;
}
/** * drm_eld_calc_baseline_block_size - Calculate baseline block size in bytes * @eld: pointer to an eld memory structure with mnl and sad_count set * * This is a helper for determining the payload size of the baseline block, in * bytes, for e.g. setting the Baseline_ELD_Len field in the ELD header block.
*/ staticinlineint drm_eld_calc_baseline_block_size(const u8 *eld)
{ return DRM_ELD_MONITOR_NAME_STRING - DRM_ELD_HEADER_BLOCK_SIZE +
drm_eld_mnl(eld) + drm_eld_sad_count(eld) * 3;
}
/** * drm_eld_size - Get ELD size in bytes * @eld: pointer to a complete eld memory structure * * The returned value does not include the vendor block. It's vendor specific, * and comprises of the remaining bytes in the ELD memory buffer after * drm_eld_size() bytes of header and baseline block. * * The returned value is guaranteed to be a multiple of 4.
*/ staticinlineint drm_eld_size(const u8 *eld)
{ return DRM_ELD_HEADER_BLOCK_SIZE + eld[DRM_ELD_BASELINE_ELD_LEN] * 4;
}
/** * drm_eld_get_spk_alloc - Get speaker allocation * @eld: pointer to an ELD memory structure * * The returned value is the speakers mask. User has to use %DRM_ELD_SPEAKER * field definitions to identify speakers.
*/ staticinline u8 drm_eld_get_spk_alloc(const u8 *eld)
{ return eld[DRM_ELD_SPEAKER] & DRM_ELD_SPEAKER_MASK;
}
/** * drm_eld_get_conn_type - Get device type hdmi/dp connected * @eld: pointer to an ELD memory structure * * The caller need to use %DRM_ELD_CONN_TYPE_HDMI or %DRM_ELD_CONN_TYPE_DP to * identify the display type connected.
*/ staticinline u8 drm_eld_get_conn_type(const u8 *eld)
{ return eld[DRM_ELD_SAD_COUNT_CONN_TYPE] & DRM_ELD_CONN_TYPE_MASK;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.