mirror of
https://github.com/hardkernel/kernel_common_drivers.git
synced 2026-06-25 12:03:48 +09:00
hdmitx: tx code catalog adjustment [1/1]
PD#SWPL-192367 Problem: tx code catalog adjustment Solution: tx code catalog adjustment Verify: sc2 Test: DRM-TX-78 Change-Id: I6fe38b10749f0cae47f3314bf1ba25354324a2f4 Signed-off-by: Wenjie Qiao <wenjie.qiao@amlogic.com>
This commit is contained in:
committed by
Wanwei Jiang
parent
753e4305a0
commit
548b8a4287
@@ -39,7 +39,7 @@
|
||||
#include "meson_hdmi.h"
|
||||
#include "meson_vpu.h"
|
||||
#include "meson_crtc.h"
|
||||
#include "../media/vout/hdmitx_common/hdmitx_check_valid.h"
|
||||
#include "../media/vout/hdmitx/hdmitx_check_valid.h"
|
||||
|
||||
#define HDMITX_ATTR_LEN_MAX 16
|
||||
#define HDMITX_MAX_BPC 12
|
||||
|
||||
@@ -20,11 +20,9 @@ if AMLOGIC_VOUT
|
||||
source "$(COMMON_DRIVERS_DIR)/drivers/media/vout/vclk_serve/Kconfig"
|
||||
source "$(COMMON_DRIVERS_DIR)/drivers/media/vout/vout_serve/Kconfig"
|
||||
source "$(COMMON_DRIVERS_DIR)/drivers/media/vout/lcd/Kconfig"
|
||||
source "$(COMMON_DRIVERS_DIR)/drivers/media/vout/hdmitx_common/Kconfig"
|
||||
source "$(COMMON_DRIVERS_DIR)/drivers/media/vout/peripheral_lcd/Kconfig"
|
||||
source "$(COMMON_DRIVERS_DIR)/drivers/media/vout/dsc/Kconfig"
|
||||
source "$(COMMON_DRIVERS_DIR)/drivers/media/vout/hdmitx21/Kconfig"
|
||||
source "$(COMMON_DRIVERS_DIR)/drivers/media/vout/hdmitx20/Kconfig"
|
||||
source "$(COMMON_DRIVERS_DIR)/drivers/media/vout/hdmitx/Kconfig"
|
||||
source "$(COMMON_DRIVERS_DIR)/drivers/media/vout/cvbs/Kconfig"
|
||||
source "$(COMMON_DRIVERS_DIR)/drivers/media/vout/vdac/Kconfig"
|
||||
endif
|
||||
|
||||
@@ -4,11 +4,7 @@ include $(srctree)/$(COMMON_DRIVERS_DIR)/drivers/media/vout/vclk_serve/Makefile
|
||||
|
||||
include $(srctree)/$(COMMON_DRIVERS_DIR)/drivers/media/vout/vout_serve/Makefile
|
||||
|
||||
include $(srctree)/$(COMMON_DRIVERS_DIR)/drivers/media/vout/hdmitx_common/Makefile
|
||||
|
||||
include $(srctree)/$(COMMON_DRIVERS_DIR)/drivers/media/vout/hdmitx21/Makefile
|
||||
|
||||
include $(srctree)/$(COMMON_DRIVERS_DIR)/drivers/media/vout/hdmitx20/Makefile
|
||||
include $(srctree)/$(COMMON_DRIVERS_DIR)/drivers/media/vout/hdmitx/Makefile
|
||||
|
||||
include $(srctree)/$(COMMON_DRIVERS_DIR)/drivers/media/vout/cvbs/Makefile
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
|
||||
#
|
||||
# HDMITX Common
|
||||
# HDMITX
|
||||
#
|
||||
menu "Amlogic HDMITX Common Module"
|
||||
|
||||
@@ -12,4 +12,7 @@ config AMLOGIC_HDMITX_COMMON
|
||||
This option is used to configure Amlogic drivers
|
||||
of the hdmi tx common software part
|
||||
|
||||
source "$(COMMON_DRIVERS_DIR)/drivers/media/vout/hdmitx/hw21/Kconfig"
|
||||
source "$(COMMON_DRIVERS_DIR)/drivers/media/vout/hdmitx/hw20/Kconfig"
|
||||
|
||||
endmenu
|
||||
@@ -0,0 +1,25 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX_COMMON) += \
|
||||
vout/hdmitx/hdmitx_boot_parameters.o \
|
||||
vout/hdmitx/hdmitx_common.o \
|
||||
vout/hdmitx/hdmitx_drm_hook.o \
|
||||
vout/hdmitx/hdmitx_sysfs_common.o \
|
||||
vout/hdmitx/hdmitx_edid_parse.o \
|
||||
vout/hdmitx/hdmitx_hw_common.o \
|
||||
vout/hdmitx/hdmitx_packet.o \
|
||||
vout/hdmitx/hdmitx_mode.o \
|
||||
vout/hdmitx/hdmitx_format_para.o \
|
||||
vout/hdmitx/hdmitx_mode_set.o \
|
||||
vout/hdmitx/hdmitx_audio.o \
|
||||
vout/hdmitx/hdmitx_tracer_linux.o \
|
||||
vout/hdmitx/hdmitx_event_mgr_linux.o \
|
||||
vout/hdmitx/hdmitx_log.o \
|
||||
vout/hdmitx/hdmitx_compliance.o \
|
||||
vout/hdmitx/hdmitx_check_valid.o \
|
||||
vout/hdmitx/hdmitx_hdcp.o \
|
||||
vout/hdmitx/hdmitx_infoframe.o
|
||||
|
||||
include $(srctree)/$(COMMON_DRIVERS_DIR)/drivers/media/vout/hdmitx/hw20/Makefile
|
||||
|
||||
include $(srctree)/$(COMMON_DRIVERS_DIR)/drivers/media/vout/hdmitx/hw21/Makefile
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
#include <linux/string.h>
|
||||
#include <linux/amlogic/gki_module.h>
|
||||
#include "hdmitx_boot_parameters.h"
|
||||
#include <hdmitx_log.h>
|
||||
#include "hdmitx_log.h"
|
||||
|
||||
static struct hdmitx_boot_param tx_params = {
|
||||
.fraction_refreshrate = 1,
|
||||
+7
-7
@@ -11,7 +11,7 @@
|
||||
#include <linux/rtc.h>
|
||||
#include <linux/timekeeping.h>
|
||||
#include <linux/amlogic/media/vout/hdmitx_common/hdmitx_common.h>
|
||||
#include <hdmitx_boot_parameters.h>
|
||||
#include "hdmitx_boot_parameters.h"
|
||||
#include "hdmitx_log.h"
|
||||
#include "hdmitx_check_valid.h"
|
||||
#include "../../../efuse_unifykey/efuse.h"
|
||||
@@ -183,7 +183,7 @@ int hdmitx_common_init_bootup_format_para(struct hdmitx_common *tx_comm,
|
||||
{
|
||||
int ret = 0;
|
||||
struct hdmitx_hw_common *tx_hw = tx_comm->tx_hw;
|
||||
enum hdmi_tf_type dv_type;
|
||||
enum hdmi_tf_type amdv_type;
|
||||
bool dsc_en = false;
|
||||
|
||||
if (hdmitx_hw_get_state(tx_hw, STAT_TX_OUTPUT, 0)) {
|
||||
@@ -197,8 +197,8 @@ int hdmitx_common_init_bootup_format_para(struct hdmitx_common *tx_comm,
|
||||
* the para->cs as YUV444
|
||||
*/
|
||||
if (para->cs == HDMI_COLORSPACE_RGB) {
|
||||
dv_type = hdmitx_hw_get_state(tx_hw, STAT_TX_DV, 0);
|
||||
if (dv_type == HDMI_DV_VSIF_STD)
|
||||
amdv_type = hdmitx_hw_get_state(tx_hw, STAT_TX_DV, 0);
|
||||
if (amdv_type == HDMI_DV_VSIF_STD)
|
||||
para->cs = HDMI_COLORSPACE_YUV444;
|
||||
}
|
||||
|
||||
@@ -226,10 +226,10 @@ int hdmitx_common_init_bootup_format_para(struct hdmitx_common *tx_comm,
|
||||
}
|
||||
|
||||
return ret;
|
||||
} else {
|
||||
HDMITX_INFO("%s hdmi is not enabled\n", __func__);
|
||||
return hdmitx_format_para_reset(para);
|
||||
}
|
||||
|
||||
HDMITX_INFO("%s hdmi is not enabled\n", __func__);
|
||||
return hdmitx_format_para_reset(para);
|
||||
}
|
||||
|
||||
int hdmitx_fire_drm_hpd_cb_unlocked(struct hdmitx_common *tx_comm)
|
||||
+1
-1
@@ -2536,7 +2536,7 @@ static void check_dv_truly_support(struct rx_cap *prxcap, struct dv_info *dv)
|
||||
/*
|
||||
* both standard and LL are supported. 4k60 LL
|
||||
* DV support should/can be determined using
|
||||
* video formats supported inthe E-EDID as flag
|
||||
* video formats supported in the E-EDID as flag
|
||||
* sup_2160p60hz might not be set.
|
||||
*/
|
||||
if ((dv->sup_2160p60hz ||
|
||||
+3
-3
@@ -36,9 +36,9 @@
|
||||
#include "hdmitx_log.h"
|
||||
|
||||
#ifdef CONFIG_AMLOGIC_HDMITX21
|
||||
#include "../hdmitx21/hdmi_tx_module.h"
|
||||
#include "../hdmitx21/hdmi_tx.h"
|
||||
#include "../hdmitx21/hw/enc_clk_config.h"
|
||||
#include "hw21/hdmitx_module.h"
|
||||
#include "hw21/hdmitx.h"
|
||||
#include "hw21/hdmitx_enc_clk_config.h"
|
||||
#endif
|
||||
|
||||
static struct hdmitx_common *global_tx_common;
|
||||
+1
-1
@@ -138,7 +138,7 @@ static DEVICE_ATTR_RO(rawedid);
|
||||
|
||||
/*
|
||||
* edid_parsing attr
|
||||
* If RX edid data are all correct, HEAD(00 ff ff ff ff ff ff 00), checksum,
|
||||
* If RX edid data are all correct, HEAD(00ffffffffffff00), checksum,
|
||||
* version, etc), then return "ok". Otherwise, "ng"
|
||||
* Actually, in some old televisions, EDID is stored in EEPROM.
|
||||
* some bits in EEPROM may reverse with time.
|
||||
@@ -0,0 +1,26 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX) += vout/hdmitx/hw20/hdmitx_drv.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX) += vout/hdmitx/hw20/hdmitx_video.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX) += vout/hdmitx/hw20/hdmitx_audio.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX) += vout/hdmitx/hw20/hdmitx_hdcp.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX) += vout/hdmitx/hw20/hdmitx_scdc.o
|
||||
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX) += vout/hdmitx/hw20/hdmitx_hw.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX) += vout/hdmitx/hw20/hdmitx_dump.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX) += vout/hdmitx/hw20/hdmitx_reg_ops.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX) += vout/hdmitx/hw20/hdmitx_enc_cfg_hw.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX) += vout/hdmitx/hw20/hdmitx_ddc.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX) += vout/hdmitx/hw20/hdmitx_checksha.o
|
||||
ifndef CONFIG_AMLOGIC_REMOVE_OLD
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX) += vout/hdmitx/hw20/hdmitx_hw_gxbb.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX) += vout/hdmitx/hw20/hdmitx_hw_gxtvbb.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX) += vout/hdmitx/hw20/hdmitx_hw_gxl.o
|
||||
endif
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX) += vout/hdmitx/hw20/hdmitx_hw_txlx.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX) += vout/hdmitx/hw20/hdmitx_hw_clk.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX) += vout/hdmitx/hw20/hdmitx_hw_g12a.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX) += vout/hdmitx/hw20/hdmitx_hw_sm1.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX) += vout/hdmitx/hw20/hdmitx_hw_tm2.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX) += vout/hdmitx/hw20/hdmitx_hw_sc2.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX) += vout/hdmitx/hw20/hdmitx_debug_reg.o
|
||||
+2
-3
@@ -18,9 +18,8 @@
|
||||
#include <linux/cdev.h>
|
||||
|
||||
#include <linux/amlogic/media/vout/hdmitx_common/hdmitx_common.h>
|
||||
#include "hdmi_tx_module.h"
|
||||
#include "hw/common.h"
|
||||
|
||||
#include "hdmitx_module.h"
|
||||
#include "hdmitx_common.h"
|
||||
|
||||
int hdmitx_set_audio(struct hdmitx_dev *hdev,
|
||||
struct aud_para *audio_param)
|
||||
+2
-2
@@ -6,8 +6,8 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/printk.h>
|
||||
#include <linux/string.h>
|
||||
#include "checksha.h"
|
||||
#include "../../hdmitx_common/hdmitx_log.h"
|
||||
#include "hdmitx_checksha.h"
|
||||
#include "../hdmitx_log.h"
|
||||
|
||||
static void shamsg_reset(struct shamsg_t *msg)
|
||||
{
|
||||
+3
-3
@@ -7,9 +7,9 @@
|
||||
#define __HDMITX_HW_COMMON_H__
|
||||
|
||||
#include <linux/amlogic/media/vout/hdmitx_common/hdmitx_types.h>
|
||||
#include "hdmi_tx_ddc.h"
|
||||
#include "hdmi_tx_reg.h"
|
||||
#include "../hdmi_tx_module.h"
|
||||
#include "hdmitx_ddc.h"
|
||||
#include "hdmitx_reg.h"
|
||||
#include "hdmitx_module.h"
|
||||
|
||||
int hdmitx_hpd_hw_op_gxbb(enum hpd_op cmd);
|
||||
int read_hpd_gpio_gxbb(void);
|
||||
+3
-3
@@ -24,9 +24,9 @@
|
||||
#include <linux/rtc.h>
|
||||
#include <linux/timekeeping.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "hdmi_tx_reg.h"
|
||||
#include "reg_ops.h"
|
||||
#include "hdmitx_common.h"
|
||||
#include "hdmitx_reg.h"
|
||||
#include "hdmitx_reg_ops.h"
|
||||
|
||||
const char *slave_msg[] = {
|
||||
[EDID_SLAVE] = "edid",
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
* Copyright (c) 2019 Amlogic, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "hdmi_tx_debug_reg.h"
|
||||
#include "hdmitx_debug_reg.h"
|
||||
|
||||
static unsigned int regs_hdmitx[] = {
|
||||
HDMITX_TOP_SW_RESET,
|
||||
+4
-4
@@ -6,10 +6,10 @@
|
||||
#ifndef __HDMI_TX_DEBUG_REG_H_
|
||||
#define __HDMI_TX_DEBUG_REG_H_
|
||||
|
||||
#include "hdmi_tx_hw.h"
|
||||
#include "hdmi_tx_reg.h"
|
||||
#include "mach_reg.h"
|
||||
#include "reg_sc2.h"
|
||||
#include "hdmitx_hw.h"
|
||||
#include "hdmitx_reg.h"
|
||||
#include "hdmitx_mach_reg.h"
|
||||
#include "hdmitx_reg_sc2.h"
|
||||
|
||||
#define REGS_END 0xffffffff
|
||||
|
||||
+12
-15
@@ -51,25 +51,25 @@
|
||||
#include <linux/amlogic/media/vout/hdmitx_common/hdmitx_audio.h>
|
||||
#include <linux/of_gpio.h>
|
||||
|
||||
#include "hdmi_tx_module.h"
|
||||
#include "hw/tvenc_conf.h"
|
||||
#include "hw/common.h"
|
||||
#include "hw/hw_clk.h"
|
||||
#include "hw/reg_ops.h"
|
||||
#include "hdmi_tx_hdcp.h"
|
||||
#include "meson_drm_hdmitx.h"
|
||||
#include "hdmitx_module.h"
|
||||
#include "hdmitx_tvenc_conf.h"
|
||||
#include "hdmitx_common.h"
|
||||
#include "hdmitx_hw_clk.h"
|
||||
#include "hdmitx_reg_ops.h"
|
||||
#include "hdmitx_hdcp.h"
|
||||
#include "hdmitx_meson_drm.h"
|
||||
|
||||
#include <linux/component.h>
|
||||
#include <uapi/drm/drm_mode.h>
|
||||
#include <linux/amlogic/gki_module.h>
|
||||
#include <drm/amlogic/meson_drm_bind.h>
|
||||
#include <hdmitx_boot_parameters.h>
|
||||
#include <hdmitx_drm_hook.h>
|
||||
#include <hdmitx_sysfs_common.h>
|
||||
#include "../hdmitx_boot_parameters.h"
|
||||
#include "../hdmitx_drm_hook.h"
|
||||
#include "../hdmitx_sysfs_common.h"
|
||||
#include <linux/amlogic/media/vout/hdmitx_common/hdmitx_common.h>
|
||||
#include <linux/amlogic/media/vout/hdmitx_common/hdmitx_platform_linux.h>
|
||||
#include <linux/amlogic/media/vout/hdmitx_common/hdmitx_edid.h>
|
||||
#include "../hdmitx_common/hdmitx_compliance.h"
|
||||
#include "../hdmitx_compliance.h"
|
||||
|
||||
#define DEVICE_NAME "amhdmitx"
|
||||
#define HDMI_TX_COUNT 32
|
||||
@@ -449,17 +449,14 @@ static int hdmi_hdr_status_to_drm(void)
|
||||
|
||||
void print_hsty_drm_config_data(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void print_hsty_vsif_config_data(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void print_hsty_hdr10p_config_data(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void print_hsty_hdmiaud_config_data(void)
|
||||
@@ -1537,7 +1534,7 @@ int __init amhdmitx_init(void)
|
||||
|
||||
void __exit amhdmitx_exit(void)
|
||||
{
|
||||
HDMITX_INFO("amhdmitx_exit\n");
|
||||
HDMITX_INFO("amhdmitx exit\n");
|
||||
platform_driver_unregister(&amhdmitx_driver);
|
||||
}
|
||||
|
||||
+4
-5
@@ -14,10 +14,10 @@
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/amlogic/media/vout/hdmitx_common/hdmitx_types.h>
|
||||
#include <linux/amlogic/media/vout/hdmitx_common/hdmitx_version.h>
|
||||
#include "common.h"
|
||||
#include "mach_reg.h"
|
||||
#include "reg_ops.h"
|
||||
#include "hdmi_tx_reg.h"
|
||||
#include "hdmitx_common.h"
|
||||
#include "hdmitx_mach_reg.h"
|
||||
#include "hdmitx_reg_ops.h"
|
||||
#include "hdmitx_reg.h"
|
||||
|
||||
#define PR_BUS(a) \
|
||||
do { \
|
||||
@@ -36,7 +36,6 @@ static int dump_regs_show(struct seq_file *s, void *p)
|
||||
struct hdmitx_dev *hdev = get_hdmitx_device();
|
||||
int chip_id = hdev->tx_hw.chip_data->chip_type;
|
||||
|
||||
|
||||
if (reg_maps[VPU_REG_IDX].phy_addr) {
|
||||
seq_puts(s, "\n--------ENCP registers--------\n");
|
||||
for (i = 0x1b00; i < 0x1b80; i++)
|
||||
+2
-2
@@ -22,8 +22,8 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/amlogic/media/vout/vinfo.h>
|
||||
#include "common.h"
|
||||
#include "mach_reg.h"
|
||||
#include "hdmitx_common.h"
|
||||
#include "hdmitx_mach_reg.h"
|
||||
|
||||
#define MREG_END_MARKER 0xFFFF
|
||||
|
||||
+6
-5
@@ -29,10 +29,10 @@
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/spinlock_types.h>
|
||||
#include <linux/extcon-provider.h>
|
||||
#include "hdmi_tx_module.h"
|
||||
#include "hdmitx_module.h"
|
||||
#include <linux/uaccess.h>
|
||||
#include "hw/common.h"
|
||||
#include "hdmi_tx_hdcp.h"
|
||||
#include "hdmitx_common.h"
|
||||
#include "hdmitx_hdcp.h"
|
||||
|
||||
#include <drm/drmP.h>
|
||||
#include <drm/amlogic/meson_connector_dev.h>
|
||||
@@ -41,7 +41,7 @@
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/workqueue.h>
|
||||
#include "hw/hdmi_tx_ddc.h"
|
||||
#include "hdmitx_ddc.h"
|
||||
/*
|
||||
* hdmi_tx_hdcp.c
|
||||
* version 1.1
|
||||
@@ -73,7 +73,7 @@ unsigned int hdcp_get_downstream_ver(struct hdmitx_dev *hdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Notic: the HDCP key setting has been moved to uboot
|
||||
/* Notice: the HDCP key setting has been moved to uboot
|
||||
* On MBX project, it is too late for HDCP get from
|
||||
* other devices
|
||||
*/
|
||||
@@ -1003,6 +1003,7 @@ const struct file_operations hdcplog_ops = {
|
||||
.read = hdcplog_read,
|
||||
.open = hdcplog_open,
|
||||
};
|
||||
|
||||
static struct dentry *hdmitx_dbgfs;
|
||||
|
||||
int hdmitx_hdcp_init(struct hdmitx_dev *hdev)
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
* version 1.0
|
||||
*/
|
||||
|
||||
/* Notic: the HDCP key setting has been moved to uboot
|
||||
/* Notice: the HDCP key setting has been moved to uboot
|
||||
* On MBX project, it is too late for HDCP get from
|
||||
* other devices
|
||||
*/
|
||||
+13
-13
@@ -32,23 +32,23 @@
|
||||
#include <linux/amlogic/media/vout/hdmitx_common/hdmitx_common.h>
|
||||
#include <linux/reset.h>
|
||||
#include <linux/compiler.h>
|
||||
#include "mach_reg.h"
|
||||
#include "hdmi_tx_reg.h"
|
||||
#include "tvenc_conf.h"
|
||||
#include "common.h"
|
||||
#include "hdmi_tx_hw.h"
|
||||
#include "hw_clk.h"
|
||||
#include "hdmitx_mach_reg.h"
|
||||
#include "hdmitx_reg.h"
|
||||
#include "hdmitx_tvenc_conf.h"
|
||||
#include "hdmitx_common.h"
|
||||
#include "hdmitx_hw.h"
|
||||
#include "hdmitx_hw_clk.h"
|
||||
#include <linux/arm-smccc.h>
|
||||
#ifdef CONFIG_AMLOGIC_VPU
|
||||
#include <linux/amlogic/media/vpu/vpu.h>
|
||||
#endif
|
||||
#include "checksha.h"
|
||||
#include "reg_sc2.h"
|
||||
#include "hdmi_tx_debug_reg.h"
|
||||
#include "../hdmi_tx_module.h"
|
||||
#include "hdmitx_checksha.h"
|
||||
#include "hdmitx_reg_sc2.h"
|
||||
#include "hdmitx_debug_reg.h"
|
||||
#include "hdmitx_module.h"
|
||||
#include <linux/amlogic/clk_measure.h>
|
||||
#include "../../hdmitx_common/hdmitx_compliance.h"
|
||||
#include "../meson_drm_hdmitx.h"
|
||||
#include "../hdmitx_compliance.h"
|
||||
#include "hdmitx_meson_drm.h"
|
||||
#include <linux/amlogic/media/vout/hdmitx_common/hdmitx_infoframe.h>
|
||||
|
||||
#define HDMITX_VIC_MASK 0xff
|
||||
@@ -6505,7 +6505,7 @@ static void config_hdmi20_tx(enum hdmi_vic vic,
|
||||
hdmitx_wr_reg(HDMITX_DWC_FC_CTRLDUR, 12);
|
||||
/* extended control period duration (typ 32 tmds periods) */
|
||||
hdmitx_wr_reg(HDMITX_DWC_FC_EXCTRLDUR, 32);
|
||||
/* max interval betwen extended control period duration (typ 50) */
|
||||
/* max interval between extended control period duration (typ 50) */
|
||||
hdmitx_wr_reg(HDMITX_DWC_FC_EXCTRLSPAC, 1);
|
||||
/* preamble filler */
|
||||
hdmitx_wr_reg(HDMITX_DWC_FC_CH0PREAM, 0x0b);
|
||||
+4
-4
@@ -9,10 +9,10 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/amlogic/clk_measure.h>
|
||||
#include "common.h"
|
||||
#include "mach_reg.h"
|
||||
#include "reg_sc2.h"
|
||||
#include "hw_clk.h"
|
||||
#include "hdmitx_common.h"
|
||||
#include "hdmitx_mach_reg.h"
|
||||
#include "hdmitx_reg_sc2.h"
|
||||
#include "hdmitx_hw_clk.h"
|
||||
#ifdef CONFIG_AMLOGIC_VPU
|
||||
#include <linux/amlogic/media/vpu/vpu.h>
|
||||
#endif
|
||||
+2
-2
@@ -8,8 +8,8 @@
|
||||
|
||||
#include <linux/amlogic/media/vout/hdmitx_common/hdmitx_types.h>
|
||||
#include <linux/amlogic/media/vout/vinfo.h>
|
||||
#include "hdmi_tx_hw.h"
|
||||
#include "common.h"
|
||||
#include "hdmitx_hw.h"
|
||||
#include "hdmitx_common.h"
|
||||
|
||||
#define VID_PLL_DIV_1 0
|
||||
#define VID_PLL_DIV_2 1
|
||||
+3
-3
@@ -5,9 +5,9 @@
|
||||
|
||||
#include <linux/printk.h>
|
||||
#include <linux/pinctrl/devinfo.h>
|
||||
#include "common.h"
|
||||
#include "mach_reg.h"
|
||||
#include "../../hdmitx_common/hdmitx_compliance.h"
|
||||
#include "hdmitx_common.h"
|
||||
#include "hdmitx_mach_reg.h"
|
||||
#include "../hdmitx_compliance.h"
|
||||
|
||||
/*
|
||||
* NAME PAD PINMUX GPIO
|
||||
+2
-2
@@ -4,8 +4,8 @@
|
||||
*/
|
||||
|
||||
#include <linux/printk.h>
|
||||
#include "common.h"
|
||||
#include "mach_reg.h"
|
||||
#include "hdmitx_common.h"
|
||||
#include "hdmitx_mach_reg.h"
|
||||
|
||||
/*
|
||||
* NAME PAD PINMUX GPIO
|
||||
+2
-2
@@ -4,8 +4,8 @@
|
||||
*/
|
||||
|
||||
#include <linux/printk.h>
|
||||
#include "common.h"
|
||||
#include "mach_reg.h"
|
||||
#include "hdmitx_common.h"
|
||||
#include "hdmitx_mach_reg.h"
|
||||
|
||||
/*
|
||||
* From GXL chips, registers names changes.
|
||||
+2
-2
@@ -5,8 +5,8 @@
|
||||
|
||||
#include <linux/printk.h>
|
||||
#include <linux/kernel.h>
|
||||
#include "common.h"
|
||||
#include "mach_reg.h"
|
||||
#include "hdmitx_common.h"
|
||||
#include "hdmitx_mach_reg.h"
|
||||
|
||||
/*
|
||||
* NAME PAD PINMUX GPIO
|
||||
+4
-4
@@ -4,10 +4,10 @@
|
||||
*/
|
||||
|
||||
#include <linux/printk.h>
|
||||
#include "../../hdmitx_common/hdmitx_compliance.h"
|
||||
#include "common.h"
|
||||
#include "mach_reg.h"
|
||||
#include "reg_sc2.h"
|
||||
#include "../hdmitx_compliance.h"
|
||||
#include "hdmitx_common.h"
|
||||
#include "hdmitx_mach_reg.h"
|
||||
#include "hdmitx_reg_sc2.h"
|
||||
|
||||
#ifdef WAIT_FOR_PLL_LOCKED
|
||||
#undef WAIT_FOR_PLL_LOCKED
|
||||
+2
-2
@@ -4,8 +4,8 @@
|
||||
*/
|
||||
|
||||
#include <linux/printk.h>
|
||||
#include "common.h"
|
||||
#include "mach_reg.h"
|
||||
#include "hdmitx_common.h"
|
||||
#include "hdmitx_mach_reg.h"
|
||||
|
||||
void set_phy_by_mode_sm1(unsigned int mode)
|
||||
{
|
||||
+2
-2
@@ -4,8 +4,8 @@
|
||||
*/
|
||||
|
||||
#include <linux/printk.h>
|
||||
#include "common.h"
|
||||
#include "mach_reg.h"
|
||||
#include "hdmitx_common.h"
|
||||
#include "hdmitx_mach_reg.h"
|
||||
|
||||
void hdmitx_phy_bandgap_en_tm2(void)
|
||||
{
|
||||
+3
-3
@@ -5,9 +5,9 @@
|
||||
|
||||
#include <linux/printk.h>
|
||||
#include <linux/pinctrl/devinfo.h>
|
||||
#include "common.h"
|
||||
#include "reg_ops.h"
|
||||
#include "txlx_reg.h"
|
||||
#include "hdmitx_common.h"
|
||||
#include "hdmitx_reg_ops.h"
|
||||
#include "hdmitx_txlx_reg.h"
|
||||
|
||||
unsigned int hdmitx_get_format_txlx(void)
|
||||
{
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
#define __MACH_REG_H__
|
||||
|
||||
#include <linux/delay.h>
|
||||
#include "reg_ops.h"
|
||||
#include "hdmitx_reg_ops.h"
|
||||
|
||||
struct reg_s {
|
||||
unsigned int reg;
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
#ifndef _MESON_DRM_HDMITX_H
|
||||
#define _MESON_DRM_HDMITX_H
|
||||
#include "hdmi_tx_module.h"
|
||||
#include "hdmitx_module.h"
|
||||
|
||||
void drm_hdmitx_hdcp22_init(void);
|
||||
|
||||
+4
-4
@@ -5,8 +5,8 @@
|
||||
|
||||
#ifndef _HDMI_TX_MODULE_H
|
||||
#define _HDMI_TX_MODULE_H
|
||||
#include "hdmi_config.h"
|
||||
#include "hdmi_hdcp.h"
|
||||
#include "hdmitx_config.h"
|
||||
#include "hdmitx_hdcp_type.h"
|
||||
#include <linux/wait.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/cdev.h>
|
||||
@@ -22,8 +22,8 @@
|
||||
#include <linux/amlogic/media/vout/hdmitx_common/hdmitx_common.h>
|
||||
#include <linux/amlogic/media/vout/hdmitx_common/hdmitx_hw_common.h>
|
||||
#include <linux/amlogic/media/vout/hdmi_tx_repeater.h>
|
||||
#include "hw/hdmi_tx_hw.h"
|
||||
#include "../hdmitx_common/hdmitx_log.h"
|
||||
#include "hdmitx_hw.h"
|
||||
#include "../hdmitx_log.h"
|
||||
|
||||
#define DEVICE_NAME "amhdmitx"
|
||||
|
||||
+3
-3
@@ -21,9 +21,9 @@
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/arm-smccc.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "hdmi_tx_reg.h"
|
||||
#include "reg_ops.h"
|
||||
#include "hdmitx_common.h"
|
||||
#include "hdmitx_reg.h"
|
||||
#include "hdmitx_reg_ops.h"
|
||||
|
||||
struct reg_map reg_maps[REG_IDX_END] = {0};
|
||||
int hdmitx_init_reg_map(struct platform_device *pdev)
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
#ifndef __REG_SC2_H__
|
||||
#define __REG_SC2_H__
|
||||
#include "reg_ops.h"
|
||||
#include "hdmitx_reg_ops.h"
|
||||
|
||||
/* REG_BASE: REGISTER_BASE_ADDR = 0xfe000000 */
|
||||
#define CLKCTRL_SYS_CLK_EN0_REG2 0x0013
|
||||
+2
-2
@@ -4,8 +4,8 @@
|
||||
*/
|
||||
|
||||
#include <linux/delay.h>
|
||||
#include "hdmi_tx_module.h"
|
||||
#include "hw/common.h"
|
||||
#include "hdmitx_module.h"
|
||||
#include "hdmitx_common.h"
|
||||
|
||||
void scdc_config(struct hdmitx_dev *hdev)
|
||||
{
|
||||
+1
-1
@@ -3,6 +3,6 @@
|
||||
* Copyright (c) 2019 Amlogic, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
#include "hdmitx_common.h"
|
||||
|
||||
void set_vmode_enc_hw(struct hdmitx_dev *hdev);
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
#ifndef __TXLX_REG_H__
|
||||
#define __TXLX_REG_H__
|
||||
#include "reg_ops.h"
|
||||
#include "hdmitx_reg_ops.h"
|
||||
|
||||
#define RESET0_REGISTER 0x401
|
||||
#define P_RESET0_REGISTER CBUS_REG_ADDR(RESET0_REGISTER)
|
||||
+2
-2
@@ -18,8 +18,8 @@
|
||||
#include <linux/cdev.h>
|
||||
|
||||
#include <linux/amlogic/media/vout/hdmitx_common/hdmitx_common.h>
|
||||
#include "hdmi_tx_module.h"
|
||||
#include "hw/common.h"
|
||||
#include "hdmitx_module.h"
|
||||
#include "hdmitx_common.h"
|
||||
|
||||
/* Old definitions */
|
||||
#define TYPE_AVI_INFOFRAMES 0x82
|
||||
@@ -6,9 +6,8 @@
|
||||
menu "Amlogic HDMITX Module"
|
||||
|
||||
config AMLOGIC_HDMITX21
|
||||
bool "AMLOGIC HDMITX21 driver"
|
||||
bool "AMLOGIC HDMITX driver"
|
||||
default n
|
||||
select HDMI
|
||||
select AMLOGIC_HDMITX_COMMON
|
||||
help
|
||||
This option is used to configure Amlogic drivers
|
||||
@@ -0,0 +1,31 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx/hw21/hdmitx_drv.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx/hw21/hdmitx_video.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx/hw21/hdmitx_audio.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx/hw21/hdmitx_hdcp.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx/hw21/hdmitx_scdc.o
|
||||
ifndef CONFIG_AMLOGIC_ZAPPER_CUT
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx/hw21/hdmitx_vrr.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx/hw21/hdmitx_frl.o
|
||||
endif
|
||||
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx/hw21/hdmitx_hw.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx/hw21/hdmitx_pktmgmt.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx/hw21/hdmitx_reg_ops.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx/hw21/hdmitx_enc_cfg_hw.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx/hw21/hdmitx_ddc.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx/hw21/hdmitx_hw_clk.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx/hw21/hdmitx_dump.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx/hw21/hdmitx_hw_t7.o
|
||||
ifndef CONFIG_AMLOGIC_ZAPPER_CUT
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx/hw21/hdmitx_hw_s5.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx/hw21/hdmitx_hw_s7.o
|
||||
endif
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx/hw21/hdmitx_hw_s1a.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx/hw21/hdmitx_hw_s7.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx/hw21/hdmitx_hw_s7d.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx/hw21/hdmitx_hw_s6.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx/hw21/hdmitx_hw_hdcp.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx/hw21/hdmitx_interrupts.o
|
||||
$(MEDIA_MODULE_NAME)-$(CONFIG_AMLOGIC_HDMITX21) += vout/hdmitx/hw21/hdmitx_frl_training.o
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <linux/hdmi.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include "hdmi_tx_module.h"
|
||||
#include "hdmitx_module.h"
|
||||
|
||||
/* L_0 will always be printed, set log level to L_1/2/3 for detail */
|
||||
#define L_0 0
|
||||
+2
-2
@@ -17,8 +17,8 @@
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/cdev.h>
|
||||
#include <linux/amlogic/media/vout/hdmitx_common/hdmitx_common.h>
|
||||
#include "hdmi_tx_module.h"
|
||||
#include "hw/common.h"
|
||||
#include "hdmitx_module.h"
|
||||
#include "hdmitx_common.h"
|
||||
|
||||
int hdmitx21_set_audio(struct hdmitx_dev *hdev,
|
||||
struct aud_para *audio_param)
|
||||
+5
-5
@@ -22,11 +22,11 @@
|
||||
#include <linux/cdev.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/amlogic/media/vout/hdmitx_common/hdmitx_types.h>
|
||||
#include "../hdmi_tx.h"
|
||||
#include "../hdmi_tx_module.h"
|
||||
#include "hdmi_tx_reg.h"
|
||||
#include "hdmi_tx_ddc.h"
|
||||
#include "register.h"
|
||||
#include "hdmitx.h"
|
||||
#include "hdmitx_module.h"
|
||||
#include "hdmitx_reg.h"
|
||||
#include "hdmitx_ddc.h"
|
||||
#include "hdmitx_register.h"
|
||||
|
||||
enum map_addr_idx_e {
|
||||
VPUCTRL_REG_IDX,
|
||||
+1
-1
@@ -21,7 +21,7 @@
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/clk.h>
|
||||
#include "common.h"
|
||||
#include "hdmitx_common.h"
|
||||
|
||||
static DEFINE_MUTEX(ddc_mutex);
|
||||
|
||||
+11
-11
@@ -45,11 +45,11 @@
|
||||
#endif
|
||||
#include <linux/amlogic/media/vrr/vrr.h>
|
||||
|
||||
#include "hdmi_tx_module.h"
|
||||
#include "hdmi_tx.h"
|
||||
#include "hdmi_config.h"
|
||||
#include "hw/hdmi_tx_ddc.h"
|
||||
#include "hw/common.h"
|
||||
#include "hdmitx_module.h"
|
||||
#include "hdmitx.h"
|
||||
#include "hdmitx_config.h"
|
||||
#include "hdmitx_ddc.h"
|
||||
#include "hdmitx_common.h"
|
||||
|
||||
#include <linux/amlogic/gki_module.h>
|
||||
#include <linux/component.h>
|
||||
@@ -57,16 +57,16 @@
|
||||
#include <drm/amlogic/meson_drm_bind.h>
|
||||
#include <../../vin/tvin/tvin_global.h>
|
||||
#include <../../vin/tvin/hdmirx/hdmi_rx_repeater.h>
|
||||
#include <hdmitx_boot_parameters.h>
|
||||
#include <hdmitx_drm_hook.h>
|
||||
#include <hdmitx_sysfs_common.h>
|
||||
#include "../hdmitx_boot_parameters.h"
|
||||
#include "../hdmitx_drm_hook.h"
|
||||
#include "../hdmitx_sysfs_common.h"
|
||||
#include <linux/amlogic/media/vout/hdmitx_common/hdmitx_common.h>
|
||||
#include <linux/amlogic/media/vout/hdmitx_common/hdmitx_format_para.h>
|
||||
#include <linux/amlogic/media/vout/hdmitx_common/hdmitx_platform_linux.h>
|
||||
#include <linux/amlogic/media/vout/hdmitx_common/hdmitx_audio.h>
|
||||
#include <linux/amlogic/media/vout/hdmitx_common/hdmitx_edid.h>
|
||||
#include "../hdmitx_common/hdmitx_compliance.h"
|
||||
#include "../hdmitx_common/hdmitx_check_valid.h"
|
||||
#include "../hdmitx_compliance.h"
|
||||
#include "../hdmitx_check_valid.h"
|
||||
|
||||
#ifdef CONFIG_AMLOGIC_DSC
|
||||
#include <linux/amlogic/media/vout/dsc.h>
|
||||
@@ -294,7 +294,6 @@ static void hdmitx_early_suspend(struct early_suspend *h)
|
||||
struct hdmitx_dev *hdev = (struct hdmitx_dev *)h->param;
|
||||
bool need_rst_ratio = hdmitx_find_vendor_ratio(hdev->tx_comm.EDID_buf);
|
||||
|
||||
|
||||
if (hdev->tx_comm.aon_output) {
|
||||
HDMITX_INFO("%s return, HDMI signal enabled\n", __func__);
|
||||
return;
|
||||
@@ -2500,6 +2499,7 @@ static struct platform_driver amhdmitx_driver = {
|
||||
int __init amhdmitx21_init(void)
|
||||
{
|
||||
struct hdmitx_boot_param *param = get_hdmitx_boot_params();
|
||||
|
||||
if (param->init_state & INIT_FLAG_NOT_LOAD) {
|
||||
HDMITX_INFO("INIT_FLAG_NOT_LOAD");
|
||||
return 0;
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/amlogic/media/vout/hdmitx_common/hdmitx_version.h>
|
||||
#include "common.h"
|
||||
#include "hdmitx_common.h"
|
||||
#include <linux/fs.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/types.h>
|
||||
+5
-5
@@ -22,10 +22,10 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/amlogic/media/vout/vinfo.h>
|
||||
#include "common.h"
|
||||
#include "enc_clk_config.h"
|
||||
#include "register.h"
|
||||
#include "../hdmi_tx.h"
|
||||
#include "hdmitx_common.h"
|
||||
#include "hdmitx_enc_clk_config.h"
|
||||
#include "hdmitx_register.h"
|
||||
#include "hdmitx.h"
|
||||
|
||||
/* ENCP_VIDEO_H/V are used for fetching video data from VPP
|
||||
* and send data to ENCP_DVI/DE_H/V* via a fifo (pixel delay)
|
||||
@@ -462,7 +462,7 @@ static void config_tv_enci(enum hdmi_vic vic)
|
||||
hd21_write_reg(ENCI_VFIFO2VD_LINE_BOT_END, 18 + 240);
|
||||
hd21_write_reg(ENCI_VFIFO2VD_CTL, (0x4e << 8) | 1); // enable vfifo2vd
|
||||
hd21_write_reg(ENCI_DBG_FLDLN_RST, 0x0f05);
|
||||
/* adujst timming for s5 480i */
|
||||
/* adjust timming for s5 480i */
|
||||
hd21_write_reg(ENCI_SYNC_VSO_EVNLN, 0x0003);
|
||||
hd21_write_reg(ENCI_SYNC_VSO_ODDLN, 0x0003);
|
||||
hd21_write_reg(ENCI_SYNC_HSO_BEGIN, 11 - 2);
|
||||
+14
-15
@@ -4,8 +4,8 @@
|
||||
*/
|
||||
|
||||
#include <linux/delay.h>
|
||||
#include "hdmi_tx_module.h"
|
||||
#include "hw/common.h"
|
||||
#include "hdmitx_module.h"
|
||||
#include "hdmitx_common.h"
|
||||
|
||||
#define MAX_SUPPORTED_FRL_RATE FRL_12G4L /* TODO */
|
||||
#define FRL_RATE_ERR 0xff
|
||||
@@ -614,19 +614,18 @@ tx_lts_p3:
|
||||
frl_tx_callback(FRL_EVENT_STOP);
|
||||
p->flt_tx_state = FLT_TX_LTS_3;
|
||||
break;
|
||||
} else {
|
||||
/* start hdcp after training pass */
|
||||
/* if no hdcp2.2 key on board, then skip */
|
||||
if (get_hdcp2_lstore() &&
|
||||
hdmitx21_get_hdcp_mode() == 0) {
|
||||
/* get downstream hdcp2.2 version in certain place,
|
||||
* as ddc stall request in poll_update_flags() may
|
||||
* affect hdcp version read.
|
||||
*/
|
||||
if (!hdev->dw_hdcp22_cap)
|
||||
hdev->dw_hdcp22_cap = is_rx_hdcp2ver();
|
||||
schedule_delayed_work(&hdev->work_start_hdcp, HZ / 4);
|
||||
}
|
||||
}
|
||||
/* start hdcp after training pass */
|
||||
/* if no hdcp2.2 key on board, then skip */
|
||||
if (get_hdcp2_lstore() &&
|
||||
hdmitx21_get_hdcp_mode() == 0) {
|
||||
/* get downstream hdcp2.2 version in certain place,
|
||||
* as ddc stall request in poll_update_flags() may
|
||||
* affect hdcp version read.
|
||||
*/
|
||||
if (!hdev->dw_hdcp22_cap)
|
||||
hdev->dw_hdcp22_cap = is_rx_hdcp2ver();
|
||||
schedule_delayed_work(&hdev->work_start_hdcp, HZ / 4);
|
||||
}
|
||||
break;
|
||||
}
|
||||
+3
-3
@@ -28,9 +28,9 @@
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/amlogic/media/vout/vinfo.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "enc_clk_config.h"
|
||||
#include "../hdmi_tx.h"
|
||||
#include "hdmitx_common.h"
|
||||
#include "hdmitx_enc_clk_config.h"
|
||||
#include "hdmitx.h"
|
||||
/*
|
||||
* Config hdmitx Data Flow metering
|
||||
* bw_type: 1: Full BW
|
||||
+6
-6
@@ -27,10 +27,10 @@
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/spinlock_types.h>
|
||||
#include <linux/extcon-provider.h>
|
||||
#include "hw/hdmi_tx_reg.h"
|
||||
#include "hdmi_tx.h"
|
||||
#include "hdmitx_reg.h"
|
||||
#include "hdmitx.h"
|
||||
#include <../../vin/tvin/hdmirx/hdmi_rx_repeater.h>
|
||||
#include "hdmi_tx_module.h"
|
||||
#include "hdmitx_module.h"
|
||||
|
||||
#define TEE_HDCP_IOC_START _IOW('P', 0, int)
|
||||
#define TEE_HDCP_IOC_VALIDATE_KEY _IOWR('P', 0x1, int)
|
||||
@@ -414,9 +414,9 @@ static void hdcptx_encryption_update(struct hdcp_t *p_hdcp, bool en)
|
||||
if (p_hdcp->ds_auth) {
|
||||
p_hdcp->encryption_enabled = en;
|
||||
|
||||
if (p_hdcp->hdcp_type == HDCP_VER_HDCP1X)
|
||||
if (p_hdcp->hdcp_type == HDCP_VER_HDCP1X) {
|
||||
hdcptx1_encryption_update(en);
|
||||
else if (p_hdcp->hdcp_type == HDCP_VER_HDCP2X) {
|
||||
} else if (p_hdcp->hdcp_type == HDCP_VER_HDCP2X) {
|
||||
hdcptx1_encryption_update(en);
|
||||
hdcptx2_encryption_update(en);
|
||||
}
|
||||
@@ -1328,7 +1328,7 @@ static void hdcp1x_process_intr(struct hdcp_t *p_hdcp, u8 int_reg[])
|
||||
}
|
||||
switch (hdcptx1_ksv_v_get() & 0xc0) {
|
||||
case 0xc0:
|
||||
pr_hdcp_info(L_1, "hdcptx1: the rx auth is pass and rx repeter auth is begin\n");
|
||||
pr_hdcp_info(L_1, "hdcptx1: the rx auth is pass and rx repeater auth is begin\n");
|
||||
break;
|
||||
case 0x80:
|
||||
pr_hdcp_info(L_1, "hdcptx1: the rx all auth is pass\n");
|
||||
+12
-10
@@ -28,12 +28,12 @@
|
||||
#include <linux/amlogic/media/video_sink/video.h>
|
||||
#include <linux/amlogic/media/vout/vinfo.h>
|
||||
#include <linux/arm-smccc.h>
|
||||
#include "common.h"
|
||||
#include "hdmi_tx_hw.h"
|
||||
#include "enc_clk_config.h"
|
||||
#include "hdmitx_common.h"
|
||||
#include "hdmitx_hw.h"
|
||||
#include "hdmitx_enc_clk_config.h"
|
||||
#include <linux/amlogic/clk_measure.h>
|
||||
#include "../hdmi_tx.h"
|
||||
#include "../../hdmitx_common/hdmitx_compliance.h"
|
||||
#include "hdmitx.h"
|
||||
#include "../hdmitx_compliance.h"
|
||||
|
||||
#define to_hdmitx21_dev(x) container_of(x, struct hdmitx_dev, tx_hw.base)
|
||||
#define yuv2rgb 1
|
||||
@@ -899,6 +899,7 @@ static void set_vid_clk_div(u32 div)
|
||||
static void set_hdmi_tx_pixel_div(u32 div)
|
||||
{
|
||||
struct hdmitx_dev *hdev = get_hdmitx21_device();
|
||||
|
||||
hd21_set_reg_bits(CLKCTRL_VID_CLK0_CTRL2, 1, 5, 1);
|
||||
//for s7
|
||||
if (hdev->tx_hw.chip_data->chip_type == MESON_CPU_ID_S7 ||
|
||||
@@ -2499,6 +2500,7 @@ static void hdmitx_debug(struct hdmitx_hw_common *tx_hw, const char *buf)
|
||||
}
|
||||
if (strncmp(tmpbuf + 4, "auto", 4) == 0) {
|
||||
const struct hdmi_timing *t;
|
||||
|
||||
t = ¶->timing;
|
||||
value = t->h_active;
|
||||
/* when FRL works, here will be half rate */
|
||||
@@ -2607,6 +2609,7 @@ static void hdmitx_debug(struct hdmitx_hw_common *tx_hw, const char *buf)
|
||||
adr, read_back);
|
||||
} else if (tmpbuf[0] == 'r') {
|
||||
u8 val;
|
||||
|
||||
ret = kstrtoul(tmpbuf + 2, 16, &adr);
|
||||
/* scdc register read */
|
||||
if (buf[1] == 's') {
|
||||
@@ -3010,7 +3013,7 @@ static void set_t7_top_div40(u32 div40)
|
||||
}
|
||||
hdmitx21_wr_reg(HDMITX_T7_TOP_TMDS_CLK_PTTN_CNTL, 0x1);
|
||||
// [14:12] tmds_sel: 0=output 0; 1=output normal data;
|
||||
// 2=output PRBS; 4=output shift pattn
|
||||
// 2=output PRBS; 4=output shift pattern
|
||||
// [11: 8] shift_pttn
|
||||
// [ 4: 0] prbs_pttn
|
||||
data32 = 0;
|
||||
@@ -3043,7 +3046,7 @@ static void set_s5_top_div40(u32 div40, u32 frl_mode)
|
||||
}
|
||||
hdmitx21_wr_reg(HDMITX_S5_TOP_TMDS_CLK_PTTN_CNTL, 0x1);
|
||||
// [18:16] tmds_sel: 0=output 0; 1=output normal data;
|
||||
// 2=output PRBS; 4=output shift pattn
|
||||
// 2=output PRBS; 4=output shift pattern
|
||||
// [11: 8] shift_pttn
|
||||
// [ 4: 0] prbs_pttn
|
||||
data32 = 0;
|
||||
@@ -3561,7 +3564,6 @@ static int hdmitx_cntl_misc(struct hdmitx_hw_common *tx_hw, u32 cmd,
|
||||
else
|
||||
hdmitx21_wr_reg(HDMITX_TOP_INTR_STAT, 1 << 2);
|
||||
return 0;
|
||||
break;
|
||||
case MISC_TMDS_PHY_OP:
|
||||
if (argv == TMDS_PHY_ENABLE) {
|
||||
hdmitx_phy_pre_init(hdev);
|
||||
@@ -3993,7 +3995,7 @@ static void config_hdmi21_tx(struct hdmitx_dev *hdev)
|
||||
hdmitx21_wr_reg(VTEM_CTRL_IVCTX, 0x04); //[2] reg_vtem_ctrl
|
||||
hdmitx21_wr_reg(GEN5_CTRL_IVCTX, 0x04); //[7:2] reg_gen5_ctrl
|
||||
|
||||
//drm,emp pacekt
|
||||
//drm,emp packet
|
||||
hdmitx21_wr_reg(HDMITX_TOP_HS_INTR_CNTL, 0x010); //set TX hs_int h_cnt
|
||||
//tx_program_drm_emp(int_ext,active_lines,blank_lines,128);
|
||||
|
||||
@@ -4237,7 +4239,7 @@ void hdmitx_dhdr_send(u8 *body, int max_size)
|
||||
data |= (0 << 4); //[ 4] reg_set_new_in_middle
|
||||
data |= (0 << 3); //[ 3] reg_set_new_always
|
||||
data |= (1 << 2); //[ 2] reg_to_err_ctrl
|
||||
data |= (0 << 1); //[ 1] feg_fapa1_supprot. =0:FAPA start only after second active line.
|
||||
data |= (0 << 1); //[ 1] feg_fapa1_support. =0:FAPA start only after second active line.
|
||||
data |= (1 << 0); //[ 0] reg_set_end_for_mlds
|
||||
hdmitx21_wr_reg(D_HDR_INSERT_CTL_2_IVCTX, data);
|
||||
|
||||
+1
-2
@@ -8,7 +8,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/amlogic/clk_measure.h>
|
||||
#include "common.h"
|
||||
#include "hdmitx_common.h"
|
||||
|
||||
#ifdef CONFIG_AMLOGIC_VPU
|
||||
#include <linux/amlogic/media/vpu/vpu.h>
|
||||
@@ -1729,7 +1729,6 @@ void hdmitx21_set_clk(struct hdmitx_dev *hdev)
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void hdmitx21_disable_clk(struct hdmitx_dev *hdev)
|
||||
+5
-5
@@ -22,7 +22,7 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/arm-smccc.h>
|
||||
#include "common.h"
|
||||
#include "hdmitx_common.h"
|
||||
|
||||
bool hdcptx1_load_key(void)
|
||||
{
|
||||
@@ -142,12 +142,12 @@ void hdcptx1_protection_enable(bool en)
|
||||
hdmitx21_set_bit(TPI_COPP_DATA2_IVCTX, BIT_TPI_COPP_DATA2_CANCEL_PROT_EN, false);
|
||||
hdmitx21_set_bit(TPI_COPP_DATA2_IVCTX, (BIT_TPI_COPP_DATA2_COPP_PROTLEVEL |
|
||||
BIT_TPI_COPP_DATA2_DOUBLE_RI_CHECK |
|
||||
BIT_TPI_COPP_DATA2_INTERM_RI_CHECK_EN |
|
||||
BIT_TPI_COPP_DATA2_INTER_RI_CHECK_EN |
|
||||
BIT_TPI_COPP_DATA2_KSV_FORWARD), true);
|
||||
} else {
|
||||
hdmitx21_set_bit(TPI_COPP_DATA2_IVCTX, (BIT_TPI_COPP_DATA2_COPP_PROTLEVEL |
|
||||
BIT_TPI_COPP_DATA2_DOUBLE_RI_CHECK |
|
||||
BIT_TPI_COPP_DATA2_INTERM_RI_CHECK_EN |
|
||||
BIT_TPI_COPP_DATA2_INTER_RI_CHECK_EN |
|
||||
BIT_TPI_COPP_DATA2_KSV_FORWARD), false);
|
||||
hdmitx21_set_bit(TPI_COPP_DATA2_IVCTX,
|
||||
BIT_TPI_COPP_DATA2_CANCEL_PROT_EN, true);
|
||||
@@ -156,7 +156,7 @@ void hdcptx1_protection_enable(bool en)
|
||||
|
||||
void hdcptx1_intermed_ri_check_enable(bool en)
|
||||
{
|
||||
hdmitx21_set_bit(TPI_COPP_DATA2_IVCTX, BIT_TPI_COPP_DATA2_INTERM_RI_CHECK_EN, en);
|
||||
hdmitx21_set_bit(TPI_COPP_DATA2_IVCTX, BIT_TPI_COPP_DATA2_INTER_RI_CHECK_EN, en);
|
||||
}
|
||||
|
||||
void hdcptx1_encryption_update(bool en)
|
||||
@@ -171,7 +171,7 @@ void hdcptx1_auth_start(void)
|
||||
hdmitx21_set_bit(TPI_COPP_DATA2_IVCTX,
|
||||
(BIT_TPI_COPP_DATA2_TPI_HDCP_PREP_EN |
|
||||
BIT_TPI_COPP_DATA2_DOUBLE_RI_CHECK |
|
||||
BIT_TPI_COPP_DATA2_INTERM_RI_CHECK_EN |
|
||||
BIT_TPI_COPP_DATA2_INTER_RI_CHECK_EN |
|
||||
/* BIT_TPI_COPP_DATA2_KSV_FORWARD | */
|
||||
BIT_TPI_COPP_DATA2_COPP_PROTLEVEL), true);
|
||||
hdmitx21_set_bit(LM_DDC_IVCTX, BIT_LM_DDC_SWTPIEN_B7, false);
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
#include <linux/printk.h>
|
||||
#include <linux/delay.h>
|
||||
#include "common.h"
|
||||
#include "hdmitx_common.h"
|
||||
|
||||
void s1a_reset_div_clk(struct hdmitx_dev *hdev)
|
||||
{
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
#include <linux/printk.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/arm-smccc.h>
|
||||
#include "common.h"
|
||||
#include "hdmitx_common.h"
|
||||
|
||||
/* for HTX_PLL_CNTL0 or HTX_PLL_CNTL3
|
||||
* [31] lock_st [2] lock_st_rst [1] pll_rst
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
#include <linux/printk.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/arm-smccc.h>
|
||||
#include "common.h"
|
||||
#include "hdmitx_common.h"
|
||||
|
||||
/* Min 3GHz */
|
||||
#define MIN_HTXPLL_VCO 3000000
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
#include <linux/printk.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/arm-smccc.h>
|
||||
#include "common.h"
|
||||
#include "hdmitx_common.h"
|
||||
|
||||
#define MIN_HTXPLL_VCO 3000000 /* Min 3GHz */
|
||||
#define MAX_HTXPLL_VCO 6000000 /* Max 6GHz */
|
||||
+1
-2
@@ -6,7 +6,7 @@
|
||||
#include <linux/printk.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/arm-smccc.h>
|
||||
#include "common.h"
|
||||
#include "hdmitx_common.h"
|
||||
|
||||
#define MIN_HTXPLL_VCO 3000000 /* Min 3GHz */
|
||||
#define MAX_HTXPLL_VCO 6000000 /* Max 6GHz */
|
||||
@@ -222,7 +222,6 @@ void set21_phy_by_mode_s7d(u32 mode)
|
||||
/* finally config bit[29:28] */
|
||||
usleep_range(1000, 1010);
|
||||
hd21_set_reg_bits(ANACTRL_HDMIPHY_CTRL3, 3, 28, 2);
|
||||
|
||||
}
|
||||
|
||||
void hdmitx21_sys_reset_s7d(void)
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
#include <linux/printk.h>
|
||||
#include <linux/delay.h>
|
||||
#include "common.h"
|
||||
#include "hdmitx_common.h"
|
||||
|
||||
#ifndef CONFIG_AMLOGIC_ZAPPER_CUT
|
||||
#define WAIT_FOR_PLL_LOCKED(_reg) \
|
||||
+3
-3
@@ -25,7 +25,7 @@
|
||||
#include <linux/timekeeping.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/amlogic/media/vout/hdmitx_common/hdmitx_common.h>
|
||||
#include "common.h"
|
||||
#include "hdmitx_common.h"
|
||||
|
||||
static void intr2_sw_handler(struct intr_t *);
|
||||
static void intr5_sw_handler(struct intr_t *);
|
||||
@@ -337,10 +337,10 @@ next:
|
||||
}
|
||||
|
||||
/* there may be such case: after plugout interrupt come and save its
|
||||
* interrupt state in st_data, before excute its bottom handle, there's
|
||||
* interrupt state in st_data, before execute its bottom handle, there's
|
||||
* another INTR5 come, then will do RE_ISR in intr_handler(), it will read
|
||||
* plugin/out interrupt state and over-write the previous saved plug
|
||||
* interrupt state in st_data. when excute the bottom handle of interrupt,
|
||||
* interrupt state in st_data. when execute the bottom handle of interrupt,
|
||||
* and find that the plug interrupt is cleared, so won't do plug process
|
||||
*/
|
||||
static void intr_status_save_and_clear(void)
|
||||
+4
-4
@@ -5,8 +5,8 @@
|
||||
|
||||
#ifndef _HDMI_TX21_MODULE_H
|
||||
#define _HDMI_TX21_MODULE_H
|
||||
#include "hdmi_config.h"
|
||||
#include "hdmi_hdcp.h"
|
||||
#include "hdmitx_config.h"
|
||||
#include "hdmitx_hdcp.h"
|
||||
#include <linux/wait.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/cdev.h>
|
||||
@@ -20,8 +20,8 @@
|
||||
#include <linux/miscdevice.h>
|
||||
#include <linux/amlogic/media/vout/hdmitx_common/hdmitx_common.h>
|
||||
#include <linux/amlogic/media/vout/hdmi_tx_repeater.h>
|
||||
#include "hw/hdmi_tx_hw.h"
|
||||
#include "../hdmitx_common/hdmitx_log.h"
|
||||
#include "hdmitx_hw.h"
|
||||
#include "../hdmitx_log.h"
|
||||
#ifdef CONFIG_AMLOGIC_DSC
|
||||
#include <linux/amlogic/media/vout/dsc.h>
|
||||
#endif
|
||||
+4
-4
@@ -28,9 +28,9 @@
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/amlogic/media/vout/vinfo.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "enc_clk_config.h"
|
||||
#include "../hdmi_tx.h"
|
||||
#include "hdmitx_common.h"
|
||||
#include "hdmitx_enc_clk_config.h"
|
||||
#include "hdmitx.h"
|
||||
|
||||
static DEFINE_SPINLOCK(tpi_lock);
|
||||
static void tpi_info_send(u8 sel, u8 *data, bool no_chksum_flag)
|
||||
@@ -340,7 +340,7 @@ void hdmitx_dsc_cvtem_pkt_send(struct dsc_pps_data_s *pps,
|
||||
data8 |= (0 << 4); //[ 4] reg_set_new_in_middle
|
||||
data8 |= (0 << 3); //[ 3] reg_set_new_always
|
||||
data8 |= (1 << 2); //[ 2] reg_to_err_ctrl
|
||||
data8 |= (0 << 1); //[ 1] feg_fapa1_supprot. =0:FAPA start only after second active line.
|
||||
data8 |= (0 << 1); //[ 1] feg_fapa1_support. =0:FAPA start only after second active line.
|
||||
data8 |= (1 << 0); //[ 0] reg_set_end_for_ml_ds
|
||||
hdmitx21_wr_reg(DSC_PKT_INSERT_CTL_2_IVCTX, data8);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user