summaryrefslogtreecommitdiff
authorSong Zhao <song.zhao@amlogic.com>2019-05-28 23:15:34 (GMT)
committer Xiaoliang Wang <xiaoliang.wang@amlogic.com>2019-06-03 02:44:33 (GMT)
commitda7b08b7fa769449943552f5fcb7fd196b851ede (patch)
tree2fbd973df6913ff1624c2e4cb43e1a3e96d36bde
parent909f7d5fadf740c6c00958b076c35261ea9639b3 (diff)
downloadcommon-da7b08b7fa769449943552f5fcb7fd196b851ede.zip
common-da7b08b7fa769449943552f5fcb7fd196b851ede.tar.gz
common-da7b08b7fa769449943552f5fcb7fd196b851ede.tar.bz2
vdin: fix the reverted luminance value
Also adjust to the right scale Change-Id: I981c4dff121111157cc6d380948fb94c89821945
Diffstat
-rw-r--r--drivers/amlogic/media/vin/tvin/vdin/vdin_ctl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/amlogic/media/vin/tvin/vdin/vdin_ctl.c b/drivers/amlogic/media/vin/tvin/vdin/vdin_ctl.c
index db1b746..99bcc57 100644
--- a/drivers/amlogic/media/vin/tvin/vdin/vdin_ctl.c
+++ b/drivers/amlogic/media/vin/tvin/vdin/vdin_ctl.c
@@ -3924,6 +3924,8 @@ void vdin_set_drm_data(struct vdin_dev_s *devp,
vf->signal_type = ((1 << 8) |
(vf->signal_type & (~0xFF00)));
} else {
+ u32 tmp;
+
memcpy(vf_dp->primaries,
devp->prop.hdr_info.hdr_data.primaries,
sizeof(u32)*6);
@@ -3933,6 +3935,9 @@ void vdin_set_drm_data(struct vdin_dev_s *devp,
memcpy(vf_dp->luminance,
&devp->prop.hdr_info.hdr_data.master_lum,
sizeof(u32)*2);
+ tmp = vf_dp->luminance[0];
+ vf_dp->luminance[0] = vf_dp->luminance[1]*10000;
+ vf_dp->luminance[1] = tmp;
/* content_light_level */
vf_dp->content_light_level.max_content =
devp->prop.hdr_info.hdr_data.mcll;