17ec681f3Smrg# Copyright © 2019 Google, Inc 27ec681f3Smrg 37ec681f3Smrg# Permission is hereby granted, free of charge, to any person obtaining a copy 47ec681f3Smrg# of this software and associated documentation files (the "Software"), to deal 57ec681f3Smrg# in the Software without restriction, including without limitation the rights 67ec681f3Smrg# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 77ec681f3Smrg# copies of the Software, and to permit persons to whom the Software is 87ec681f3Smrg# furnished to do so, subject to the following conditions: 97ec681f3Smrg 107ec681f3Smrg# The above copyright notice and this permission notice shall be included in 117ec681f3Smrg# all copies or substantial portions of the Software. 127ec681f3Smrg 137ec681f3Smrg# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 147ec681f3Smrg# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 157ec681f3Smrg# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 167ec681f3Smrg# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 177ec681f3Smrg# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 187ec681f3Smrg# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 197ec681f3Smrg# SOFTWARE. 207ec681f3Smrg 217ec681f3Smrgxml_files = [ 227ec681f3Smrg 'a2xx.xml', 237ec681f3Smrg 'a3xx.xml', 247ec681f3Smrg 'a4xx.xml', 257ec681f3Smrg 'a5xx.xml', 267ec681f3Smrg 'a6xx.xml', 277ec681f3Smrg 'a6xx_gmu.xml', 287ec681f3Smrg 'ocmem.xml', 297ec681f3Smrg 'adreno_control_regs.xml', 307ec681f3Smrg 'adreno_pipe_regs.xml', 317ec681f3Smrg 'adreno_common.xml', 327ec681f3Smrg 'adreno_pm4.xml', 337ec681f3Smrg] 347ec681f3Smrg 357ec681f3Smrgforeach f : xml_files 367ec681f3Smrg _name = f + '.h' 377ec681f3Smrg freedreno_xml_header_files += custom_target( 387ec681f3Smrg _name, 397ec681f3Smrg input: [gen_header_py, f], 407ec681f3Smrg output: _name, 417ec681f3Smrg command: [prog_python, '@INPUT0@', rnn_src_path, '@INPUT1@'], 427ec681f3Smrg capture: true, 437ec681f3Smrg ) 447ec681f3Smrg _gzname = f + '.gz' 457ec681f3Smrg custom_target( 467ec681f3Smrg _gzname, 477ec681f3Smrg input: f, 487ec681f3Smrg output: _gzname, 497ec681f3Smrg command: [prog_gzip, '-kc', '@INPUT@'], 507ec681f3Smrg capture: true, 517ec681f3Smrg install_dir: rnn_install_path + '/adreno', 527ec681f3Smrg install: install_fd_decode_tools, 537ec681f3Smrg build_by_default: install_fd_decode_tools, 547ec681f3Smrg ) 557ec681f3Smrgendforeach 567ec681f3Smrg 577ec681f3Smrgfreedreno_xml_header_files += custom_target( 587ec681f3Smrg 'a6xx-pack.xml.h', 597ec681f3Smrg input: [gen_header_py, 'a6xx.xml'], 607ec681f3Smrg output: 'a6xx-pack.xml.h', 617ec681f3Smrg command: [prog_python, '@INPUT0@', rnn_src_path, '@INPUT1@', '--pack-structs'], 627ec681f3Smrg capture: true, 637ec681f3Smrg) 647ec681f3Smrg 657ec681f3Smrgfreedreno_xml_header_files += custom_target( 667ec681f3Smrg 'adreno-pm4-pack.xml.h', 677ec681f3Smrg input: [gen_header_py, 'adreno_pm4.xml'], 687ec681f3Smrg output: 'adreno-pm4-pack.xml.h', 697ec681f3Smrg command: [prog_python, '@INPUT0@', rnn_src_path, '@INPUT1@', '--pack-structs'], 707ec681f3Smrg capture: true, 717ec681f3Smrg) 72