DRM database property: HDR_OUTPUT_METADATA

Back to index

Details

Name
HDR_OUTPUT_METADATA
Flags
<none>
Type
blob
Attached to
connector
Specification
<none>

Documentation

Connector property to enable userspace to send HDR Metadata to
driver. This metadata is based on the composition and blending
policies decided by user, taking into account the hardware and
sink capabilities. The driver gets this metadata and creates a
Dynamic Range and Mastering Infoframe (DRM) in case of HDMI,
SDP packet (Non-audio INFOFRAME SDP v1.3) for DP. This is then
sent to sink. This notifies the sink of the upcoming frame's Color
Encoding and Luminance parameters.

Userspace first need to detect the HDR capabilities of sink by
reading and parsing the EDID. Details of HDR metadata for HDMI
are added in CTA 861.G spec. For DP , its defined in VESA DP
Standard v1.4. It needs to then get the metadata information
of the video/game/app content which are encoded in HDR (basically
using HDR transfer functions). With this information it needs to
decide on a blending policy and compose the relevant
layers/overlays into a common format. Once this blending is done,
userspace will be aware of the metadata of the composed frame to
be send to sink. It then uses this property to communicate this
metadata to driver which then make a Infoframe packet and sends
to sink based on the type of encoder connected.

Userspace will be responsible to do Tone mapping operation in case:
	- Some layers are HDR and others are SDR
	- HDR layers luminance is not same as sink

It will even need to do colorspace conversion and get all layers
to one common colorspace for blending. It can use either GL, Media
or display engine to get this done based on the capabilities of the
associated hardware.

Driver expects metadata to be put in &struct hdr_output_metadata
structure from userspace. This is received as blob and stored in
&drm_connector_state.hdr_output_metadata. It parses EDID and saves the
sink metadata in &struct hdr_sink_metadata, as
&drm_connector.hdr_sink_metadata.  Driver uses
drm_hdmi_infoframe_set_hdr_metadata() helper to set the HDR metadata,
hdmi_drm_infoframe_pack() to pack the infoframe as per spec, in case of
HDMI encoder.

Driver support

adp
amdgpu
apple
ast
bochs-drm
drm-rp1-dsi
evdi
exynos
gma500
i915
imx-dcss
imx-drm
imx-lcdif
jmgpu
kirin
mediatek
meson
mga2
msm
mxsfb-drm
nouveau
nvidia-drm
omapdrm
panel-mipi-dbi
pvr
qxl
radeon
rcar-du
rockchip
simpledrm
smifb
spacemit
starfive
sun4i-drm
sunxi-drm
tegra
tilcdc
vboxvideo
vc4
virtio_gpu
vkms
vmwgfx
vs-drm
xe
xlnx