mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
drm: rockchip: dw-hdmi: Replace hdr_static_metadata with hdr_output_metadata
hdr_static_metadata is no longer used for HDR configuration, used only as store the hdr info after edid parsing. Change-Id: Ib2c5e3e739267433176181aa9a0611a50a847125 Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
This commit is contained in:
@@ -1961,7 +1961,7 @@ hdmi_get_tmdsclock(struct dw_hdmi *hdmi, unsigned long mpixelclock)
|
||||
static void hdmi_config_hdr_infoframe(struct dw_hdmi *hdmi)
|
||||
{
|
||||
struct hdmi_drm_infoframe frame;
|
||||
struct hdr_static_metadata *hdr_metadata;
|
||||
struct hdr_output_metadata *hdr_metadata;
|
||||
struct drm_connector_state *conn_state = hdmi->connector.state;
|
||||
int ret;
|
||||
|
||||
@@ -1984,12 +1984,13 @@ static void hdmi_config_hdr_infoframe(struct dw_hdmi *hdmi)
|
||||
return;
|
||||
}
|
||||
|
||||
hdr_metadata = (struct hdr_static_metadata *)
|
||||
hdr_metadata = (struct hdr_output_metadata *)
|
||||
conn_state->hdr_output_metadata->data;
|
||||
|
||||
if (!(hdmi->connector.hdr_sink_metadata.hdmi_type1.eotf &
|
||||
BIT(hdr_metadata->eotf))) {
|
||||
DRM_ERROR("Not support EOTF %d\n", hdr_metadata->eotf);
|
||||
BIT(hdr_metadata->hdmi_metadata_type1.eotf))) {
|
||||
DRM_ERROR("Not support EOTF %d\n",
|
||||
hdr_metadata->hdmi_metadata_type1.eotf);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2050,7 +2051,8 @@ static void hdmi_config_hdr_infoframe(struct dw_hdmi *hdmi)
|
||||
if (conn_state->hdr_metadata_changed)
|
||||
conn_state->hdr_metadata_changed = false;
|
||||
|
||||
DRM_DEBUG("%s eotf %d end\n", __func__, hdr_metadata->eotf);
|
||||
DRM_DEBUG("%s eotf %d end\n", __func__,
|
||||
hdr_metadata->hdmi_metadata_type1.eotf);
|
||||
}
|
||||
|
||||
static void hdmi_av_composer(struct dw_hdmi *hdmi,
|
||||
|
||||
@@ -563,11 +563,12 @@ dw_hdmi_rockchip_select_output(struct drm_connector_state *conn_state,
|
||||
{
|
||||
struct drm_display_info *info = &conn_state->connector->display_info;
|
||||
struct drm_display_mode *mode = &crtc_state->mode;
|
||||
struct hdr_static_metadata *hdr_metadata;
|
||||
struct hdr_output_metadata *hdr_metadata;
|
||||
u32 vic = drm_match_cea_mode(mode);
|
||||
unsigned long tmdsclock, pixclock = mode->crtc_clock;
|
||||
bool support_dc = false;
|
||||
int max_tmds_clock = info->max_tmds_clock;
|
||||
int output_eotf;
|
||||
|
||||
*color_format = DRM_HDMI_OUTPUT_DEFAULT_RGB;
|
||||
|
||||
@@ -628,11 +629,12 @@ dw_hdmi_rockchip_select_output(struct drm_connector_state *conn_state,
|
||||
|
||||
*eotf = TRADITIONAL_GAMMA_SDR;
|
||||
if (conn_state->hdr_output_metadata) {
|
||||
hdr_metadata = (struct hdr_static_metadata *)
|
||||
hdr_metadata = (struct hdr_output_metadata *)
|
||||
conn_state->hdr_output_metadata->data;
|
||||
if (hdr_metadata->eotf > TRADITIONAL_GAMMA_HDR &&
|
||||
hdr_metadata->eotf < FUTURE_EOTF)
|
||||
*eotf = hdr_metadata->eotf;
|
||||
output_eotf = hdr_metadata->hdmi_metadata_type1.eotf;
|
||||
if (output_eotf > TRADITIONAL_GAMMA_HDR &&
|
||||
output_eotf < FUTURE_EOTF)
|
||||
*eotf = output_eotf;
|
||||
}
|
||||
|
||||
if ((*eotf > TRADITIONAL_GAMMA_HDR &&
|
||||
|
||||
Reference in New Issue
Block a user