hdmitx: forward hdr block data to rprx [1/1]
authorZongdong Jiao <zongdong.jiao@amlogic.com>
Tue, 3 Jul 2018 06:09:10 +0000 (14:09 +0800)
committerYixun Lan <yixun.lan@amlogic.com>
Mon, 30 Jul 2018 01:27:30 +0000 (18:27 -0700)
PD#168875: hdmitx: forward hdr block data to rprx
Under repeater mode, need forward hdr block data to rprx.

Change-Id: Ib57dc4071f621e620a88cdf24340194cca1f8b24
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_edid.c
include/linux/amlogic/media/vout/hdmi_tx/hdmi_tx_module.h

index e3789810fef302eec306be936b20afc56352c8f0..1a9b18cd33a80e56143d4c1745f86b46185bfcd1 100644 (file)
@@ -1454,6 +1454,8 @@ static int hdmitx_edid_block_parse(struct hdmitx_dev *hdmitx_device,
                                case EXTENSION_DRM_TAG:
                                        Edid_ParsingDRMBlock(pRXCap,
                                                &BlockBuf[offset]);
+                                       rx_set_hdr_lumi(&BlockBuf[offset],
+                                               (BlockBuf[offset] & 0x1f) + 1);
                                        break;
                                case EXTENSION_VFPDB_TAG:
 /* Just record VFPDB offset address, call Edid_ParsingVFPDB() after DTD
@@ -2330,6 +2332,7 @@ void hdmitx_edid_ram_buffer_clear(struct hdmitx_dev *hdmitx_device)
 /* Clear the Parse result of HDMI Sink's EDID. */
 void hdmitx_edid_clear(struct hdmitx_dev *hdmitx_device)
 {
+       char tmp[2] = {0};
        struct rx_cap *pRXCap = &(hdmitx_device->RXCap);
 
        memset(pRXCap, 0, sizeof(struct rx_cap));
@@ -2350,6 +2353,8 @@ void hdmitx_edid_clear(struct hdmitx_dev *hdmitx_device)
                sizeof(hdmitx_device->EDID_hash));
        hdmitx_device->edid_parsing = 0;
        hdmitx_edid_set_default_aud(hdmitx_device);
+       rx_set_hdr_lumi(&tmp[0], 2);
+       rx_set_receiver_edid(&tmp[0], 2);
 }
 
 /*
index b397411a0a470adb7c3d78550376e7b0612dcd73..2a82aa8c70735224ee47a1858b336fc43c38c98b 100644 (file)
@@ -549,6 +549,12 @@ void __attribute__((weak))rx_edid_physical_addr(unsigned char a,
 {
 }
 
+extern int rx_set_hdr_lumi(unsigned char *data, int len);
+int __attribute__((weak))rx_set_hdr_lumi(unsigned char *data, int len)
+{
+       return 0;
+}
+
 extern void rx_set_repeater_support(bool enable);
 void __attribute__((weak))rx_set_repeater_support(bool enable)
 {