diff --git a/drivers/amlogic/media/vin/tvin/hdmirx/hdcp_rx_main.c b/drivers/amlogic/media/vin/tvin/hdmirx/hdcp_rx_main.c index 832a59e20679..a95bc2a9bb3c 100644 --- a/drivers/amlogic/media/vin/tvin/hdmirx/hdcp_rx_main.c +++ b/drivers/amlogic/media/vin/tvin/hdmirx/hdcp_rx_main.c @@ -211,9 +211,15 @@ static struct esm_device *alloc_esm_slot( /* Check if we have a matching device (same HPI base) */ for (i = 0; i < MAX_ESM_DEVICES; i++) { struct esm_device *slot = &esm_devices[i]; - - if ((slot->allocated) && (info->hpi_base) == - (slot->hpi_resource->start)) + /* Modified for SWPL-15872: + * when esm reboot,hpi_base will be the value defined + * in driver dts,not be hpi_resource->start,and it will + * not enter if(), and esm will use a new slot, + * and cause esm init fail. + */ + /* if ((slot->allocated) && (info->hpi_base) == */ + /* (slot->hpi_resource->start)) */ + if (slot->allocated) return slot; } @@ -325,7 +331,8 @@ static long init(struct file *f, void __user *arg) rc = alloc_dma_areas(esm, &info); if (rc < 0) goto err_free; - + info.hpi_base = + reg_maps[MAP_ADDR_MODULE_HDMIRX_CAPB3].phy_addr; hpi_mem = request_mem_region(info.hpi_base, 128, "esm-hpi"); if (!hpi_mem) { rc = -EADDRNOTAVAIL; diff --git a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.h b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.h index c76f4f3ec02b..6d91949e52a6 100644 --- a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.h +++ b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.h @@ -47,7 +47,7 @@ * * */ -#define RX_VER2 "ver.2019/11/01" +#define RX_VER2 "ver.2019/11/05" /*print type*/ #define LOG_EN 0x01