drm/amd/display: Expose HDR output metadata for supported connectors
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Tue, 28 May 2019 19:08:35 +0000 (15:08 -0400)
committerHarry Wentland <harry.wentland@amd.com>
Mon, 3 Jun 2019 14:22:54 +0000 (10:22 -0400)
commit88694af9e4d1feaf635c23844833960f8958af78
treea6fffd06b95626898dba0efaf614307e800f28d4
parentcfc1ce7e5212b19423d38ed2035318a35f983309
drm/amd/display: Expose HDR output metadata for supported connectors

[Why]
For userspace to send static HDR metadata to the display we need to
attach the property on the connector and send it to DC.

[How]
The property is attached to HDMI and DP connectors. Since the metadata
isn't actually available when creating the connector this isn't a
property we can dynamically support based on the extension block
being available or not.

When the HDR metadata is changed a modeset will be forced for now.
We need to switch from 8bpc to 10bpc in most cases anyway, and we want
to fully exit HDR mode when userspace gives us a NULL metadata, so this
isn't completely unnecessary.

The requirement can later be reduced to just entering and exiting HDR
or switching max bpc.

Cc: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190528190836.10738-2-nicholas.kazlauskas@amd.com
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c