if ((rx.vs_info_details.dolby_vision == true) &&
(rx.vs_info_details.dolby_timeout <=
dv_nopacket_timeout) &&
- (rx.vs_info_details.dolby_timeout != 0))
+ (rx.vs_info_details.dolby_timeout != 0)) {
rx.vs_info_details.dolby_timeout--;
- if (rx.vs_info_details.dolby_timeout == 0) {
- rx.vs_info_details.dolby_vision = false;
- rx_pr("dv timeout\n");
+ if (rx.vs_info_details.dolby_timeout == 0) {
+ rx.vs_info_details.dolby_vision = false;
+ rx_pr("dv type 0x18 timeout\n");
+ }
}
if (log_level & VSI_LOG) {
rx_pr("prop->dolby_vision:%d\n", prop->dolby_vision);
*
*
*/
-#define RX_VER2 "ver.2019/04/02"
+#define RX_VER2 "ver.2019/04/07"
/*print type*/
#define LOG_EN 0x01
u_int i;
u_int checksum = 0;
u_int value = 0;
+ u_int tmp_addr;
if (!(pedid && pphy_addr && pchecksum))
return;
}
/* physical address info at second block */
+ if (rx.chip_id < CHIP_ID_TL1)
+ tmp_addr = TOP_EDID_OFFSET;
+ else
+ tmp_addr = TOP_EDID_ADDR_S;
for (i = 0; i <= 255; i++) {
/* fill first edid buffer */
- hdmirx_wr_top(TOP_EDID_OFFSET + i, pedid[i]);
+ hdmirx_wr_top(tmp_addr + i,
+ pedid[i]);
/* fill second edid buffer */
- hdmirx_wr_top(TOP_EDID_OFFSET + 0x100 + i, pedid[i]);
+ hdmirx_wr_top(tmp_addr + 0x100 + i,
+ pedid[i]);
+ }
+ if (rx.chip_id == CHIP_ID_TM2) {
+ for (i = 0; i <= 255; i++) {
+ /* fill first edid buffer */
+ hdmirx_wr_top(TOP_EDID_PORT2_ADDR_S + i,
+ pedid[i]);
+ /* fill second edid buffer */
+ hdmirx_wr_top(TOP_EDID_PORT2_ADDR_S + 0x100 + i,
+ pedid[i]);
+ }
+ for (i = 0; i <= 255; i++) {
+ /* fill first edid buffer */
+ hdmirx_wr_top(TOP_EDID_PORT3_ADDR_S + i,
+ pedid[i]);
+ /* fill second edid buffer */
+ hdmirx_wr_top(TOP_EDID_PORT3_ADDR_S + 0x100 + i,
+ pedid[i]);
+ }
}
/* caculate 4 port check sum */
if (brepeat) {
u_int *pphy_addr,
u_char *pchecksum)
{
- //u_int i;
+ u_int tmp_addr;
if (!(pphy_addr && pchecksum))
return;
(((pphy_addr[E_PORT1] >> 8) & 0xFF)<<8)
| (((pphy_addr[E_PORT2] >> 8) & 0xFF)<<16)
| (((pphy_addr[E_PORT3] >> 8) & 0xFF)<<24));
+
+ if (rx.chip_id == CHIP_ID_TM2) {
+ tmp_addr = TOP_EDID_ADDR_S + phy_addr_offset + 1;
+ hdmirx_wr_top(tmp_addr, pphy_addr[E_PORT0] >> 8);
+ hdmirx_wr_top(tmp_addr + 0x200, pphy_addr[E_PORT1] >> 8);
+ hdmirx_wr_top(tmp_addr + 0x400, pphy_addr[E_PORT2] >> 8);
+ }
/* physical address byte 0 */
hdmirx_wr_top(TOP_EDID_RAM_OVR1,
phy_addr_offset | (0x0f<<16));
((pphy_addr[E_PORT2] & 0xFF)<<16) |
((pphy_addr[E_PORT3] & 0xFF) << 24));
+ if (rx.chip_id == CHIP_ID_TM2) {
+ tmp_addr = TOP_EDID_ADDR_S + phy_addr_offset;
+ hdmirx_wr_top(tmp_addr, pphy_addr[E_PORT0] & 0xff);
+ hdmirx_wr_top(tmp_addr + 0x200, pphy_addr[E_PORT1] & 0xff);
+ hdmirx_wr_top(tmp_addr + 0x400, pphy_addr[E_PORT2] & 0xff);
+ }
/* checksum */
hdmirx_wr_top(TOP_EDID_RAM_OVR0,
0xff | (0x0f<<16));
pchecksum[E_PORT0]|(pchecksum[E_PORT1]<<8)|
(pchecksum[E_PORT2]<<16) | (pchecksum[E_PORT3] << 24));
+ if (rx.chip_id == CHIP_ID_TM2) {
+ tmp_addr = TOP_EDID_ADDR_S + 0xff;
+ hdmirx_wr_top(tmp_addr, pchecksum[E_PORT0]);
+ hdmirx_wr_top(tmp_addr + 0x200, pchecksum[E_PORT1]);
+ hdmirx_wr_top(tmp_addr + 0x400, pchecksum[E_PORT2]);
+ }
/* replace the second edid ram data */
/* physical address byte 1 */
phy_addr, checksum);
if (sts) {
/* update physical and checksum */
- rx_edid_update_overlay(phy_addr_offset, phy_addr, checksum);
+ rx_edid_update_overlay(phy_addr_offset,
+ phy_addr, checksum);
}
return 1;
}
ulong flags;
int data;
unsigned int dev_offset = 0;
- unsigned int tempaddr = 0;
if (rx.chip_id >= CHIP_ID_TL1) {
spin_lock_irqsave(®_rw_lock, flags);
dev_offset = TOP_DWC_BASE_OFFSET +
reg_maps[MAP_ADDR_MODULE_TOP].phy_addr;
- if ((addr >= TOP_EDID_OFFSET) &&
- (addr <= (TOP_EDID_OFFSET + 0x1ff))) {
- /*edid address range*/
- tempaddr = TOP_EDID_ADDR_S + (addr - 0x200);
+ if ((addr >= TOP_EDID_ADDR_S) &&
+ (addr <= (TOP_EDID_PORT3_ADDR_E))) {
data = rd_reg_b(MAP_ADDR_MODULE_TOP,
- dev_offset + tempaddr);
+ dev_offset + addr);
} else {
data = rd_reg(MAP_ADDR_MODULE_TOP,
dev_offset + (addr<<2));
{
ulong flags;
unsigned long dev_offset = 0;
- unsigned int tempaddr = 0;
if (rx.chip_id >= CHIP_ID_TL1) {
spin_lock_irqsave(®_rw_lock, flags);
dev_offset = TOP_DWC_BASE_OFFSET +
reg_maps[MAP_ADDR_MODULE_TOP].phy_addr;
- if ((addr >= TOP_EDID_OFFSET) &&
- (addr <= (TOP_EDID_OFFSET + 0x1ff))) {
- /*edid address range*/
- tempaddr = TOP_EDID_ADDR_S + (addr - 0x200);
+ if ((addr >= TOP_EDID_ADDR_S) &&
+ (addr <= (TOP_EDID_PORT3_ADDR_E))) {
wr_reg_b(MAP_ADDR_MODULE_TOP,
- dev_offset + tempaddr, (unsigned char)data);
+ dev_offset + addr, (unsigned char)data);
} else {
wr_reg(MAP_ADDR_MODULE_TOP,
dev_offset + (addr<<2), data);
rx_pr("0x4 1.4 edid with 420 video data\n");
rx_pr("0x5 2.0 edid with HDR,DV,420\n");
rx_pr("********************************\n");
-
- for (i = 0; i < 16; i++) {
- rx_pr("[%2d] ", i);
- for (j = 0; j < 16; j++) {
- rx_pr("0x%02lx, ",
- hdmirx_rd_top(TOP_EDID_OFFSET +
- (i * 16 + j)));
+ if (rx.chip_id < CHIP_ID_TL1) {
+ for (i = 0; i < 16; i++) {
+ rx_pr("[%2d] ", i);
+ for (j = 0; j < 16; j++) {
+ rx_pr("0x%02lx, ",
+ hdmirx_rd_top(TOP_EDID_OFFSET +
+ (i * 16 + j)));
+ }
+ rx_pr("\n");
+ }
+ } else if (rx.chip_id == CHIP_ID_TL1) {
+ for (i = 0; i < 16; i++) {
+ rx_pr("[%2d] ", i);
+ for (j = 0; j < 16; j++) {
+ rx_pr("0x%02lx, ",
+ hdmirx_rd_top(TOP_EDID_ADDR_S +
+ (i * 16 + j)));
+ }
+ rx_pr("\n");
+ }
+ } else {
+ for (i = 0; i < 16; i++) {
+ rx_pr("[%2d] ", i);
+ for (j = 0; j < 16; j++) {
+ rx_pr("0x%02lx, ",
+ hdmirx_rd_top(TOP_EDID_ADDR_S +
+ (i * 16 + j)));
+ }
+ rx_pr("\n");
+ }
+ for (i = 0; i < 16; i++) {
+ rx_pr("[%2d] ", i);
+ for (j = 0; j < 16; j++) {
+ rx_pr("0x%02lx, ",
+ hdmirx_rd_top(TOP_EDID_PORT2_ADDR_S +
+ (i * 16 + j)));
+ }
+ rx_pr("\n");
+ }
+ for (i = 0; i < 16; i++) {
+ rx_pr("[%2d] ", i);
+ for (j = 0; j < 16; j++) {
+ rx_pr("0x%02lx, ",
+ hdmirx_rd_top(TOP_EDID_PORT3_ADDR_S +
+ (i * 16 + j)));
+ }
+ rx_pr("\n");
}
- rx_pr("\n");
}
}
#define TOP_DUK_3 0x06d
#define TOP_NSEC_SCRATCH 0x06e
#define TOP_SEC_SCRATCH 0x06f
+#define TOP_EDID_OFFSET 0x200
+
/* TL1 */
#define TOP_EMP_DDR_START_A 0x070
#define TOP_EMP_DDR_START_B 0x071
#define TOP_MISC_STAT0 0x084
#define TOP_EDID_ADDR_S 0x1000
#define TOP_EDID_ADDR_E 0x11ff
+
+/* TM2 */
+#define TOP_EDID_PORT2_ADDR_S 0x1200
+#define TOP_EDID_PORT2_ADDR_E 0x13ff
+#define TOP_EDID_PORT3_ADDR_S 0x1400
+#define TOP_EDID_PORT3_ADDR_E 0x15ff
+
+
#define TOP_DWC_BASE_OFFSET 0x8000
#define TOP_DONT_TOUCH0 0x0fe
#define TOP_DONT_TOUCH1 0x0ff
-/* hdmi2.0 new end */
-#define TOP_EDID_OFFSET 0x200
-
/*
* HDMI registers
*/
rx.vs_info_details._3d_ext_data = 0;
rx.vs_info_details.low_latency = false;
rx.vs_info_details.backlt_md_bit = false;
- rx.vs_info_details.dolby_timeout = 0xffff;
+ /* rx.vs_info_details.dolby_timeout = 0xffff; */
if ((pkt->length == E_DV_LENGTH_27) &&
(pkt->ieee == 0x00d046)) {
/* dolby1.5 */
/* dobly10 */
if (pkt->length == E_DV_LENGTH_24) {
rx.vs_info_details.dolby_vision = true;
- if ((pkt->sbpkt.payload.data[0] & 0xffff) == 0)
+ if ((pkt->sbpkt.payload.data[0] & 0xffff) == 0) {
rx.vs_info_details.dolby_timeout =
dv_nopacket_timeout;
+ pkt->sbpkt.payload.data[0] = 0xffff;
+ }
} else if ((pkt->length == E_DV_LENGTH_5) &&
(pkt->sbpkt.payload.data[0] & 0xffff)) {
rx.vs_info_details.dolby_vision = false;
rx_clkrate_monitor();
rx_main_state_machine();
}
- rx_pkt_check_content();
+ /* rx_pkt_check_content(); */
rx_err_monitor();
#ifdef K_TEST_CHK_ERR_CNT
if (err_chk_en)