diff --git a/XilinxProcessorIPLib/drivers/v_hdmitxss/data/v_hdmitxss.tcl b/XilinxProcessorIPLib/drivers/v_hdmitxss/data/v_hdmitxss.tcl index be7bf5ab..f38f9107 100755 --- a/XilinxProcessorIPLib/drivers/v_hdmitxss/data/v_hdmitxss.tcl +++ b/XilinxProcessorIPLib/drivers/v_hdmitxss/data/v_hdmitxss.tcl @@ -39,27 +39,27 @@ proc generate {drv_handle} { ::hsi::utils::define_include_file $drv_handle "xparameters.h" "XV_HdmiTxSs" \ - "NUM_INSTANCES" \ - "C_BASEADDR" \ - "C_HIGHADDR" \ - "DEVICE_ID" \ - "C_INPUT_PIXELS_PER_CLOCK" \ - "C_MAX_BITS_PER_COMPONENT" + "NUM_INSTANCES" \ + "C_BASEADDR" \ + "C_HIGHADDR" \ + "DEVICE_ID" \ + "C_INPUT_PIXELS_PER_CLOCK" \ + "C_MAX_BITS_PER_COMPONENT" hier_ip_define_config_file $drv_handle "xv_hdmitxss_g.c" "XV_HdmiTxSs" \ - "DEVICE_ID" \ - "C_BASEADDR" \ - "C_HIGHADDR" \ - "C_INPUT_PIXELS_PER_CLOCK" \ - "C_MAX_BITS_PER_COMPONENT" + "DEVICE_ID" \ + "C_BASEADDR" \ + "C_HIGHADDR" \ + "C_INPUT_PIXELS_PER_CLOCK" \ + "C_MAX_BITS_PER_COMPONENT" ::hsi::utils::define_canonical_xpars $drv_handle "xparameters.h" \ - "XV_HdmiTxSs" \ - "C_BASEADDR" \ - "C_HIGHADDR" \ - "DEVICE_ID" \ - "C_INPUT_PIXELS_PER_CLOCK" \ - "C_MAX_BITS_PER_COMPONENT" + "XV_HdmiTxSs" \ + "C_BASEADDR" \ + "C_HIGHADDR" \ + "DEVICE_ID" \ + "C_INPUT_PIXELS_PER_CLOCK" \ + "C_MAX_BITS_PER_COMPONENT" } @@ -81,12 +81,12 @@ proc hier_ip_define_config_file {drv_handle file_name drv_string args} { set periphs_g [::hsi::utils::get_common_driver_ips $drv_handle] - array set sub_core_inst { - axi_timer 1 - hdcp 1 - v_hdmi_tx 1 - v_tc 1 - } + array set sub_core_inst { + axi_timer 1 + hdcp 1 + v_hdmi_tx 1 + v_tc 1 + } #MAGS #foreach name [array names sub_core_inst] { @@ -94,113 +94,113 @@ proc hier_ip_define_config_file {drv_handle file_name drv_string args} { #} foreach periph_g $periphs_g { - set mem_ranges [::hsi::get_mem_ranges $periph_g] + set mem_ranges [::hsi::get_mem_ranges $periph_g] - ::hsi::current_hw_instance $periph_g; + ::hsi::current_hw_instance $periph_g; - set child_cells_g [::hsi::get_cells -hier] + set child_cells_g [::hsi::get_cells -hier] - foreach child_cell_g $child_cells_g { - set child_cell_vlnv [::common::get_property VLNV $child_cell_g] - set child_cell_name_g [common::get_property NAME $child_cell_g] - set vlnv_arr [split $child_cell_vlnv :] + foreach child_cell_g $child_cells_g { + set child_cell_vlnv [::common::get_property VLNV $child_cell_g] + set child_cell_name_g [common::get_property NAME $child_cell_g] + set vlnv_arr [split $child_cell_vlnv :] - lassign $vlnv_arr ip_vendor ip_library ip_name ip_version - set ip_type_g [common::get_property IP_TYPE $child_cell_g] + lassign $vlnv_arr ip_vendor ip_library ip_name ip_version + set ip_type_g [common::get_property IP_TYPE $child_cell_g] - puts "IP type $ip_type_g\n" - if { [string compare -nocase "BUS" $ip_type_g] != 0 } { - set interfaces [hsi::get_intf_pins -of_objects $child_cell_g] - set is_slave 0 + puts "IP type $ip_type_g\n" + if { [string compare -nocase "BUS" $ip_type_g] != 0 } { + set interfaces [hsi::get_intf_pins -of_objects $child_cell_g] + set is_slave 0 - foreach interface $interfaces { - set intf_type [common::get_property TYPE $interface] - #puts "Interface type $intf_type\n" - if { [string compare -nocase "SLAVE" $intf_type] == 0 } { - set is_slave 1 - } - } - if { $is_slave != 0 } { - #puts "Processing Periph: $ip_name $child_cell_name_g" + foreach interface $interfaces { + set intf_type [common::get_property TYPE $interface] + #puts "Interface type $intf_type\n" + if { [string compare -nocase "SLAVE" $intf_type] == 0 } { + set is_slave 1 + } + } + if { $is_slave != 0 } { + #puts "Processing Periph: $ip_name $child_cell_name_g" #puts $config_file "//Processing Periph: $ip_name $child_cell_name_g" - set final_child_cell_instance_name_present_g XPAR_${child_cell_name_g}_PRESENT - puts -nonewline $config_file "#define [string toupper $final_child_cell_instance_name_present_g]\t 1\n" + set final_child_cell_instance_name_present_g XPAR_${child_cell_name_g}_PRESENT + puts -nonewline $config_file "#define [string toupper $final_child_cell_instance_name_present_g]\t 1\n" - # create dictionary for ip name and it's instance names "ip_name {inst1_name inst2_name}" - dict lappend ss_ip_list $ip_name $child_cell_name_g - } - } - } + # create dictionary for ip name and it's instance names "ip_name {inst1_name inst2_name}" + dict lappend ss_ip_list $ip_name $child_cell_name_g + } + } + } - puts $config_file "\n\n/*" - puts $config_file "* List of Sub-cores excluded from the subsystem" - puts $config_file "* - Excluded sub-core device id is set to 255" - puts $config_file "* - Excluded sub-core baseaddr is set to 0" - puts $config_file "*/\n" + puts $config_file "\n\n/*" + puts $config_file "* List of Sub-cores excluded from the subsystem" + puts $config_file "* - Excluded sub-core device id is set to 255" + puts $config_file "* - Excluded sub-core baseaddr is set to 0" + puts $config_file "*/\n" - foreach sub_core [lsort [array names sub_core_inst]] { + foreach sub_core [lsort [array names sub_core_inst]] { #puts $config_file "//sub_core_inst: $sub_core $sub_core_inst($sub_core)" - if {[dict exists $ss_ip_list $sub_core]} { - set max_instances $sub_core_inst($sub_core) - #check if core can have multiple instances - #It is possible that not all instances are used in the design - if {$max_instances > 1} { - set ip_instances [dict get $ss_ip_list $sub_core] - set avail_instances [llength $ip_instances] + if {[dict exists $ss_ip_list $sub_core]} { + set max_instances $sub_core_inst($sub_core) + #check if core can have multiple instances + #It is possible that not all instances are used in the design + if {$max_instances > 1} { + set ip_instances [dict get $ss_ip_list $sub_core] + set avail_instances [llength $ip_instances] - #puts "Sub-Core: $sub_core" - #puts "instances: $ip_instances" + #puts "Sub-Core: $sub_core" + #puts "instances: $ip_instances" - #check if available instances are less than MAX - #if yes, mark the missing instance - #if all instances are present then skip the core - if {$avail_instances < $max_instances} { - if {[string compare -nocase "axi_gpio" $sub_core] == 0} { - set ip_inst_name [lindex $ip_instances 0] - set srcstr "${periph_g}_reset_sel_axi_mm" - if {[string compare -nocase $srcstr $ip_inst_name] == 0} { - set strval "RESET_SEL_AXIS" - } else { - set strval "RESET_SEL_AXI_MM" - } - } elseif {[string compare -nocase "v_vcresampler" $sub_core]} { - set ip_inst_name [lindex $ip_instances 0] - set srcstr "${periph_g}_v_vcresampler_in" - if {[string compare -nocase $srcstr $ip_inst_name] == 0} { - set strval "V_VCRESAMPLER_OUT" - } else { - set strval "V_VCRESAMPLER_IN" - } - } - #puts "String Selected: $strval" - set final_child_cell_instance_name_g "XPAR_${periph_g}_${strval}_PRESENT" - set final_child_cell_instance_devid_g "XPAR_${periph_g}_${strval}_DEVICE_ID" - set final_child_cell_instance_baseaddr_g "XPAR_${periph_g}_${strval}_BASEADDR" - puts -nonewline $config_file "#define [string toupper $final_child_cell_instance_name_g] 0\n" - puts -nonewline $config_file "#define [string toupper $final_child_cell_instance_devid_g] 255\n" - puts -nonewline $config_file "#define [string toupper $final_child_cell_instance_baseaddr_g] 0\n\n" - } + #check if available instances are less than MAX + #if yes, mark the missing instance + #if all instances are present then skip the core + if {$avail_instances < $max_instances} { + if {[string compare -nocase "axi_gpio" $sub_core] == 0} { + set ip_inst_name [lindex $ip_instances 0] + set srcstr "${periph_g}_reset_sel_axi_mm" + if {[string compare -nocase $srcstr $ip_inst_name] == 0} { + set strval "RESET_SEL_AXIS" + } else { + set strval "RESET_SEL_AXI_MM" + } + } elseif {[string compare -nocase "v_vcresampler" $sub_core]} { + set ip_inst_name [lindex $ip_instances 0] + set srcstr "${periph_g}_v_vcresampler_in" + if {[string compare -nocase $srcstr $ip_inst_name] == 0} { + set strval "V_VCRESAMPLER_OUT" + } else { + set strval "V_VCRESAMPLER_IN" + } + } + #puts "String Selected: $strval" + set final_child_cell_instance_name_g "XPAR_${periph_g}_${strval}_PRESENT" + set final_child_cell_instance_devid_g "XPAR_${periph_g}_${strval}_DEVICE_ID" + set final_child_cell_instance_baseaddr_g "XPAR_${periph_g}_${strval}_BASEADDR" + puts -nonewline $config_file "#define [string toupper $final_child_cell_instance_name_g] 0\n" + puts -nonewline $config_file "#define [string toupper $final_child_cell_instance_devid_g] 255\n" + puts -nonewline $config_file "#define [string toupper $final_child_cell_instance_baseaddr_g] 0\n\n" + } - } - #puts -nonewline $config_file "#define [string toupper $final_child_cell_instance_name_g] 1\n" - } else { - set count 0 - while {$count<$sub_core_inst($sub_core)} { - set final_child_cell_instance_name_g "XPAR_${periph_g}_${sub_core}_${count}_PRESENT" - set final_child_cell_instance_devid_g "XPAR_${periph_g}_${sub_core}_${count}_DEVICE_ID" - set final_child_cell_instance_baseaddr_g "XPAR_${periph_g}_${sub_core}_${count}_BASEADDR" - puts -nonewline $config_file "#define [string toupper $final_child_cell_instance_name_g] 0\n" - puts -nonewline $config_file "#define [string toupper $final_child_cell_instance_devid_g] 255\n" - puts -nonewline $config_file "#define [string toupper $final_child_cell_instance_baseaddr_g] 0\n\n" - incr count - } - } - } - ::hsi::current_hw_instance + } + #puts -nonewline $config_file "#define [string toupper $final_child_cell_instance_name_g] 1\n" + } else { + set count 0 + while {$count<$sub_core_inst($sub_core)} { + set final_child_cell_instance_name_g "XPAR_${periph_g}_${sub_core}_${count}_PRESENT" + set final_child_cell_instance_devid_g "XPAR_${periph_g}_${sub_core}_${count}_DEVICE_ID" + set final_child_cell_instance_baseaddr_g "XPAR_${periph_g}_${sub_core}_${count}_BASEADDR" + puts -nonewline $config_file "#define [string toupper $final_child_cell_instance_name_g] 0\n" + puts -nonewline $config_file "#define [string toupper $final_child_cell_instance_devid_g] 255\n" + puts -nonewline $config_file "#define [string toupper $final_child_cell_instance_baseaddr_g] 0\n\n" + incr count + } + } + } + ::hsi::current_hw_instance } - puts $config_file "\n\n" + puts $config_file "\n\n" puts $config_file [format "%s_Config %s_ConfigTable\[\] =" $drv_string $drv_string] puts $config_file "\{" set periphs [::hsi::utils::get_common_driver_ips $drv_handle] @@ -238,115 +238,115 @@ proc hier_ip_define_config_file {drv_handle file_name drv_string args} { set comma ",\n" } - ::hsi::current_hw_instance $periph - set child_cells [::hsi::get_cells -hier] - puts $config_file ",\n" + ::hsi::current_hw_instance $periph + set child_cells [::hsi::get_cells -hier] + puts $config_file ",\n" - foreach sub_core [lsort [array names sub_core_inst]] { - set max_instances $sub_core_inst($sub_core) - #puts "\nProcessing sub-core: $sub_core" - #puts "Max Instances: $max_instances" + foreach sub_core [lsort [array names sub_core_inst]] { + set max_instances $sub_core_inst($sub_core) + #puts "\nProcessing sub-core: $sub_core" + #puts "Max Instances: $max_instances" - if {[dict exists $ss_ip_list $sub_core]} { - #puts "****Sub-core found in dictionary****" - if {[string match -nocase v_t* $sub_core]} { - set base_addr_name "BASEADDR" - } elseif {[string match -nocase v_* $sub_core]} { - set base_addr_name "BASEADDR" - } else { - set base_addr_name "BASEADDR" - } + if {[dict exists $ss_ip_list $sub_core]} { + #puts "****Sub-core found in dictionary****" + if {[string match -nocase v_t* $sub_core]} { + set base_addr_name "BASEADDR" + } elseif {[string match -nocase v_* $sub_core]} { + set base_addr_name "BASEADDR" + } else { + set base_addr_name "BASEADDR" + } - set ip_instances [dict get $ss_ip_list $sub_core] - set avail_instances [llength $ip_instances] + set ip_instances [dict get $ss_ip_list $sub_core] + set avail_instances [llength $ip_instances] - #check if core can have multiple instances - #It is possible that not all instances are used in the design - if {$max_instances > 1} { + #check if core can have multiple instances + #It is possible that not all instances are used in the design + if {$max_instances > 1} { - #check if available instances are less than MAX - #if yes, include the missing instance - if {$avail_instances < $max_instances} { - set ip_inst_name [lindex $ip_instances 0] - set count 0 - set str_name "unknown" - #puts "IP Inst. Name: $ip_inst_name" - while {$count < $max_instances} { - if {[string compare -nocase "axi_gpio" $sub_core] == 0} { - set str_name [expr {$count == 0 ? "RESET_SEL_AXI_MM" : "RESET_SEL_AXIS"}] - } elseif {[string compare -nocase "v_vcresampler" $sub_core]} { - set str_name [expr {$count == 0 ? "V_VCRESAMPLER_IN" : "V_VCRESAMPLER_OUT"}] - } - #write the ip instance entry to the table - set final_child_cell_instance_name_present "XPAR_${periph}_${str_name}_PRESENT" - set final_child_cell_instance_devid "XPAR_${periph}_${str_name}_DEVICE_ID" - set final_child_cell_instance_name_baseaddr "XPAR_${periph}_${str_name}_${base_addr_name}" + #check if available instances are less than MAX + #if yes, include the missing instance + if {$avail_instances < $max_instances} { + set ip_inst_name [lindex $ip_instances 0] + set count 0 + set str_name "unknown" + #puts "IP Inst. Name: $ip_inst_name" + while {$count < $max_instances} { + if {[string compare -nocase "axi_gpio" $sub_core] == 0} { + set str_name [expr {$count == 0 ? "RESET_SEL_AXI_MM" : "RESET_SEL_AXIS"}] + } elseif {[string compare -nocase "v_vcresampler" $sub_core]} { + set str_name [expr {$count == 0 ? "V_VCRESAMPLER_IN" : "V_VCRESAMPLER_OUT"}] + } + #write the ip instance entry to the table + set final_child_cell_instance_name_present "XPAR_${periph}_${str_name}_PRESENT" + set final_child_cell_instance_devid "XPAR_${periph}_${str_name}_DEVICE_ID" + set final_child_cell_instance_name_baseaddr "XPAR_${periph}_${str_name}_${base_addr_name}" - puts $config_file "\t\t\{" - puts -nonewline $config_file [format "\t\t\t%s" [string toupper $final_child_cell_instance_name_present]] - puts $config_file "," - puts -nonewline $config_file [format "\t\t\t%s" [string toupper $final_child_cell_instance_devid]] - puts $config_file "," - puts -nonewline $config_file [format "\t\t\t%s" [string toupper $final_child_cell_instance_name_baseaddr]] - puts $config_file "\n\t\t\}," - incr count - } - } else { - foreach ip_inst $ip_instances { - #puts "instance = $ip_inst" - set final_child_cell_instance_name_present "XPAR_${ip_inst}_PRESENT" - set final_child_cell_instance_devid "XPAR_${ip_inst}_DEVICE_ID" - set final_child_cell_instance_name_baseaddr "XPAR_${ip_inst}_${base_addr_name}" + puts $config_file "\t\t\{" + puts -nonewline $config_file [format "\t\t\t%s" [string toupper $final_child_cell_instance_name_present]] + puts $config_file "," + puts -nonewline $config_file [format "\t\t\t%s" [string toupper $final_child_cell_instance_devid]] + puts $config_file "," + puts -nonewline $config_file [format "\t\t\t%s" [string toupper $final_child_cell_instance_name_baseaddr]] + puts $config_file "\n\t\t\}," + incr count + } + } else { + foreach ip_inst $ip_instances { + #puts "instance = $ip_inst" + set final_child_cell_instance_name_present "XPAR_${ip_inst}_PRESENT" + set final_child_cell_instance_devid "XPAR_${ip_inst}_DEVICE_ID" + set final_child_cell_instance_name_baseaddr "XPAR_${ip_inst}_${base_addr_name}" - puts $config_file "\t\t\{" - puts -nonewline $config_file [format "\t\t\t%s" [string toupper $final_child_cell_instance_name_present]] - puts $config_file "," - puts -nonewline $config_file [format "\t\t\t%s" [string toupper $final_child_cell_instance_devid]] - puts $config_file "," - puts -nonewline $config_file [format "\t\t\t%s" [string toupper $final_child_cell_instance_name_baseaddr]] - puts $config_file "\n\t\t\}," - } - } - } else { - set ip_inst_name [lindex $ip_instances 0] - #puts "instance = $ip_inst" - set final_child_cell_instance_name_present "XPAR_${ip_inst_name}_PRESENT" - set final_child_cell_instance_devid "XPAR_${ip_inst_name}_DEVICE_ID" - set final_child_cell_instance_name_baseaddr "XPAR_${ip_inst_name}_${base_addr_name}" + puts $config_file "\t\t\{" + puts -nonewline $config_file [format "\t\t\t%s" [string toupper $final_child_cell_instance_name_present]] + puts $config_file "," + puts -nonewline $config_file [format "\t\t\t%s" [string toupper $final_child_cell_instance_devid]] + puts $config_file "," + puts -nonewline $config_file [format "\t\t\t%s" [string toupper $final_child_cell_instance_name_baseaddr]] + puts $config_file "\n\t\t\}," + } + } + } else { + set ip_inst_name [lindex $ip_instances 0] + #puts "instance = $ip_inst" + set final_child_cell_instance_name_present "XPAR_${ip_inst_name}_PRESENT" + set final_child_cell_instance_devid "XPAR_${ip_inst_name}_DEVICE_ID" + set final_child_cell_instance_name_baseaddr "XPAR_${ip_inst_name}_${base_addr_name}" - puts $config_file "\t\t\{" - puts -nonewline $config_file [format "\t\t\t%s" [string toupper $final_child_cell_instance_name_present]] - puts $config_file "," - puts -nonewline $config_file [format "\t\t\t%s" [string toupper $final_child_cell_instance_devid]] - puts $config_file "," - puts -nonewline $config_file [format "\t\t\t%s" [string toupper $final_child_cell_instance_name_baseaddr]] - puts $config_file "\n\t\t\}," - } - } else { - #puts "****sub-core not in dictionary****" - set count 0 + puts $config_file "\t\t\{" + puts -nonewline $config_file [format "\t\t\t%s" [string toupper $final_child_cell_instance_name_present]] + puts $config_file "," + puts -nonewline $config_file [format "\t\t\t%s" [string toupper $final_child_cell_instance_devid]] + puts $config_file "," + puts -nonewline $config_file [format "\t\t\t%s" [string toupper $final_child_cell_instance_name_baseaddr]] + puts $config_file "\n\t\t\}," + } + } else { + #puts "****sub-core not in dictionary****" + set count 0 - while {$count< $max_instances} { - set final_child_cell_instance_name_present "XPAR_${periph}_${sub_core}_${count}_PRESENT" - set final_child_cell_instance_devid "XPAR_${periph}_${sub_core}_${count}_DEVICE_ID" - set final_child_cell_instance_name_baseaddr "XPAR_${periph}_${sub_core}_${count}_BASEADDR" + while {$count< $max_instances} { + set final_child_cell_instance_name_present "XPAR_${periph}_${sub_core}_${count}_PRESENT" + set final_child_cell_instance_devid "XPAR_${periph}_${sub_core}_${count}_DEVICE_ID" + set final_child_cell_instance_name_baseaddr "XPAR_${periph}_${sub_core}_${count}_BASEADDR" - puts $config_file "\t\t\{" - puts -nonewline $config_file [format "\t\t\t%s" [string toupper $final_child_cell_instance_name_present]] - puts $config_file "," - puts -nonewline $config_file [format "\t\t\t%s" [string toupper $final_child_cell_instance_devid]] - puts $config_file "," - puts -nonewline $config_file [format "\t\t\t%s" [string toupper $final_child_cell_instance_name_baseaddr]] - puts $config_file "\n\t\t\}," - incr count - } - } - } + puts $config_file "\t\t\{" + puts -nonewline $config_file [format "\t\t\t%s" [string toupper $final_child_cell_instance_name_present]] + puts $config_file "," + puts -nonewline $config_file [format "\t\t\t%s" [string toupper $final_child_cell_instance_devid]] + puts $config_file "," + puts -nonewline $config_file [format "\t\t\t%s" [string toupper $final_child_cell_instance_name_baseaddr]] + puts $config_file "\n\t\t\}," + incr count + } + } + } - ::hsi::current_hw_instance + ::hsi::current_hw_instance - puts -nonewline $config_file "\t\}" - set start_comma ",\n" + puts -nonewline $config_file "\t\}" + set start_comma ",\n" } puts $config_file "\n\};" diff --git a/XilinxProcessorIPLib/drivers/v_hdmitxss/src/Makefile b/XilinxProcessorIPLib/drivers/v_hdmitxss/src/Makefile old mode 100755 new mode 100644 index 9436f54d..7febab5d --- a/XilinxProcessorIPLib/drivers/v_hdmitxss/src/Makefile +++ b/XilinxProcessorIPLib/drivers/v_hdmitxss/src/Makefile @@ -22,19 +22,19 @@ OBJECTS = $(addsuffix .o, $(basename $(wildcard *.c))) libs: banner xvhdmitxss_libs clean %.o: %.c - ${COMPILER} $(CC_FLAGS) $(ECC_FLAGS) $(INCLUDES) -o $@ $< + ${COMPILER} $(CC_FLAGS) $(ECC_FLAGS) $(INCLUDES) -o $@ $< banner: - echo "Compiling HDMI TX Subsystem" + echo "Compiling HDMI TX Subsystem" xvhdmitxss_libs: ${OBJECTS} - $(ARCHIVER) -r ${RELEASEDIR}/${LIB} ${OBJECTS} + $(ARCHIVER) -r ${RELEASEDIR}/${LIB} ${OBJECTS} .PHONY: include include: xvhdmitxss_includes xvhdmitxss_includes: - ${CP} ${INCLUDEFILES} ${INCLUDEDIR} + ${CP} ${INCLUDEFILES} ${INCLUDEDIR} clean: - rm -rf ${OBJECTS} + rm -rf ${OBJECTS} diff --git a/XilinxProcessorIPLib/drivers/v_hdmitxss/src/xv_hdmitxss.c b/XilinxProcessorIPLib/drivers/v_hdmitxss/src/xv_hdmitxss.c old mode 100755 new mode 100644 index cccc6208..68fa3714 --- a/XilinxProcessorIPLib/drivers/v_hdmitxss/src/xv_hdmitxss.c +++ b/XilinxProcessorIPLib/drivers/v_hdmitxss/src/xv_hdmitxss.c @@ -75,13 +75,13 @@ typedef struct /**************************** Local Global ***********************************/ XV_HdmiTxSs_SubCores XV_HdmiTxSs_SubCoreRepo[XPAR_XV_HDMITXSS_NUM_INSTANCES]; - /**< Define Driver instance of all sub-core + /**< Define Driver instance of all sub-core included in the design */ /************************** Function Prototypes ******************************/ static void XV_HdmiTxSs_GetIncludedSubcores(XV_HdmiTxSs *HdmiTxSsPtr, - u16 DevId); + u16 DevId); static XV_HdmiTxSs_SubCores *XV_HdmiTxSs_GetSubSysStruct(void *SubCorePtr); static void XV_HdmiTxSs_WaitUs(XV_HdmiTxSs *InstancePtr, u32 MicroSeconds); static int XV_HdmiTxSs_RegisterSubsysCallbacks(XV_HdmiTxSs *InstancePtr); @@ -93,7 +93,7 @@ static void XV_HdmiTxSs_VsCallback(void *CallbackRef); static void XV_HdmiTxSs_StreamUpCallback(void *CallbackRef); static void XV_HdmiTxSs_StreamDownCallback(void *CallbackRef); static u32 XV_HdmiTxSs_HdcpTimerConvUsToTicks(u32 TimeoutInUs, - u32 ClockFrequency); + u32 ClockFrequency); /***************** Macros (Inline Functions) Definitions *********************/ /************************** Function Definition ******************************/ @@ -137,27 +137,27 @@ void XV_HdmiTxSs_ReportCoreInfo(XV_HdmiTxSs *InstancePtr) * This function installs a custom delay/sleep function to be used by the XV_HdmiTxSs * driver. * - * @param InstancePtr is a pointer to the XDptx instance. - * @param CallbackFunc is the address to the callback function. - * @param CallbackRef is the user data item (microseconds to delay) that - * will be passed to the custom sleep/delay function when it is - * invoked. + * @param InstancePtr is a pointer to the XDptx instance. + * @param CallbackFunc is the address to the callback function. + * @param CallbackRef is the user data item (microseconds to delay) that + * will be passed to the custom sleep/delay function when it is + * invoked. * - * @return None. + * @return None. * - * @note None. + * @note None. * *******************************************************************************/ void XV_HdmiTxSs_SetUserTimerHandler(XV_HdmiTxSs *InstancePtr, - XVidC_DelayHandler CallbackFunc, void *CallbackRef) + XVidC_DelayHandler CallbackFunc, void *CallbackRef) { - /* Verify arguments. */ - Xil_AssertVoid(InstancePtr != NULL); - Xil_AssertVoid(CallbackFunc != NULL); - Xil_AssertVoid(CallbackRef != NULL); + /* Verify arguments. */ + Xil_AssertVoid(InstancePtr != NULL); + Xil_AssertVoid(CallbackFunc != NULL); + Xil_AssertVoid(CallbackRef != NULL); - InstancePtr->UserTimerWaitUs = CallbackFunc; - InstancePtr->UserTimerPtr = CallbackRef; + InstancePtr->UserTimerWaitUs = CallbackFunc; + InstancePtr->UserTimerPtr = CallbackRef; } /******************************************************************************/ @@ -171,38 +171,38 @@ void XV_HdmiTxSs_SetUserTimerHandler(XV_HdmiTxSs *InstancePtr, * to by InstancePtr->UserTimerWaitUs, which may have better accuracy if a * hardware timer is used. * - * @param InstancePtr is a pointer to the XDptx instance. - * @param MicroSeconds is the number of microseconds to delay/sleep for. + * @param InstancePtr is a pointer to the XDptx instance. + * @param MicroSeconds is the number of microseconds to delay/sleep for. * - * @return None. + * @return None. * - * @note None. + * @note None. * *******************************************************************************/ void XV_HdmiTxSs_WaitUs(XV_HdmiTxSs *InstancePtr, u32 MicroSeconds) { - /* Verify arguments. */ - Xil_AssertVoid(InstancePtr != NULL); - Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY); + /* Verify arguments. */ + Xil_AssertVoid(InstancePtr != NULL); + Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY); - if (MicroSeconds == 0) { - return; - } + if (MicroSeconds == 0) { + return; + } #if defined(__MICROBLAZE__) - if (InstancePtr->UserTimerWaitUs != NULL) { - /* Use the timer handler specified by the user for better - * accuracy. */ - InstancePtr->UserTimerWaitUs(InstancePtr, MicroSeconds); - } - else { - /* MicroBlaze sleep only has millisecond accuracy. Round up. */ - u32 MilliSeconds = (MicroSeconds + 999) / 1000; - MB_Sleep(MilliSeconds); - } + if (InstancePtr->UserTimerWaitUs != NULL) { + /* Use the timer handler specified by the user for better + * accuracy. */ + InstancePtr->UserTimerWaitUs(InstancePtr, MicroSeconds); + } + else { + /* MicroBlaze sleep only has millisecond accuracy. Round up. */ + u32 MilliSeconds = (MicroSeconds + 999) / 1000; + MB_Sleep(MilliSeconds); + } #elif defined(__arm__) - /* Wait the requested amount of time. */ - usleep(MicroSeconds); + /* Wait the requested amount of time. */ + usleep(MicroSeconds); #endif } @@ -236,7 +236,7 @@ void XV_HdmiTxSs_WaitUs(XV_HdmiTxSs *InstancePtr, u32 MicroSeconds) *****************************************************************************/ void XV_HdmiTxSS_HdmiTxIntrHandler(XV_HdmiTxSs *InstancePtr) { - XV_HdmiTx_IntrHandler(InstancePtr->HdmiTxPtr); + XV_HdmiTx_IntrHandler(InstancePtr->HdmiTxPtr); } /*****************************************************************************/ @@ -248,7 +248,7 @@ void XV_HdmiTxSS_HdmiTxIntrHandler(XV_HdmiTxSs *InstancePtr) *****************************************************************************/ void XV_HdmiTxSS_HdcpIntrHandler(XV_HdmiTxSs *InstancePtr) { - XHdcp1x_CipherIntrHandler(InstancePtr->HdcpPtr); + XHdcp1x_CipherIntrHandler(InstancePtr->HdcpPtr); } /*****************************************************************************/ @@ -260,7 +260,7 @@ void XV_HdmiTxSS_HdcpIntrHandler(XV_HdmiTxSs *InstancePtr) *****************************************************************************/ void XV_HdmiTxSS_HdcpTimerIntrHandler(XV_HdmiTxSs *InstancePtr) { - XTmrCtr_InterruptHandler(InstancePtr->HdcpTimerPtr); + XTmrCtr_InterruptHandler(InstancePtr->HdcpTimerPtr); } /*****************************************************************************/ @@ -279,28 +279,28 @@ static int XV_HdmiTxSs_RegisterSubsysCallbacks(XV_HdmiTxSs *InstancePtr) /** Register HDMI Tx ISR */ if (HdmiTxSsPtr->HdmiTxPtr) { - /* - * Register call back for Tx Core Interrupts. - */ - XV_HdmiTx_SetCallback(HdmiTxSsPtr->HdmiTxPtr, - XV_HDMITX_HANDLER_CONNECT, - XV_HdmiTxSs_ConnectCallback, - InstancePtr); + /* + * Register call back for Tx Core Interrupts. + */ + XV_HdmiTx_SetCallback(HdmiTxSsPtr->HdmiTxPtr, + XV_HDMITX_HANDLER_CONNECT, + XV_HdmiTxSs_ConnectCallback, + InstancePtr); - XV_HdmiTx_SetCallback(HdmiTxSsPtr->HdmiTxPtr, - XV_HDMITX_HANDLER_VS, - XV_HdmiTxSs_VsCallback, - InstancePtr); + XV_HdmiTx_SetCallback(HdmiTxSsPtr->HdmiTxPtr, + XV_HDMITX_HANDLER_VS, + XV_HdmiTxSs_VsCallback, + InstancePtr); - XV_HdmiTx_SetCallback(HdmiTxSsPtr->HdmiTxPtr, - XV_HDMITX_HANDLER_STREAM_UP, - XV_HdmiTxSs_StreamUpCallback, - InstancePtr); + XV_HdmiTx_SetCallback(HdmiTxSsPtr->HdmiTxPtr, + XV_HDMITX_HANDLER_STREAM_UP, + XV_HdmiTxSs_StreamUpCallback, + InstancePtr); - XV_HdmiTx_SetCallback(HdmiTxSsPtr->HdmiTxPtr, - XV_HDMITX_HANDLER_STREAM_DOWN, - XV_HdmiTxSs_StreamDownCallback, - InstancePtr); + XV_HdmiTx_SetCallback(HdmiTxSsPtr->HdmiTxPtr, + XV_HDMITX_HANDLER_STREAM_DOWN, + XV_HdmiTxSs_StreamDownCallback, + InstancePtr); } /** Register HDCP TX Timer ISR */ @@ -349,26 +349,26 @@ static void XV_HdmiTxSs_GetIncludedSubcores(XV_HdmiTxSs *HdmiTxSsPtr, u16 DevId) ******************************************************************************/ static XV_HdmiTxSs_SubCores *XV_HdmiTxSs_GetSubSysStruct(void *SubCorePtr) { - int i; + int i; - for (i=0; iConfig), (const void *)CfgPtr, - sizeof(XV_HdmiTxSs_Config)); + sizeof(XV_HdmiTxSs_Config)); HdmiTxSsPtr->Config.BaseAddress = EffectiveAddr; /* Determine sub-cores included in the provided instance of subsystem */ @@ -410,25 +410,25 @@ int XV_HdmiTxSs_CfgInitialize(XV_HdmiTxSs *InstancePtr, /* Initialize all included sub_cores */ if (HdmiTxSsPtr->HdcpTimerPtr) { - if (XV_HdmiTxSs_SubcoreInitHdcpTimer(HdmiTxSsPtr) != XST_SUCCESS){ + if (XV_HdmiTxSs_SubcoreInitHdcpTimer(HdmiTxSsPtr) != XST_SUCCESS){ return(XST_FAILURE); } } if (HdmiTxSsPtr->HdcpPtr) { - if (XV_HdmiTxSs_SubcoreInitHdcp(HdmiTxSsPtr) != XST_SUCCESS){ - return(XST_FAILURE); - } + if (XV_HdmiTxSs_SubcoreInitHdcp(HdmiTxSsPtr) != XST_SUCCESS){ + return(XST_FAILURE); + } } if (HdmiTxSsPtr->HdmiTxPtr) { - if (XV_HdmiTxSs_SubcoreInitHdmiTx(HdmiTxSsPtr) != XST_SUCCESS) { + if (XV_HdmiTxSs_SubcoreInitHdmiTx(HdmiTxSsPtr) != XST_SUCCESS) { return(XST_FAILURE); } } if (HdmiTxSsPtr->VtcPtr) { - if (XV_HdmiTxSs_SubcoreInitVtc(HdmiTxSsPtr) != XST_SUCCESS) { + if (XV_HdmiTxSs_SubcoreInitVtc(HdmiTxSsPtr) != XST_SUCCESS) { return(XST_FAILURE); } } @@ -575,33 +575,37 @@ static int XV_HdmiTxSs_VtcSetup(XVtc *XVtcPtr, XV_HdmiTx *HdmiTxPtr) VideoTiming.Interlaced = HdmiTxPtr->Stream.Video.IsInterlaced; - /* YUV420 */ - if (HdmiTxPtr->Stream.Video.ColorFormatId == XVIDC_CSF_YCRCB_420) { - VideoTiming.HActiveVideo = VideoTiming.HActiveVideo/4; - VideoTiming.HFrontPorch = VideoTiming.HFrontPorch/4; - VideoTiming.HBackPorch = VideoTiming.HBackPorch/4; - VideoTiming.HSyncWidth = VideoTiming.HSyncWidth/4; - } + /* 4 pixels per clock */ + if (HdmiTxPtr->Stream.Video.PixPerClk == XVIDC_PPC_4) { + VideoTiming.HActiveVideo = VideoTiming.HActiveVideo/4; + VideoTiming.HFrontPorch = VideoTiming.HFrontPorch/4; + VideoTiming.HBackPorch = VideoTiming.HBackPorch/4; + VideoTiming.HSyncWidth = VideoTiming.HSyncWidth/4; + } - /* Other color spaces */ - else - { - /* 4 pixels per clock */ - if (HdmiTxPtr->Stream.Video.PixPerClk == XVIDC_PPC_4) { - VideoTiming.HActiveVideo = VideoTiming.HActiveVideo/4; - VideoTiming.HFrontPorch = VideoTiming.HFrontPorch/4; - VideoTiming.HBackPorch = VideoTiming.HBackPorch/4; - VideoTiming.HSyncWidth = VideoTiming.HSyncWidth/4; - } + /* 2 pixels per clock */ + else if (HdmiTxPtr->Stream.Video.PixPerClk == XVIDC_PPC_2) { + VideoTiming.HActiveVideo = VideoTiming.HActiveVideo/2; + VideoTiming.HFrontPorch = VideoTiming.HFrontPorch/2; + VideoTiming.HBackPorch = VideoTiming.HBackPorch/2; + VideoTiming.HSyncWidth = VideoTiming.HSyncWidth/2; + } - /* 2 pixels per clock */ - else { - VideoTiming.HActiveVideo = VideoTiming.HActiveVideo/2; - VideoTiming.HFrontPorch = VideoTiming.HFrontPorch/2; - VideoTiming.HBackPorch = VideoTiming.HBackPorch/2; - VideoTiming.HSyncWidth = VideoTiming.HSyncWidth/2; + /* 1 pixels per clock */ + else { + VideoTiming.HActiveVideo = VideoTiming.HActiveVideo; + VideoTiming.HFrontPorch = VideoTiming.HFrontPorch; + VideoTiming.HBackPorch = VideoTiming.HBackPorch; + VideoTiming.HSyncWidth = VideoTiming.HSyncWidth; + } + + /* For YUV420 the line width is double there for double the blanking */ + if (HdmiTxPtr->Stream.Video.ColorFormatId == XVIDC_CSF_YCRCB_420) { + VideoTiming.HActiveVideo = VideoTiming.HActiveVideo/2; + VideoTiming.HFrontPorch = VideoTiming.HFrontPorch/2; + VideoTiming.HBackPorch = VideoTiming.HBackPorch/2; + VideoTiming.HSyncWidth = VideoTiming.HSyncWidth/2; } - } /** When compensating the vtc horizontal timing parameters for the pixel mode * (quad or dual) rounding errors might be introduced (due to the divide) @@ -614,14 +618,14 @@ static int XV_HdmiTxSs_VtcSetup(XVtc *XVtcPtr, XV_HdmiTx *HdmiTxPtr) * Calculate hdmi tx horizontal blanking */ HdmiTx_Hblank = HdmiTxPtr->Stream.Video.Timing.HFrontPorch + - HdmiTxPtr->Stream.Video.Timing.HSyncWidth + - HdmiTxPtr->Stream.Video.Timing.HBackPorch; + HdmiTxPtr->Stream.Video.Timing.HSyncWidth + + HdmiTxPtr->Stream.Video.Timing.HBackPorch; do { // Calculate vtc horizontal blanking Vtc_Hblank = VideoTiming.HFrontPorch + - VideoTiming.HBackPorch + - VideoTiming.HSyncWidth; + VideoTiming.HBackPorch + + VideoTiming.HSyncWidth; // Quad pixel mode if (HdmiTxPtr->Stream.Video.PixPerClk == XVIDC_PPC_4) { @@ -629,17 +633,35 @@ static int XV_HdmiTxSs_VtcSetup(XVtc *XVtcPtr, XV_HdmiTx *HdmiTxPtr) } // Dual pixel mode - else { + else if (HdmiTxPtr->Stream.Video.PixPerClk == XVIDC_PPC_2) { Vtc_Hblank *= 2; } + // Single pixel mode + else { + //Vtc_Hblank *= 1; + } + + /* For YUV420 the line width is double there for double the blanking */ + if (HdmiTxPtr->Stream.Video.ColorFormatId == XVIDC_CSF_YCRCB_420) { + Vtc_Hblank *= 2; + } + // If the horizontal total blanking differs, // then increment the Vtc horizontal front porch. if (Vtc_Hblank != HdmiTx_Hblank) { VideoTiming.HFrontPorch++; } - } while (Vtc_Hblank != HdmiTx_Hblank); + } while (Vtc_Hblank < HdmiTx_Hblank); + + if (Vtc_Hblank != HdmiTx_Hblank) { + xil_printf("Error! Current format with total Hblank (%d) cannot \r\n", + HdmiTx_Hblank); + xil_printf(" be transmitted with pixels per clock = %d\r\n", + HdmiTxPtr->Stream.Video.PixPerClk); + return (XST_FAILURE); + } XVtc_SetGeneratorTiming(XVtcPtr, &VideoTiming); @@ -702,7 +724,7 @@ void XV_HdmiTxSs_ConnectCallback(void *CallbackRef) // Is the cable connected? if (XV_HdmiTx_IsStreamConnected(HdmiTxSsPtr->HdmiTxPtr)) { HdmiTxSsPtr->IsStreamConnected = (TRUE); - xil_printf("TX cable is connected\n\r"); + xil_printf("TX cable is connected\n\r"); } // TX cable is disconnected @@ -713,7 +735,7 @@ void XV_HdmiTxSs_ConnectCallback(void *CallbackRef) // Check if user callback has been registered if (HdmiTxSsPtr->ConnectCallback) { - HdmiTxSsPtr->ConnectCallback(HdmiTxSsPtr->ConnectRef); + HdmiTxSsPtr->ConnectCallback(HdmiTxSsPtr->ConnectRef); } } @@ -742,7 +764,7 @@ void XV_HdmiTxSs_VsCallback(void *CallbackRef) // Check if user callback has been registered if (HdmiTxSsPtr->VsCallback) { - HdmiTxSsPtr->VsCallback(HdmiTxSsPtr->VsRef); + HdmiTxSsPtr->VsCallback(HdmiTxSsPtr->VsRef); } } @@ -965,7 +987,7 @@ void XV_HdmiTxSs_StreamUpCallback(void *CallbackRef) // Check if user callback has been registered if (HdmiTxSsPtr->StreamUpCallback) { - HdmiTxSsPtr->StreamUpCallback(HdmiTxSsPtr->StreamUpRef); + HdmiTxSsPtr->StreamUpCallback(HdmiTxSsPtr->StreamUpRef); } /* Set TX sample rate */ @@ -978,15 +1000,15 @@ void XV_HdmiTxSs_StreamUpCallback(void *CallbackRef) XV_HdmiTxSs_VtcSetup(HdmiTxSsPtr->VtcPtr, HdmiTxSsPtr->HdmiTxPtr); if (HdmiTxSsPtr->AudioEnabled) { - /* HDMI TX unmute audio */ - HdmiTxSsPtr->AudioMute = (FALSE); - XV_HdmiTx_AudioUnmute(HdmiTxSsPtr->HdmiTxPtr); + /* HDMI TX unmute audio */ + HdmiTxSsPtr->AudioMute = (FALSE); + XV_HdmiTx_AudioUnmute(HdmiTxSsPtr->HdmiTxPtr); } if (HdmiTxSsPtr->HdcpPtr) { - /* Set the TX HDCP state to up */ - XHdcp1x_SetPhysicalState(HdmiTxSsPtr->HdcpPtr, TRUE); + /* Set the TX HDCP state to up */ + XHdcp1x_SetPhysicalState(HdmiTxSsPtr->HdcpPtr, TRUE); } } @@ -1011,13 +1033,13 @@ void XV_HdmiTxSs_StreamDownCallback(void *CallbackRef) XV_HdmiTx_Reset(HdmiTxSsPtr->HdmiTxPtr, TRUE); if (HdmiTxSsPtr->HdcpPtr) { - /* Set the TX HDCP state to down */ - XHdcp1x_SetPhysicalState(HdmiTxSsPtr->HdcpPtr, FALSE); + /* Set the TX HDCP state to down */ + XHdcp1x_SetPhysicalState(HdmiTxSsPtr->HdcpPtr, FALSE); } // Check if user callback has been registered if (HdmiTxSsPtr->StreamDownCallback) { - HdmiTxSsPtr->StreamDownCallback(HdmiTxSsPtr->StreamDownRef); + HdmiTxSsPtr->StreamDownCallback(HdmiTxSsPtr->StreamDownRef); } } @@ -1037,68 +1059,68 @@ void XV_HdmiTxSs_StreamDownCallback(void *CallbackRef) * (XV_HDMITXSS_HANDLER_STREAM_UP) SreamUpCallback * * -* @param InstancePtr is a pointer to the HDMI TX Subsystem instance. -* @param HandlerType specifies the type of handler. -* @param CallbackFunc is the address of the callback function. -* @param CallbackRef is a user data item that will be passed to the -* callback function when it is invoked. +* @param InstancePtr is a pointer to the HDMI TX Subsystem instance. +* @param HandlerType specifies the type of handler. +* @param CallbackFunc is the address of the callback function. +* @param CallbackRef is a user data item that will be passed to the +* callback function when it is invoked. * * @return -* - XST_SUCCESS if callback function installed successfully. -* - XST_INVALID_PARAM when HandlerType is invalid. +* - XST_SUCCESS if callback function installed successfully. +* - XST_INVALID_PARAM when HandlerType is invalid. * -* @note Invoking this function for a handler that already has been -* installed replaces it with the new handler. +* @note Invoking this function for a handler that already has been +* installed replaces it with the new handler. * ******************************************************************************/ int XV_HdmiTxSs_SetCallback(XV_HdmiTxSs *InstancePtr, - u32 HandlerType, - void *CallbackFunc, - void *CallbackRef) + u32 HandlerType, + void *CallbackFunc, + void *CallbackRef) { - u32 Status; + u32 Status; - /* Verify arguments. */ - Xil_AssertNonvoid(InstancePtr != NULL); - Xil_AssertNonvoid(HandlerType >= (XV_HDMITXSS_HANDLER_CONNECT)); - Xil_AssertNonvoid(CallbackFunc != NULL); - Xil_AssertNonvoid(CallbackRef != NULL); + /* Verify arguments. */ + Xil_AssertNonvoid(InstancePtr != NULL); + Xil_AssertNonvoid(HandlerType >= (XV_HDMITXSS_HANDLER_CONNECT)); + Xil_AssertNonvoid(CallbackFunc != NULL); + Xil_AssertNonvoid(CallbackRef != NULL); - /* Check for handler type */ - switch (HandlerType) { - case (XV_HDMITXSS_HANDLER_CONNECT): - InstancePtr->ConnectCallback = (XV_HdmiTxSs_Callback)CallbackFunc; - InstancePtr->ConnectRef = CallbackRef; - Status = (XST_SUCCESS); - break; + /* Check for handler type */ + switch (HandlerType) { + case (XV_HDMITXSS_HANDLER_CONNECT): + InstancePtr->ConnectCallback = (XV_HdmiTxSs_Callback)CallbackFunc; + InstancePtr->ConnectRef = CallbackRef; + Status = (XST_SUCCESS); + break; - case (XV_HDMITXSS_HANDLER_VS): - InstancePtr->VsCallback = (XV_HdmiTxSs_Callback)CallbackFunc; - InstancePtr->VsRef = CallbackRef; - Status = (XST_SUCCESS); - break; + case (XV_HDMITXSS_HANDLER_VS): + InstancePtr->VsCallback = (XV_HdmiTxSs_Callback)CallbackFunc; + InstancePtr->VsRef = CallbackRef; + Status = (XST_SUCCESS); + break; - // Stream down - case (XV_HDMITXSS_HANDLER_STREAM_DOWN): - InstancePtr->StreamDownCallback = - (XV_HdmiTxSs_Callback)CallbackFunc; - InstancePtr->StreamDownRef = CallbackRef; - Status = (XST_SUCCESS); - break; + // Stream down + case (XV_HDMITXSS_HANDLER_STREAM_DOWN): + InstancePtr->StreamDownCallback = + (XV_HdmiTxSs_Callback)CallbackFunc; + InstancePtr->StreamDownRef = CallbackRef; + Status = (XST_SUCCESS); + break; - // Stream up - case (XV_HDMITXSS_HANDLER_STREAM_UP): - InstancePtr->StreamUpCallback = (XV_HdmiTxSs_Callback)CallbackFunc; - InstancePtr->StreamUpRef = CallbackRef; - Status = (XST_SUCCESS); - break; + // Stream up + case (XV_HDMITXSS_HANDLER_STREAM_UP): + InstancePtr->StreamUpCallback = (XV_HdmiTxSs_Callback)CallbackFunc; + InstancePtr->StreamUpRef = CallbackRef; + Status = (XST_SUCCESS); + break; - default: - Status = (XST_INVALID_PARAM); - break; - } + default: + Status = (XST_INVALID_PARAM); + break; + } - return Status; + return Status; } /*****************************************************************************/ @@ -1123,13 +1145,13 @@ int XV_HdmiTxSs_ReadEdid(XV_HdmiTxSs *InstancePtr, u8 *Buffer) *Buffer = 0x00; // Offset zero Status = XV_HdmiTx_DdcWrite(InstancePtr->HdmiTxPtr, 0x50, 1, Buffer, - (FALSE)); + (FALSE)); // Check if write was successful if (Status == (XST_SUCCESS)) { // Read edid Status = XV_HdmiTx_DdcRead(InstancePtr->HdmiTxPtr, 0x50, 256, Buffer, - (TRUE)); + (TRUE)); } } @@ -1248,56 +1270,56 @@ void XV_HdmiTxSs_SendAuxInfoframe(XV_HdmiTxSs *InstancePtr, void *Aux) if (Aux == (NULL)) { /* Header, Packet type */ - InstancePtr->HdmiTxPtr->Aux.Header.Byte[0] = 0x84; + InstancePtr->HdmiTxPtr->Aux.Header.Byte[0] = 0x84; - /* Version */ - InstancePtr->HdmiTxPtr->Aux.Header.Byte[1] = 0x01; + /* Version */ + InstancePtr->HdmiTxPtr->Aux.Header.Byte[1] = 0x01; - /* Length */ - InstancePtr->HdmiTxPtr->Aux.Header.Byte[2] = 10; + /* Length */ + InstancePtr->HdmiTxPtr->Aux.Header.Byte[2] = 10; - /* Checksum (this will be calculated by the HDMI TX IP) */ - InstancePtr->HdmiTxPtr->Aux.Header.Byte[3] = 0; + /* Checksum (this will be calculated by the HDMI TX IP) */ + InstancePtr->HdmiTxPtr->Aux.Header.Byte[3] = 0; - /* 2 Channel count. Audio coding type refer to stream */ - InstancePtr->HdmiTxPtr->Aux.Data.Byte[1] = 0x1; + /* 2 Channel count. Audio coding type refer to stream */ + InstancePtr->HdmiTxPtr->Aux.Data.Byte[1] = 0x1; - for (Index = 2; Index < 32; Index++) { - InstancePtr->HdmiTxPtr->Aux.Data.Byte[Index] = 0; - } + for (Index = 2; Index < 32; Index++) { + InstancePtr->HdmiTxPtr->Aux.Data.Byte[Index] = 0; + } - /* Calculate AVI infoframe checksum */ - Crc = 0; + /* Calculate AVI infoframe checksum */ + Crc = 0; - /* Header */ - for (Index = 0; Index < 3; Index++) { - Crc += InstancePtr->HdmiTxPtr->Aux.Header.Byte[Index]; - } + /* Header */ + for (Index = 0; Index < 3; Index++) { + Crc += InstancePtr->HdmiTxPtr->Aux.Header.Byte[Index]; + } - /* Data */ - for (Index = 1; Index < 5; Index++) { - Crc += InstancePtr->HdmiTxPtr->Aux.Data.Byte[Index]; - } + /* Data */ + for (Index = 1; Index < 5; Index++) { + Crc += InstancePtr->HdmiTxPtr->Aux.Data.Byte[Index]; + } - Crc = 256 - Crc; - InstancePtr->HdmiTxPtr->Aux.Data.Byte[0] = Crc; + Crc = 256 - Crc; + InstancePtr->HdmiTxPtr->Aux.Data.Byte[0] = Crc; - XV_HdmiTx_AuxSend(InstancePtr->HdmiTxPtr); + XV_HdmiTx_AuxSend(InstancePtr->HdmiTxPtr); } else { - // Copy Audio Infoframe - if (InstancePtr->HdmiTxPtr->Aux.Header.Byte[0] == 0x84) { - // Header - InstancePtr->HdmiTxPtr->Aux.Header.Data = tx_aux->Header.Data; + // Copy Audio Infoframe + if (InstancePtr->HdmiTxPtr->Aux.Header.Byte[0] == 0x84) { + // Header + InstancePtr->HdmiTxPtr->Aux.Header.Data = tx_aux->Header.Data; - // Data - for (Index = 0; Index < 8; Index++) { - InstancePtr->HdmiTxPtr->Aux.Data.Data[Index] = - tx_aux->Data.Data[Index]; - } - } + // Data + for (Index = 0; Index < 8; Index++) { + InstancePtr->HdmiTxPtr->Aux.Data.Data[Index] = + tx_aux->Data.Data[Index]; + } + } } /* Send packet */ @@ -1319,7 +1341,7 @@ void XV_HdmiTxSs_SendAuxInfoframe(XV_HdmiTxSs *InstancePtr, void *Aux) ******************************************************************************/ void XV_HdmiTxSs_SetAudioChannels(XV_HdmiTxSs *InstancePtr, u8 AudioChannels) { - InstancePtr->AudioChannels = AudioChannels; + InstancePtr->AudioChannels = AudioChannels; } /*****************************************************************************/ @@ -1358,27 +1380,27 @@ void XV_HdmiTxSs_AudioMute(XV_HdmiTxSs *InstancePtr, u8 Enable) * ******************************************************************************/ u32 XV_HdmiTxSs_SetStream(XV_HdmiTxSs *InstancePtr, - XVidC_VideoMode VideoMode, XVidC_ColorFormat ColorFormat, - XVidC_ColorDepth Bpc, XVidC_PixelsPerClock Ppc) + XVidC_VideoMode VideoMode, XVidC_ColorFormat ColorFormat, + XVidC_ColorDepth Bpc) { u32 TmdsClock = 0; u32 Loop; u8 ReachedEnd = 0; if (VideoMode < XVIDC_VM_NUM_SUPPORTED) { - Loop = 0; + Loop = 0; do { switch (Loop) { case 0 : TmdsClock = XV_HdmiTx_SetStream(InstancePtr->HdmiTxPtr, VideoMode, - ColorFormat, Bpc, Ppc); + ColorFormat, Bpc, InstancePtr->Config.Ppc); break; // Try YCrCb 4:2:0 Colorspace at 4 pixels per clock case 1 : TmdsClock = XV_HdmiTx_SetStream(InstancePtr->HdmiTxPtr, VideoMode, - XVIDC_CSF_YCRCB_420, XVIDC_BPC_8, XVIDC_PPC_2); + XVIDC_CSF_YCRCB_420, XVIDC_BPC_8, XVIDC_PPC_2); break; default : @@ -1396,7 +1418,7 @@ u32 XV_HdmiTxSs_SetStream(XV_HdmiTxSs *InstancePtr, // Default 1080p colorbar else { TmdsClock = XV_HdmiTx_SetStream(InstancePtr->HdmiTxPtr, - XVIDC_VM_1920x1080_60_P, XVIDC_CSF_RGB, XVIDC_BPC_8, XVIDC_PPC_2); + XVIDC_VM_1920x1080_60_P, XVIDC_CSF_RGB, XVIDC_BPC_8, XVIDC_PPC_2); } return TmdsClock; @@ -1437,7 +1459,7 @@ u32 XV_HdmiTxSs_SetStreamReducedBlanking(XV_HdmiTxSs *InstancePtr) ******************************************************************************/ XVidC_VideoStream *XV_HdmiTxSs_GetVideoStream(XV_HdmiTxSs *InstancePtr) { - return (&InstancePtr->HdmiTxPtr->Stream.Video); + return (&InstancePtr->HdmiTxPtr->Stream.Video); } /*****************************************************************************/ @@ -1454,9 +1476,9 @@ XVidC_VideoStream *XV_HdmiTxSs_GetVideoStream(XV_HdmiTxSs *InstancePtr) * ******************************************************************************/ void XV_HdmiTxSs_SetVideoStream(XV_HdmiTxSs *InstancePtr, - XVidC_VideoStream VidStream) + XVidC_VideoStream VidStream) { - InstancePtr->HdmiTxPtr->Stream.Video = VidStream; + InstancePtr->HdmiTxPtr->Stream.Video = VidStream; } /*****************************************************************************/ @@ -1474,7 +1496,7 @@ void XV_HdmiTxSs_SetVideoStream(XV_HdmiTxSs *InstancePtr, ******************************************************************************/ void XV_HdmiTxSs_SetSamplingRate(XV_HdmiTxSs *InstancePtr, u8 SamplingRate) { - InstancePtr->SamplingRate = SamplingRate; + InstancePtr->SamplingRate = SamplingRate; } /*****************************************************************************/ @@ -1492,7 +1514,7 @@ void XV_HdmiTxSs_SetSamplingRate(XV_HdmiTxSs *InstancePtr, u8 SamplingRate) ******************************************************************************/ void XV_HdmiTxSs_SetVideoIDCode(XV_HdmiTxSs *InstancePtr, u8 Vic) { - InstancePtr->HdmiTxPtr->Stream.Vic = Vic; + InstancePtr->HdmiTxPtr->Stream.Vic = Vic; } /*****************************************************************************/ @@ -1510,7 +1532,7 @@ void XV_HdmiTxSs_SetVideoIDCode(XV_HdmiTxSs *InstancePtr, u8 Vic) ******************************************************************************/ void XV_HdmiTxSs_SetVideoStreamType(XV_HdmiTxSs *InstancePtr, u8 StreamType) { - InstancePtr->HdmiTxPtr->Stream.IsHdmi = StreamType; + InstancePtr->HdmiTxPtr->Stream.IsHdmi = StreamType; } /*****************************************************************************/ @@ -1527,9 +1549,9 @@ void XV_HdmiTxSs_SetVideoStreamType(XV_HdmiTxSs *InstancePtr, u8 StreamType) * ******************************************************************************/ void XV_HdmiTxSs_SetVideoStreamScramblingFlag(XV_HdmiTxSs *InstancePtr, - u8 IsScrambled) + u8 IsScrambled) { - InstancePtr->HdmiTxPtr->Stream.IsScrambled = IsScrambled; + InstancePtr->HdmiTxPtr->Stream.IsScrambled = IsScrambled; } /*****************************************************************************/ @@ -1547,7 +1569,7 @@ void XV_HdmiTxSs_SetVideoStreamScramblingFlag(XV_HdmiTxSs *InstancePtr, ******************************************************************************/ void XV_HdmiTxSs_SetTmdsClockRatio(XV_HdmiTxSs *InstancePtr, u8 Ratio) { - InstancePtr->HdmiTxPtr->Stream.TMDSClockRatio = Ratio; + InstancePtr->HdmiTxPtr->Stream.TMDSClockRatio = Ratio; } /*****************************************************************************/ @@ -1565,7 +1587,7 @@ void XV_HdmiTxSs_SetTmdsClockRatio(XV_HdmiTxSs *InstancePtr, u8 Ratio) ******************************************************************************/ u32 XV_HdmiTxSs_GetTmdsClockFreqHz(XV_HdmiTxSs *InstancePtr) { - return (InstancePtr->HdmiTxPtr->Stream.TMDSClock); + return (InstancePtr->HdmiTxPtr->Stream.TMDSClock); } /*****************************************************************************/ @@ -1573,18 +1595,18 @@ u32 XV_HdmiTxSs_GetTmdsClockFreqHz(XV_HdmiTxSs *InstancePtr) * * This function detects connected sink is a HDMI 2.0/HDMI 1.4 sink device * -* @param InstancePtr is a pointer to the XV_HdmiTxSs core instance. +* @param InstancePtr is a pointer to the XV_HdmiTxSs core instance. * * @return -* - XST_SUCCESS if HDMI 2.0 -* - XST_FAILURE if HDMI 1.4 +* - XST_SUCCESS if HDMI 2.0 +* - XST_FAILURE if HDMI 1.4 * * @note None. * ******************************************************************************/ int XV_HdmiTxSs_DetectHdmi20(XV_HdmiTxSs *InstancePtr) { - return (XV_HdmiTx_DetectHdmi20(InstancePtr->HdmiTxPtr)); + return (XV_HdmiTx_DetectHdmi20(InstancePtr->HdmiTxPtr)); } /*****************************************************************************/ @@ -1601,11 +1623,11 @@ int XV_HdmiTxSs_DetectHdmi20(XV_HdmiTxSs *InstancePtr) ******************************************************************************/ void XV_HdmiTxSs_RefClockChangeInit(XV_HdmiTxSs *InstancePtr) { - /* Assert HDMI TX reset */ - XV_HdmiTx_Reset(InstancePtr->HdmiTxPtr, TRUE); + /* Assert HDMI TX reset */ + XV_HdmiTx_Reset(InstancePtr->HdmiTxPtr, TRUE); - /* Clear variables */ - XV_HdmiTx_Clear(InstancePtr->HdmiTxPtr); + /* Clear variables */ + XV_HdmiTx_Clear(InstancePtr->HdmiTxPtr); } /*****************************************************************************/ @@ -1622,14 +1644,14 @@ void XV_HdmiTxSs_RefClockChangeInit(XV_HdmiTxSs *InstancePtr) ******************************************************************************/ void XV_HdmiTxSs_ReportTiming(XV_HdmiTxSs *InstancePtr) { - XV_HdmiTx_DebugInfo(InstancePtr->HdmiTxPtr); - xil_printf("Scrambled: %0d\n\r", - (XV_HdmiTx_IsStreamScrambled(InstancePtr->HdmiTxPtr))); - xil_printf("Sample rate: %0d\n\r", - (XV_HdmiTx_GetSampleRate(InstancePtr->HdmiTxPtr))); - xil_printf("Audio channels: %0d\n\r", - (XV_HdmiTx_GetAudioChannels(InstancePtr->HdmiTxPtr))); - print("\r\n"); + XV_HdmiTx_DebugInfo(InstancePtr->HdmiTxPtr); + xil_printf("Scrambled: %0d\n\r", + (XV_HdmiTx_IsStreamScrambled(InstancePtr->HdmiTxPtr))); + xil_printf("Sample rate: %0d\n\r", + (XV_HdmiTx_GetSampleRate(InstancePtr->HdmiTxPtr))); + xil_printf("Audio channels: %0d\n\r", + (XV_HdmiTx_GetAudioChannels(InstancePtr->HdmiTxPtr))); + print("\r\n"); } @@ -1650,21 +1672,21 @@ void XV_HdmiTxSs_ReportSubcoreVersion(XV_HdmiTxSs *InstancePtr) u32 Data; if (InstancePtr->HdmiTxPtr) { - Data = XV_HdmiTx_GetVersion(InstancePtr->HdmiTxPtr); - xil_printf(" HDMI TX version : %02d.%02d (%04x)\n\r", - ((Data >> 24) & 0xFF), ((Data >> 16) & 0xFF), (Data & 0xFFFF)); + Data = XV_HdmiTx_GetVersion(InstancePtr->HdmiTxPtr); + xil_printf(" HDMI TX version : %02d.%02d (%04x)\n\r", + ((Data >> 24) & 0xFF), ((Data >> 16) & 0xFF), (Data & 0xFFFF)); } if (InstancePtr->VtcPtr){ - Data = XVtc_GetVersion(InstancePtr->VtcPtr); - xil_printf(" VTC version : %02d.%02d (%04x)\n\r", - ((Data >> 24) & 0xFF), ((Data >> 16) & 0xFF), (Data & 0xFFFF)); + Data = XVtc_GetVersion(InstancePtr->VtcPtr); + xil_printf(" VTC version : %02d.%02d (%04x)\n\r", + ((Data >> 24) & 0xFF), ((Data >> 16) & 0xFF), (Data & 0xFFFF)); } if (InstancePtr->HdcpPtr){ - Data = XHdcp1x_GetVersion(InstancePtr->HdcpPtr); - xil_printf(" HDCP TX version : %02d.%02d (%04x)\n\r", - ((Data >> 24) & 0xFF), ((Data >> 16) & 0xFF), (Data & 0xFFFF)); + Data = XHdcp1x_GetVersion(InstancePtr->HdcpPtr); + xil_printf(" HDCP TX version : %02d.%02d (%04x)\n\r", + ((Data >> 24) & 0xFF), ((Data >> 16) & 0xFF), (Data & 0xFFFF)); } } @@ -1682,22 +1704,22 @@ void XV_HdmiTxSs_ReportSubcoreVersion(XV_HdmiTxSs *InstancePtr) ******************************************************************************/ void XV_HdmiTxSs_HdcpEnable(XV_HdmiTxSs *InstancePtr, u8 Enable) { - XV_HdmiTxSs *HdmiTxSsPtr = InstancePtr; + XV_HdmiTxSs *HdmiTxSsPtr = InstancePtr; - if (Enable) { - /* Enable hdcp interface */ - XHdcp1x_Enable(HdmiTxSsPtr->HdcpPtr); + if (Enable) { + /* Enable hdcp interface */ + XHdcp1x_Enable(HdmiTxSsPtr->HdcpPtr); - /* Set the TX HDCP state to up */ - XHdcp1x_SetPhysicalState(HdmiTxSsPtr->HdcpPtr, TRUE); - } - else { - /* Set the TX HDCP state to down */ - XHdcp1x_SetPhysicalState(HdmiTxSsPtr->HdcpPtr, FALSE); + /* Set the TX HDCP state to up */ + XHdcp1x_SetPhysicalState(HdmiTxSsPtr->HdcpPtr, TRUE); + } + else { + /* Set the TX HDCP state to down */ + XHdcp1x_SetPhysicalState(HdmiTxSsPtr->HdcpPtr, FALSE); - /* Disable hdcp interface */ - XHdcp1x_Disable(HdmiTxSsPtr->HdcpPtr); - } + /* Disable hdcp interface */ + XHdcp1x_Disable(HdmiTxSsPtr->HdcpPtr); + } } /*****************************************************************************/ @@ -1707,7 +1729,7 @@ void XV_HdmiTxSs_HdcpEnable(XV_HdmiTxSs *InstancePtr, u8 Enable) * stream is encrypted. The traffic is encrypted if the encryption bit map * is non-zero and the interface is authenticated. * -* @return Truth value indicating encrypted (TRUE) or not (FALSE). +* @return Truth value indicating encrypted (TRUE) or not (FALSE). * * @note * This function is intended to be called from within the main loop of the @@ -1716,14 +1738,14 @@ void XV_HdmiTxSs_HdcpEnable(XV_HdmiTxSs *InstancePtr, u8 Enable) ******************************************************************************/ u8 XV_HdmiTxSs_HdcpPoll(XV_HdmiTxSs *InstancePtr) { - /* Locals */ - XV_HdmiTxSs *HdmiTxSsPtr = InstancePtr; + /* Locals */ + XV_HdmiTxSs *HdmiTxSsPtr = InstancePtr; - /* Poll hdcp interface */ - XHdcp1x_Poll(HdmiTxSsPtr->HdcpPtr); + /* Poll hdcp interface */ + XHdcp1x_Poll(HdmiTxSsPtr->HdcpPtr); - /* Return */ - return (XHdcp1x_IsEncrypted(HdmiTxSsPtr->HdcpPtr)); + /* Return */ + return (XHdcp1x_IsEncrypted(HdmiTxSsPtr->HdcpPtr)); } @@ -1741,22 +1763,22 @@ u8 XV_HdmiTxSs_HdcpPoll(XV_HdmiTxSs *InstancePtr) ******************************************************************************/ u8 XV_HdmiTxSs_HdcpStart(XV_HdmiTxSs *InstancePtr) { - /* Locals */ - XV_HdmiTxSs *HdmiTxSsPtr = InstancePtr; - u8 retval = FALSE; + /* Locals */ + XV_HdmiTxSs *HdmiTxSsPtr = InstancePtr; + u8 retval = FALSE; - if (XHdcp1x_TxIsAuthenticated(HdmiTxSsPtr->HdcpPtr)==0) - { - XHdcp1x_Authenticate(HdmiTxSsPtr->HdcpPtr); - retval = FALSE; - } - else - { - XHdcp1x_EnableEncryption(HdmiTxSsPtr->HdcpPtr,0x1); - retval = TRUE; - } + if (XHdcp1x_TxIsAuthenticated(HdmiTxSsPtr->HdcpPtr)==0) + { + XHdcp1x_Authenticate(HdmiTxSsPtr->HdcpPtr); + retval = FALSE; + } + else + { + XHdcp1x_EnableEncryption(HdmiTxSsPtr->HdcpPtr,0x1); + retval = TRUE; + } - return retval; + return retval; } /******************************************************************************/ @@ -1775,34 +1797,34 @@ u8 XV_HdmiTxSs_HdcpStart(XV_HdmiTxSs *InstancePtr) * ******************************************************************************/ static u32 XV_HdmiTxSs_HdcpTimerConvUsToTicks(u32 TimeoutInUs, - u32 ClockFrequency) + u32 ClockFrequency) { - u32 TimeoutFreq = 0; - u32 NumTicks = 0; + u32 TimeoutFreq = 0; + u32 NumTicks = 0; - /* Check for greater than one second */ - if (TimeoutInUs > 1000000ul) { - u32 NumSeconds = 0; + /* Check for greater than one second */ + if (TimeoutInUs > 1000000ul) { + u32 NumSeconds = 0; - /* Determine theNumSeconds */ - NumSeconds = (TimeoutInUs/1000000ul); + /* Determine theNumSeconds */ + NumSeconds = (TimeoutInUs/1000000ul); - /* Update theNumTicks */ - NumTicks = (NumSeconds*ClockFrequency); + /* Update theNumTicks */ + NumTicks = (NumSeconds*ClockFrequency); - /* Adjust theTimeoutInUs */ - TimeoutInUs -= (NumSeconds*1000000ul); - } + /* Adjust theTimeoutInUs */ + TimeoutInUs -= (NumSeconds*1000000ul); + } - /* Convert TimeoutFreq to a frequency */ - TimeoutFreq = 1000; - TimeoutFreq *= 1000; - TimeoutFreq /= TimeoutInUs; + /* Convert TimeoutFreq to a frequency */ + TimeoutFreq = 1000; + TimeoutFreq *= 1000; + TimeoutFreq /= TimeoutInUs; - /* Update NumTicks */ - NumTicks += ((ClockFrequency / TimeoutFreq) + 1); + /* Update NumTicks */ + NumTicks += ((ClockFrequency / TimeoutFreq) + 1); - return (NumTicks); + return (NumTicks); } /*****************************************************************************/ @@ -1822,10 +1844,10 @@ static u32 XV_HdmiTxSs_HdcpTimerConvUsToTicks(u32 TimeoutInUs, ******************************************************************************/ void XV_HdmiTxSs_HdcpTimerCallback(void* CallBackRef, u8 TimerChannel) { - XHdcp1x* HdcpPtr = CallBackRef; + XHdcp1x* HdcpPtr = CallBackRef; - XHdcp1x_HandleTimeout(HdcpPtr); - return; + XHdcp1x_HandleTimeout(HdcpPtr); + return; } /******************************************************************************/ @@ -1845,38 +1867,38 @@ void XV_HdmiTxSs_HdcpTimerCallback(void* CallBackRef, u8 TimerChannel) ******************************************************************************/ int XV_HdmiTxSs_HdcpTimerStart(const XHdcp1x* InstancePtr, u16 TimeoutInMs) { - XV_HdmiTxSs_SubCores *SubCorePtr; - XTmrCtr *TimerPtr; - u8 TimerChannel = 0; - u32 TimerOptions = 0; - u32 NumTicks = 0; + XV_HdmiTxSs_SubCores *SubCorePtr; + XTmrCtr *TimerPtr; + u8 TimerChannel = 0; + u32 TimerOptions = 0; + u32 NumTicks = 0; - SubCorePtr = XV_HdmiTxSs_GetSubSysStruct((void*)InstancePtr); - TimerPtr = &SubCorePtr->HdcpTimer; + SubCorePtr = XV_HdmiTxSs_GetSubSysStruct((void*)InstancePtr); + TimerPtr = &SubCorePtr->HdcpTimer; - /* Determine NumTicks */ - NumTicks = XV_HdmiTxSs_HdcpTimerConvUsToTicks((TimeoutInMs*1000ul), - XPAR_CPU_CORE_CLOCK_FREQ_HZ); + /* Determine NumTicks */ + NumTicks = XV_HdmiTxSs_HdcpTimerConvUsToTicks((TimeoutInMs*1000ul), + XPAR_CPU_CORE_CLOCK_FREQ_HZ); - /* Stop it */ - XTmrCtr_Stop(TimerPtr, TimerChannel); + /* Stop it */ + XTmrCtr_Stop(TimerPtr, TimerChannel); - /* Configure the callback */ - XTmrCtr_SetHandler(TimerPtr, &XV_HdmiTxSs_HdcpTimerCallback, - (void*) InstancePtr); + /* Configure the callback */ + XTmrCtr_SetHandler(TimerPtr, &XV_HdmiTxSs_HdcpTimerCallback, + (void*) InstancePtr); - /* Configure the timer options */ - TimerOptions = XTmrCtr_GetOptions(TimerPtr, TimerChannel); - TimerOptions |= XTC_DOWN_COUNT_OPTION; - TimerOptions |= XTC_INT_MODE_OPTION; - TimerOptions &= ~XTC_AUTO_RELOAD_OPTION; - XTmrCtr_SetOptions(TimerPtr, TimerChannel, TimerOptions); + /* Configure the timer options */ + TimerOptions = XTmrCtr_GetOptions(TimerPtr, TimerChannel); + TimerOptions |= XTC_DOWN_COUNT_OPTION; + TimerOptions |= XTC_INT_MODE_OPTION; + TimerOptions &= ~XTC_AUTO_RELOAD_OPTION; + XTmrCtr_SetOptions(TimerPtr, TimerChannel, TimerOptions); - /* Set the timeout and start */ - XTmrCtr_SetResetValue(TimerPtr, TimerChannel, NumTicks); - XTmrCtr_Start(TimerPtr, TimerChannel); + /* Set the timeout and start */ + XTmrCtr_SetResetValue(TimerPtr, TimerChannel, NumTicks); + XTmrCtr_Start(TimerPtr, TimerChannel); - return (XST_SUCCESS); + return (XST_SUCCESS); } @@ -1896,17 +1918,17 @@ int XV_HdmiTxSs_HdcpTimerStart(const XHdcp1x* InstancePtr, u16 TimeoutInMs) ******************************************************************************/ int XV_HdmiTxSs_HdcpTimerStop(const XHdcp1x* InstancePtr) { - XV_HdmiTxSs_SubCores *SubCorePtr; - XTmrCtr *TimerPtr; - u8 TimerChannel = 0; + XV_HdmiTxSs_SubCores *SubCorePtr; + XTmrCtr *TimerPtr; + u8 TimerChannel = 0; - SubCorePtr = XV_HdmiTxSs_GetSubSysStruct((void*)InstancePtr); - TimerPtr = &SubCorePtr->HdcpTimer; + SubCorePtr = XV_HdmiTxSs_GetSubSysStruct((void*)InstancePtr); + TimerPtr = &SubCorePtr->HdcpTimer; - /* Stop it */ - XTmrCtr_Stop(TimerPtr, TimerChannel); + /* Stop it */ + XTmrCtr_Stop(TimerPtr, TimerChannel); - return (XST_SUCCESS); + return (XST_SUCCESS); } @@ -1927,35 +1949,35 @@ int XV_HdmiTxSs_HdcpTimerStop(const XHdcp1x* InstancePtr) ******************************************************************************/ int XV_HdmiTxSs_HdcpTimerBusyDelay(const XHdcp1x* InstancePtr, u16 DelayInMs) { - XV_HdmiTxSs_SubCores *SubCorePtr; - XTmrCtr *TimerPtr; - u8 TimerChannel = 0; - u32 TimerOptions = 0; - u32 NumTicks = 0; + XV_HdmiTxSs_SubCores *SubCorePtr; + XTmrCtr *TimerPtr; + u8 TimerChannel = 0; + u32 TimerOptions = 0; + u32 NumTicks = 0; - SubCorePtr = XV_HdmiTxSs_GetSubSysStruct((void*)InstancePtr); - TimerPtr = &SubCorePtr->HdcpTimer; + SubCorePtr = XV_HdmiTxSs_GetSubSysStruct((void*)InstancePtr); + TimerPtr = &SubCorePtr->HdcpTimer; - /* Determine NumTicks */ - NumTicks = XV_HdmiTxSs_HdcpTimerConvUsToTicks((DelayInMs*1000ul), - XPAR_CPU_CORE_CLOCK_FREQ_HZ); + /* Determine NumTicks */ + NumTicks = XV_HdmiTxSs_HdcpTimerConvUsToTicks((DelayInMs*1000ul), + XPAR_CPU_CORE_CLOCK_FREQ_HZ); - /* Stop it */ - XTmrCtr_Stop(TimerPtr, TimerChannel); + /* Stop it */ + XTmrCtr_Stop(TimerPtr, TimerChannel); - /* Configure the timer options */ - TimerOptions = XTmrCtr_GetOptions(TimerPtr, TimerChannel); - TimerOptions |= XTC_DOWN_COUNT_OPTION; - TimerOptions &= ~XTC_INT_MODE_OPTION; - TimerOptions &= ~XTC_AUTO_RELOAD_OPTION; - XTmrCtr_SetOptions(TimerPtr, TimerChannel, TimerOptions); + /* Configure the timer options */ + TimerOptions = XTmrCtr_GetOptions(TimerPtr, TimerChannel); + TimerOptions |= XTC_DOWN_COUNT_OPTION; + TimerOptions &= ~XTC_INT_MODE_OPTION; + TimerOptions &= ~XTC_AUTO_RELOAD_OPTION; + XTmrCtr_SetOptions(TimerPtr, TimerChannel, TimerOptions); - /* Set the timeout and start */ - XTmrCtr_SetResetValue(TimerPtr, TimerChannel, NumTicks); - XTmrCtr_Start(TimerPtr, TimerChannel); + /* Set the timeout and start */ + XTmrCtr_SetResetValue(TimerPtr, TimerChannel, NumTicks); + XTmrCtr_Start(TimerPtr, TimerChannel); - /* Wait until done */ - while (!XTmrCtr_IsExpired(TimerPtr, TimerChannel)); + /* Wait until done */ + while (!XTmrCtr_IsExpired(TimerPtr, TimerChannel)); - return (XST_SUCCESS); + return (XST_SUCCESS); } diff --git a/XilinxProcessorIPLib/drivers/v_hdmitxss/src/xv_hdmitxss.h b/XilinxProcessorIPLib/drivers/v_hdmitxss/src/xv_hdmitxss.h old mode 100755 new mode 100644 index 736804f2..fd069d67 --- a/XilinxProcessorIPLib/drivers/v_hdmitxss/src/xv_hdmitxss.h +++ b/XilinxProcessorIPLib/drivers/v_hdmitxss/src/xv_hdmitxss.h @@ -45,12 +45,12 @@ * Subsystem Driver Features * * HDMI Subsystem supports following features -* - AXI Stream Input/Output interface -* - 1, 2 or 4 pixel-wide video interface -* - 8/10/12/16 bits per component -* - RGB & YCbCr color space -* - Up to 4k2k 60Hz resolution at both Input and Output interface -* - Interlaced input support (1080i 50Hz/60Hz) +* - AXI Stream Input/Output interface +* - 1, 2 or 4 pixel-wide video interface +* - 8/10/12/16 bits per component +* - RGB & YCbCr color space +* - Up to 4k2k 60Hz resolution at both Input and Output interface +* - Interlaced input support (1080i 50Hz/60Hz) *
 * MODIFICATION HISTORY:
@@ -92,10 +92,10 @@ extern "C" {
 * interrupt requests from peripheral.
 */
 typedef enum {
-       XV_HDMITXSS_HANDLER_CONNECT = 1,            /**< Handler for connect     */
-       XV_HDMITXSS_HANDLER_VS,                         /**< Handler for vsync       */
-       XV_HDMITXSS_HANDLER_STREAM_DOWN,                /**< Handler for stream down */
-       XV_HDMITXSS_HANDLER_STREAM_UP                   /**< Handler for stream up   */
+	XV_HDMITXSS_HANDLER_CONNECT = 1,	    /**< Handler for connect     */
+	XV_HDMITXSS_HANDLER_VS,			        /**< Handler for vsync       */
+	XV_HDMITXSS_HANDLER_STREAM_DOWN,		/**< Handler for stream down */
+	XV_HDMITXSS_HANDLER_STREAM_UP			/**< Handler for stream up   */
 } XV_HdmiTxSs_HandlerType;
 /*@}*/
 
@@ -117,17 +117,17 @@ typedef struct
 
 typedef struct
 {
-       u16 DeviceId;               /**< DeviceId is the unique ID  of the device */
-       u32 BaseAddress;          /**< BaseAddress is the physical base address of the
-                                                               subsystem address range */
-       u32 HighAddress;          /**< HighAddress is the physical MAX address of the
-                                                               subsystem address range */
+	u16 DeviceId;	            /**< DeviceId is the unique ID  of the device */
+	u32 BaseAddress;          /**< BaseAddress is the physical base address of the
+								subsystem address range */
+	u32 HighAddress;          /**< HighAddress is the physical MAX address of the
+								subsystem address range */
 	XVidC_PixelsPerClock Ppc;         /**< Supported Pixel per Clock */
-       u8 MaxBitsPerPixel;               /**< Maximum  Supported Color Depth */
-       XV_HdmiTxSs_SubCore HdcpTimer;    /**< Sub-core instance configuration */
-       XV_HdmiTxSs_SubCore Hdcp;         /**< Sub-core instance configuration */
-       XV_HdmiTxSs_SubCore HdmiTx;       /**< Sub-core instance configuration */
-       XV_HdmiTxSs_SubCore Vtc;          /**< Sub-core instance configuration */
+	u8 MaxBitsPerPixel;               /**< Maximum  Supported Color Depth */
+	XV_HdmiTxSs_SubCore HdcpTimer;    /**< Sub-core instance configuration */
+	XV_HdmiTxSs_SubCore Hdcp;         /**< Sub-core instance configuration */
+	XV_HdmiTxSs_SubCore HdmiTx;       /**< Sub-core instance configuration */
+	XV_HdmiTxSs_SubCore Vtc;          /**< Sub-core instance configuration */
 } XV_HdmiTxSs_Config;
 
 /**
@@ -151,43 +151,43 @@ typedef void (*XV_HdmiTxSs_Callback)(void *CallbackRef);
 */
 typedef struct
 {
-       XV_HdmiTxSs_Config Config;      /**< Hardware configuration */
-       u32 IsReady;             /**< Device and the driver instance are initialized */
+	XV_HdmiTxSs_Config Config;	/**< Hardware configuration */
+	u32 IsReady;		 /**< Device and the driver instance are initialized */
 
-       XTmrCtr *HdcpTimerPtr;          /**< handle to sub-core driver instance */
-       XHdcp1x *HdcpPtr;               /**< handle to sub-core driver instance */
-       XV_HdmiTx *HdmiTxPtr;           /**< handle to sub-core driver instance */
-       XVtc *VtcPtr;                   /**< handle to sub-core driver instance */
+	XTmrCtr *HdcpTimerPtr;    	/**< handle to sub-core driver instance */
+	XHdcp1x *HdcpPtr;         	/**< handle to sub-core driver instance */
+	XV_HdmiTx *HdmiTxPtr;     	/**< handle to sub-core driver instance */
+	XVtc *VtcPtr;             	/**< handle to sub-core driver instance */
 
-       /* Callbacks */
-       XV_HdmiTxSs_Callback ConnectCallback;   /**< Callback for connect
-                                                                               * event interrupt */
-       void *ConnectRef;       /**< To be passed to the connect
-                                                                               * interrupt callback */
+	/* Callbacks */
+	XV_HdmiTxSs_Callback ConnectCallback;	/**< Callback for connect
+										* event interrupt */
+	void *ConnectRef;	/**< To be passed to the connect
+										* interrupt callback */
 
-       XV_HdmiTxSs_Callback VsCallback; /**< Callback for Vsync event interrupt */
-       void *VsRef; /**< To be passed to the Vsync interrupt callback */
+	XV_HdmiTxSs_Callback VsCallback; /**< Callback for Vsync event interrupt */
+	void *VsRef; /**< To be passed to the Vsync interrupt callback */
 
-       XV_HdmiTxSs_Callback StreamDownCallback; /**< Callback for stream
-                                                                                       * down callback */
-       void *StreamDownRef; /**< To be passed to the stream down callback */
+	XV_HdmiTxSs_Callback StreamDownCallback; /**< Callback for stream
+											* down callback */
+	void *StreamDownRef; /**< To be passed to the stream down callback */
 
-       XV_HdmiTxSs_Callback StreamUpCallback; /**< Callback for stream up
-                                                                                       * callback */
-       void *StreamUpRef;      /**< To be passed to the stream up callback */
+	XV_HdmiTxSs_Callback StreamUpCallback; /**< Callback for stream up
+											* callback */
+	void *StreamUpRef;	/**< To be passed to the stream up callback */
 
-       /**< Scratch pad */
-       u8 SamplingRate;              /**< HDMI TX Sampling rate */
-       u8 IsStreamConnected;         /**< HDMI TX Stream Connected */
-       u8 AudioEnabled;              /**< HDMI TX Audio Enabled */
-       u8 AudioMute;                 /**< HDMI TX Audio Mute */
-       u8 AudioChannels;             /**< Number of Audio Channels */
+	/**< Scratch pad */
+	u8 SamplingRate;              /**< HDMI TX Sampling rate */
+	u8 IsStreamConnected;         /**< HDMI TX Stream Connected */
+	u8 AudioEnabled;              /**< HDMI TX Audio Enabled */
+	u8 AudioMute;                 /**< HDMI TX Audio Mute */
+	u8 AudioChannels;             /**< Number of Audio Channels */
 
-       XVidC_DelayHandler UserTimerWaitUs;     /**< Custom user function for
-                                                       delay/sleep. */
-       void *UserTimerPtr;           /**< Pointer to a timer instance
-                                                       used by the custom user
-                                                       delay/sleep function. */
+	XVidC_DelayHandler UserTimerWaitUs;	/**< Custom user function for
+							delay/sleep. */
+	void *UserTimerPtr;           /**< Pointer to a timer instance
+							used by the custom user
+							delay/sleep function. */
 } XV_HdmiTxSs;
 
 /************************** Macros Definitions *******************************/
@@ -196,20 +196,20 @@ typedef struct
 XV_HdmiTxSs_Config *XV_HdmiTxSs_LookupConfig(u32 DeviceId);
 void XV_HdmiTxSs_ReportCoreInfo(XV_HdmiTxSs *InstancePtr);
 void XV_HdmiTxSs_SetUserTimerHandler(XV_HdmiTxSs *InstancePtr,
-               XVidC_DelayHandler CallbackFunc, void *CallbackRef);
+		XVidC_DelayHandler CallbackFunc, void *CallbackRef);
 void XV_HdmiTxSS_HdmiTxIntrHandler(XV_HdmiTxSs *InstancePtr);
 void XV_HdmiTxSS_HdcpIntrHandler(XV_HdmiTxSs *InstancePtr);
 void XV_HdmiTxSS_HdcpTimerIntrHandler(XV_HdmiTxSs *InstancePtr);
 int XV_HdmiTxSs_CfgInitialize(XV_HdmiTxSs *InstancePtr,
-       XV_HdmiTxSs_Config *CfgPtr,
-       u32 EffectiveAddr);
+	XV_HdmiTxSs_Config *CfgPtr,
+	u32 EffectiveAddr);
 void XV_HdmiTxSs_Start(XV_HdmiTxSs *InstancePtr);
 void XV_HdmiTxSs_Stop(XV_HdmiTxSs *InstancePtr);
 void XV_HdmiTxSs_Reset(XV_HdmiTxSs *InstancePtr);
 int XV_HdmiTxSs_SetCallback(XV_HdmiTxSs *InstancePtr,
-       u32 HandlerType,
-       void *CallbackFuncPtr,
-       void *CallbackRef);
+	u32 HandlerType,
+	void *CallbackFuncPtr,
+	void *CallbackRef);
 int XV_HdmiTxSs_ReadEdid(XV_HdmiTxSs *InstancePtr, u8 *BufferPtr);
 void XV_HdmiTxSs_ShowEdid(XV_HdmiTxSs *InstancePtr);
 void XV_HdmiTxSs_StreamStart(XV_HdmiTxSs *InstancePtr);
@@ -217,19 +217,18 @@ void XV_HdmiTxSs_SendAuxInfoframe(XV_HdmiTxSs *InstancePtr, void *AuxPtr);
 void XV_HdmiTxSs_SetAudioChannels(XV_HdmiTxSs *InstancePtr, u8 AudioChannels);
 void XV_HdmiTxSs_AudioMute(XV_HdmiTxSs *InstancePtr, u8 Enable);
 u32 XV_HdmiTxSs_SetStream(XV_HdmiTxSs *InstancePtr,
-       XVidC_VideoMode VideoMode,
-       XVidC_ColorFormat ColorFormat,
-       XVidC_ColorDepth Bpc,
-       XVidC_PixelsPerClock Ppc);
+	XVidC_VideoMode VideoMode,
+	XVidC_ColorFormat ColorFormat,
+	XVidC_ColorDepth Bpc);
 u32 XV_HdmiTxSs_SetStreamReducedBlanking(XV_HdmiTxSs *InstancePtr);
 XVidC_VideoStream *XV_HdmiTxSs_GetVideoStream(XV_HdmiTxSs *InstancePtr);
 void XV_HdmiTxSs_SetVideoStream(XV_HdmiTxSs *InstancePtr,
-                                                                       XVidC_VideoStream VidStream);
+									XVidC_VideoStream VidStream);
 void XV_HdmiTxSs_SetSamplingRate(XV_HdmiTxSs *InstancePtr, u8 SamplingRate);
 void XV_HdmiTxSs_SetVideoIDCode(XV_HdmiTxSs *InstancePtr, u8 Vic);
 void XV_HdmiTxSs_SetVideoStreamType(XV_HdmiTxSs *InstancePtr, u8 StreamType);
 void XV_HdmiTxSs_SetVideoStreamScramblingFlag(XV_HdmiTxSs *InstancePtr,
-                                                                                                                       u8 IsScrambled);
+															u8 IsScrambled);
 void XV_HdmiTxSs_SetTmdsClockRatio(XV_HdmiTxSs *InstancePtr, u8 Ratio);
 u32 XV_HdmiTxSs_GetTmdsClockFreqHz(XV_HdmiTxSs *InstancePtr);
 int XV_HdmiTxSs_DetectHdmi20(XV_HdmiTxSs *InstancePtr);
diff --git a/XilinxProcessorIPLib/drivers/v_hdmitxss/src/xv_hdmitxss_coreinit.c b/XilinxProcessorIPLib/drivers/v_hdmitxss/src/xv_hdmitxss_coreinit.c
old mode 100755
new mode 100644
index 1e52c0e4..0cd01b95
--- a/XilinxProcessorIPLib/drivers/v_hdmitxss/src/xv_hdmitxss_coreinit.c
+++ b/XilinxProcessorIPLib/drivers/v_hdmitxss/src/xv_hdmitxss_coreinit.c
@@ -63,9 +63,9 @@
 
 /************************** Function Prototypes ******************************/
 static int XV_HdmiTxSs_ComputeSubcoreAbsAddr(u32 SubSys_BaseAddr,
-       u32 SubSys_HighAddr,
-       u32 SubCore_Offset,
-       u32 *SubCore_BaseAddr);
+	u32 SubSys_HighAddr,
+	u32 SubCore_Offset,
+	u32 *SubCore_BaseAddr);
 
 /*****************************************************************************/
 /**
@@ -85,9 +85,9 @@ static int XV_HdmiTxSs_ComputeSubcoreAbsAddr(u32 SubSys_BaseAddr,
 *
 ******************************************************************************/
 static int XV_HdmiTxSs_ComputeSubcoreAbsAddr(u32 SubSys_BaseAddr,
-       u32 SubSys_HighAddr,
-       u32 SubCore_Offset,
-       u32 *SubCore_BaseAddr)
+	u32 SubSys_HighAddr,
+	u32 SubCore_Offset,
+	u32 *SubCore_BaseAddr)
 {
   int Status;
   u32 AbsAddr;
@@ -98,8 +98,8 @@ static int XV_HdmiTxSs_ComputeSubcoreAbsAddr(u32 SubSys_BaseAddr,
     Status = XST_SUCCESS;
   }
   else {
-       *SubCore_BaseAddr = 0;
-       Status = XST_FAILURE;
+	*SubCore_BaseAddr = 0;
+	Status = XST_FAILURE;
   }
 
   return(Status);
@@ -121,7 +121,7 @@ int XV_HdmiTxSs_SubcoreInitHdmiTx(XV_HdmiTxSs *HdmiTxSsPtr)
   XV_HdmiTx_Config *ConfigPtr;
 
   if (HdmiTxSsPtr->HdmiTxPtr) {
-       /* Get core configuration */
+	/* Get core configuration */
     xdbg_printf(XDBG_DEBUG_GENERAL,"    ->Initializing HDMI TX core.... \r\n");
     ConfigPtr  = XV_HdmiTx_LookupConfig(HdmiTxSsPtr->Config.HdmiTx.DeviceId);
     if (ConfigPtr == NULL) {
@@ -129,20 +129,20 @@ int XV_HdmiTxSs_SubcoreInitHdmiTx(XV_HdmiTxSs *HdmiTxSsPtr)
       return(XST_FAILURE);
     }
 
-       /* Compute absolute base address */
+	/* Compute absolute base address */
     AbsAddr = 0;
     Status = XV_HdmiTxSs_ComputeSubcoreAbsAddr(HdmiTxSsPtr->Config.BaseAddress,
-                                      HdmiTxSsPtr->Config.HighAddress,
-                                      HdmiTxSsPtr->Config.HdmiTx.AddrOffset,
-                                      &AbsAddr);
+		                       HdmiTxSsPtr->Config.HighAddress,
+		                       HdmiTxSsPtr->Config.HdmiTx.AddrOffset,
+		                       &AbsAddr);
 
     if (Status != XST_SUCCESS) {
       xil_printf("HDMITXSS ERR:: HDMI TX core base address (0x%x) \
-               invalid %d\r\n", AbsAddr);
+		invalid %d\r\n", AbsAddr);
       return(XST_FAILURE);
     }
 
-       /* Initialize core */
+	/* Initialize core */
     Status = XV_HdmiTx_CfgInitialize(HdmiTxSsPtr->HdmiTxPtr,
                                     ConfigPtr,
                                     AbsAddr);
@@ -171,7 +171,7 @@ int XV_HdmiTxSs_SubcoreInitVtc(XV_HdmiTxSs *HdmiTxSsPtr)
   XVtc_Config *ConfigPtr;
 
   if (HdmiTxSsPtr->VtcPtr) {
-       /* Get core configuration */
+	/* Get core configuration */
     xdbg_printf(XDBG_DEBUG_GENERAL,"    ->Initializing VTC core.... \r\n");
     ConfigPtr  = XVtc_LookupConfig(HdmiTxSsPtr->Config.Vtc.DeviceId);
     if (ConfigPtr == NULL) {
@@ -179,20 +179,20 @@ int XV_HdmiTxSs_SubcoreInitVtc(XV_HdmiTxSs *HdmiTxSsPtr)
       return(XST_FAILURE);
     }
 
-       /* Compute absolute base address */
+	/* Compute absolute base address */
     AbsAddr = 0;
     Status = XV_HdmiTxSs_ComputeSubcoreAbsAddr(HdmiTxSsPtr->Config.BaseAddress,
-                                      HdmiTxSsPtr->Config.HighAddress,
-                                      HdmiTxSsPtr->Config.Vtc.AddrOffset,
-                                      &AbsAddr);
+		                       HdmiTxSsPtr->Config.HighAddress,
+		                       HdmiTxSsPtr->Config.Vtc.AddrOffset,
+		                       &AbsAddr);
 
     if (Status != XST_SUCCESS) {
       xil_printf("HDMITXSS ERR:: CSC core base address (0x%x) \
-                                                       invalid %d\r\n", AbsAddr);
+							invalid %d\r\n", AbsAddr);
       return(XST_FAILURE);
     }
 
-       /* Initialize core */
+	/* Initialize core */
     Status = XVtc_CfgInitialize(HdmiTxSsPtr->VtcPtr,
                                 ConfigPtr,
                                 AbsAddr);
@@ -222,7 +222,7 @@ int XV_HdmiTxSs_SubcoreInitHdcpTimer(XV_HdmiTxSs *HdmiTxSsPtr)
   XTmrCtr_Config *ConfigPtr;
 
   if (HdmiTxSsPtr->HdcpTimerPtr) {
-       /* Get core configuration */
+	/* Get core configuration */
     xdbg_printf(XDBG_DEBUG_GENERAL,"   ->Initializing AXI Timer core.... \r\n");
     ConfigPtr  = XTmrCtr_LookupConfig(HdmiTxSsPtr->Config.HdcpTimer.DeviceId);
     if (ConfigPtr == NULL) {
@@ -230,30 +230,30 @@ int XV_HdmiTxSs_SubcoreInitHdcpTimer(XV_HdmiTxSs *HdmiTxSsPtr)
       return(XST_FAILURE);
     }
 
-       /* Compute absolute base address */
+	/* Compute absolute base address */
     AbsAddr = 0;
     Status = XV_HdmiTxSs_ComputeSubcoreAbsAddr(HdmiTxSsPtr->Config.BaseAddress,
-                                      HdmiTxSsPtr->Config.HighAddress,
-                                      HdmiTxSsPtr->Config.HdcpTimer.AddrOffset,
-                                      &AbsAddr);
+		                       HdmiTxSsPtr->Config.HighAddress,
+		                       HdmiTxSsPtr->Config.HdcpTimer.AddrOffset,
+		                       &AbsAddr);
 
     if (Status != XST_SUCCESS) {
       xil_printf("HDMITXSS ERR:: AXI Timer core base address (0x%x) \
-                                       invalid %d\r\n", AbsAddr);
+					invalid %d\r\n", AbsAddr);
       return(XST_FAILURE);
     }
 
-       /* Setup the instance */
-       memset(HdmiTxSsPtr->HdcpTimerPtr, 0, sizeof(XTmrCtr));
+	/* Setup the instance */
+	memset(HdmiTxSsPtr->HdcpTimerPtr, 0, sizeof(XTmrCtr));
 
-       /* Initialize core */
-       XTmrCtr_CfgInitialize(HdmiTxSsPtr->HdcpTimerPtr, ConfigPtr, AbsAddr);
-       Status = XTmrCtr_InitHw(HdmiTxSsPtr->HdcpTimerPtr);
+	/* Initialize core */
+	XTmrCtr_CfgInitialize(HdmiTxSsPtr->HdcpTimerPtr, ConfigPtr, AbsAddr);
+	Status = XTmrCtr_InitHw(HdmiTxSsPtr->HdcpTimerPtr);
 
-       /* Initialize the hdcp timer functions */
-       XHdcp1x_SetTimerStart(&XV_HdmiTxSs_HdcpTimerStart);
-       XHdcp1x_SetTimerStop(&XV_HdmiTxSs_HdcpTimerStop);
-       XHdcp1x_SetTimerDelay(&XV_HdmiTxSs_HdcpTimerBusyDelay);
+	/* Initialize the hdcp timer functions */
+	XHdcp1x_SetTimerStart(&XV_HdmiTxSs_HdcpTimerStart);
+	XHdcp1x_SetTimerStop(&XV_HdmiTxSs_HdcpTimerStop);
+	XHdcp1x_SetTimerDelay(&XV_HdmiTxSs_HdcpTimerBusyDelay);
 
     if (Status != XST_SUCCESS) {
       xil_printf("HDMITXSS ERR:: AXI Timer Initialization failed\r\n");
@@ -279,7 +279,7 @@ int XV_HdmiTxSs_SubcoreInitHdcp(XV_HdmiTxSs *HdmiTxSsPtr)
   XHdcp1x_Config *ConfigPtr;
 
   if (HdmiTxSsPtr->HdcpPtr){
-       /* Get core configuration */
+	/* Get core configuration */
     xdbg_printf(XDBG_DEBUG_GENERAL,"    ->Initializing HDCP core.... \r\n");
     ConfigPtr  = XHdcp1x_LookupConfig(HdmiTxSsPtr->Config.Hdcp.DeviceId);
     if (ConfigPtr == NULL){
@@ -287,38 +287,38 @@ int XV_HdmiTxSs_SubcoreInitHdcp(XV_HdmiTxSs *HdmiTxSsPtr)
       return(XST_FAILURE);
     }
 
-       /* Compute absolute base address */
+	/* Compute absolute base address */
     AbsAddr = 0;
     Status = XV_HdmiTxSs_ComputeSubcoreAbsAddr(HdmiTxSsPtr->Config.BaseAddress,
-                                      HdmiTxSsPtr->Config.HighAddress,
-                                      HdmiTxSsPtr->Config.Hdcp.AddrOffset,
-                                      &AbsAddr);
+		                       HdmiTxSsPtr->Config.HighAddress,
+		                       HdmiTxSsPtr->Config.Hdcp.AddrOffset,
+		                       &AbsAddr);
 
     if (Status != XST_SUCCESS){
       xil_printf("HDMITXSS ERR:: HDCP core base address (0x%x) invalid %d\r\n",
-               AbsAddr);
+		AbsAddr);
       return(XST_FAILURE);
     }
 
-       /* Initialize core */
+	/* Initialize core */
     void *PhyIfPtr = HdmiTxSsPtr->HdmiTxPtr;
 
     Status = XHdcp1x_CfgInitialize(HdmiTxSsPtr->HdcpPtr,
                                       ConfigPtr,
                                       PhyIfPtr,
-                                                                         AbsAddr);
+									  AbsAddr);
 
-       /* Self-test the hdcp interface */
-       if (XHdcp1x_SelfTest(HdmiTxSsPtr->HdcpPtr) != XST_SUCCESS) {
-               Status = XST_FAILURE;
-       }
+	/* Self-test the hdcp interface */
+	if (XHdcp1x_SelfTest(HdmiTxSsPtr->HdcpPtr) != XST_SUCCESS) {
+		Status = XST_FAILURE;
+	}
 
-       if (Status != XST_SUCCESS) {
+	if (Status != XST_SUCCESS) {
       xil_printf("HDMITXSS ERR:: HDCP Initialization failed\r\n");
       return(XST_FAILURE);
     }
 
-       XHdcp1x_SetKeySelect(HdmiTxSsPtr->HdcpPtr, XV_HDMITXSS_HDCP_KEYSEL);
+	XHdcp1x_SetKeySelect(HdmiTxSsPtr->HdcpPtr, XV_HDMITXSS_HDCP_KEYSEL);
   }
   return(XST_SUCCESS);
 }
diff --git a/XilinxProcessorIPLib/drivers/v_hdmitxss/src/xv_hdmitxss_coreinit.h b/XilinxProcessorIPLib/drivers/v_hdmitxss/src/xv_hdmitxss_coreinit.h
old mode 100755
new mode 100644
diff --git a/XilinxProcessorIPLib/drivers/v_hdmitxss/src/xv_hdmitxss_g.c b/XilinxProcessorIPLib/drivers/v_hdmitxss/src/xv_hdmitxss_g.c
old mode 100755
new mode 100644
index bf882ed4..7dee72be
--- a/XilinxProcessorIPLib/drivers/v_hdmitxss/src/xv_hdmitxss_g.c
+++ b/XilinxProcessorIPLib/drivers/v_hdmitxss/src/xv_hdmitxss_g.c
@@ -74,32 +74,32 @@
 
 XV_HdmiTxSs_Config XV_HdmiTxSs_ConfigTable[] =
 {
-       {
-               XPAR_V_HDMI_TX_SS_0_DEVICE_ID,
-               XPAR_V_HDMI_TX_SS_0_BASEADDR,
-               XPAR_V_HDMI_TX_SS_0_HIGHADDR,
-               XPAR_V_HDMI_TX_SS_0_INPUT_PIXELS_PER_CLOCK,
-               XPAR_V_HDMI_TX_SS_0_MAX_BITS_PER_COMPONENT,
+	{
+		XPAR_V_HDMI_TX_SS_0_DEVICE_ID,
+		XPAR_V_HDMI_TX_SS_0_BASEADDR,
+		XPAR_V_HDMI_TX_SS_0_HIGHADDR,
+		XPAR_V_HDMI_TX_SS_0_INPUT_PIXELS_PER_CLOCK,
+		XPAR_V_HDMI_TX_SS_0_MAX_BITS_PER_COMPONENT,
 
-               {
-                       XPAR_V_HDMI_TX_SS_0_AXI_TIMER_0_PRESENT,
-                       XPAR_V_HDMI_TX_SS_0_AXI_TIMER_0_DEVICE_ID,
-                       XPAR_V_HDMI_TX_SS_0_AXI_TIMER_0_BASEADDR
-               },
-               {
-                       XPAR_V_HDMI_TX_SS_0_HDCP_0_PRESENT,
-                       XPAR_V_HDMI_TX_SS_0_HDCP_0_DEVICE_ID,
-                       XPAR_V_HDMI_TX_SS_0_HDCP_0_BASEADDR
-               },
-               {
-                       XPAR_V_HDMI_TX_SS_0_V_HDMI_TX_PRESENT,
-                       XPAR_V_HDMI_TX_SS_0_V_HDMI_TX_DEVICE_ID,
-                       XPAR_V_HDMI_TX_SS_0_V_HDMI_TX_BASEADDR
-               },
-               {
-                       XPAR_V_HDMI_TX_SS_0_V_TC_PRESENT,
-                       XPAR_V_HDMI_TX_SS_0_V_TC_DEVICE_ID,
-                       XPAR_V_HDMI_TX_SS_0_V_TC_BASEADDR
-               },
-       }
+		{
+			XPAR_V_HDMI_TX_SS_0_AXI_TIMER_0_PRESENT,
+			XPAR_V_HDMI_TX_SS_0_AXI_TIMER_0_DEVICE_ID,
+			XPAR_V_HDMI_TX_SS_0_AXI_TIMER_0_BASEADDR
+		},
+		{
+			XPAR_V_HDMI_TX_SS_0_HDCP_0_PRESENT,
+			XPAR_V_HDMI_TX_SS_0_HDCP_0_DEVICE_ID,
+			XPAR_V_HDMI_TX_SS_0_HDCP_0_BASEADDR
+		},
+		{
+			XPAR_V_HDMI_TX_SS_0_V_HDMI_TX_PRESENT,
+			XPAR_V_HDMI_TX_SS_0_V_HDMI_TX_DEVICE_ID,
+			XPAR_V_HDMI_TX_SS_0_V_HDMI_TX_BASEADDR
+		},
+		{
+			XPAR_V_HDMI_TX_SS_0_V_TC_PRESENT,
+			XPAR_V_HDMI_TX_SS_0_V_TC_DEVICE_ID,
+			XPAR_V_HDMI_TX_SS_0_V_TC_BASEADDR
+		},
+	}
 };
diff --git a/XilinxProcessorIPLib/drivers/v_hdmitxss/src/xv_hdmitxss_sinit.c b/XilinxProcessorIPLib/drivers/v_hdmitxss/src/xv_hdmitxss_sinit.c
old mode 100755
new mode 100644