summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAbhinav Kumar <abhinavk@codeaurora.org>2018-09-18 18:59:12 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-10-02 17:56:22 -0700
commitc920eda6d87c5834323f4f4a773fd2a3fc260db6 (patch)
treea14be9ea466dfc7782270ee19c04ff606b1faf74 /drivers
parent070bf44aba13d672db9295f2ef2e98204c8e70ff (diff)
drm/msm: add additional HDR state transition
Add an additional HDR state transition to cover the HDR teardown sequence case. This will avoid the HDR infoframe to be programmed repeatedly if there is no change in its contents. Change-Id: Ic2f077f0c2ff01e19db5a59b218c4d824e039773 Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org> Signed-off-by: Navid Bahrani <nbahrani@codeaurora.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/msm/hdmi-staging/sde_hdmi_util.c22
-rw-r--r--drivers/gpu/drm/msm/hdmi-staging/sde_hdmi_util.h7
2 files changed, 21 insertions, 8 deletions
diff --git a/drivers/gpu/drm/msm/hdmi-staging/sde_hdmi_util.c b/drivers/gpu/drm/msm/hdmi-staging/sde_hdmi_util.c
index 8ce90b9bc162..5c3b3ec45e76 100644
--- a/drivers/gpu/drm/msm/hdmi-staging/sde_hdmi_util.c
+++ b/drivers/gpu/drm/msm/hdmi-staging/sde_hdmi_util.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -73,6 +73,7 @@ static const char *sde_hdmi_hdr_sname(enum sde_hdmi_hdr_state hdr_state)
switch (hdr_state) {
case HDR_DISABLE: return "HDR_DISABLE";
case HDR_ENABLE: return "HDR_ENABLE";
+ case HDR_RESET: return "HDR_RESET";
default: return "HDR_INVALID_STATE";
}
}
@@ -984,18 +985,23 @@ u8 sde_hdmi_hdr_get_ops(u8 curr_state,
u8 new_state)
{
- /** There could be 3 valid state transitions:
+ /** There could be 4 valid state transitions:
* 1. HDR_DISABLE -> HDR_ENABLE
*
* In this transition, we shall start sending
* HDR metadata with metadata from the HDR clip
*
- * 2. HDR_ENABLE -> HDR_ENABLE
+ * 2. HDR_ENABLE -> HDR_RESET
*
* In this transition, we will keep sending
* HDR metadata but with EOTF and metadata as 0
*
- * 3. HDR_ENABLE -> HDR_DISABLE
+ * 3. HDR_RESET -> HDR_ENABLE
+ *
+ * In this transition, we will start sending
+ * HDR metadata with metadata from the HDR clip
+ *
+ * 4. HDR_RESET -> HDR_DISABLE
*
* In this transition, we will stop sending
* metadata to the sink and clear PKT_CTRL register
@@ -1009,12 +1015,18 @@ u8 sde_hdmi_hdr_get_ops(u8 curr_state,
sde_hdmi_hdr_sname(new_state));
return HDR_SEND_INFO;
} else if ((curr_state == HDR_ENABLE)
+ && (new_state == HDR_RESET)) {
+ HDMI_UTIL_DEBUG("State changed %s ---> %s\n",
+ sde_hdmi_hdr_sname(curr_state),
+ sde_hdmi_hdr_sname(new_state));
+ return HDR_SEND_INFO;
+ } else if ((curr_state == HDR_RESET)
&& (new_state == HDR_ENABLE)) {
HDMI_UTIL_DEBUG("State changed %s ---> %s\n",
sde_hdmi_hdr_sname(curr_state),
sde_hdmi_hdr_sname(new_state));
return HDR_SEND_INFO;
- } else if ((curr_state == HDR_ENABLE)
+ } else if ((curr_state == HDR_RESET)
&& (new_state == HDR_DISABLE)) {
HDMI_UTIL_DEBUG("State changed %s ---> %s\n",
sde_hdmi_hdr_sname(curr_state),
diff --git a/drivers/gpu/drm/msm/hdmi-staging/sde_hdmi_util.h b/drivers/gpu/drm/msm/hdmi-staging/sde_hdmi_util.h
index 340e665f2c28..8a79c361b718 100644
--- a/drivers/gpu/drm/msm/hdmi-staging/sde_hdmi_util.h
+++ b/drivers/gpu/drm/msm/hdmi-staging/sde_hdmi_util.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -141,8 +141,9 @@ enum sde_hdmi_tx_hdcp2p2_rxstatus_intr_mask {
};
enum sde_hdmi_hdr_state {
- HDR_DISABLE,
- HDR_ENABLE
+ HDR_DISABLE = DRM_MSM_HDR_DISABLE,
+ HDR_ENABLE = DRM_MSM_HDR_ENABLE,
+ HDR_RESET = DRM_MSM_HDR_RESET
};
enum sde_hdmi_hdr_op {