summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-10-03 19:21:03 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-10-03 19:21:02 -0700
commit8e85f5958f874690b5f770cd765e66b28e299691 (patch)
tree8ebf8b0c19fffb2a5d6ba89e3dc41ebebdd2a69f /drivers/gpu
parent648b5d20c5774850a85542a6a0f1bebd4831f7d8 (diff)
parentc920eda6d87c5834323f4f4a773fd2a3fc260db6 (diff)
Merge "drm/msm: add additional HDR state transition"
Diffstat (limited to 'drivers/gpu')
-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 {