lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202006180815.uFac09PJ%lkp@intel.com>
Date:   Thu, 18 Jun 2020 08:43:18 +0800
From:   kernel test robot <lkp@...el.com>
To:     Leo Liu <leo.liu@....com>
Cc:     kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
        linux-kernel@...r.kernel.org,
        Alex Deucher <alexander.deucher@....com>
Subject: drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:442:6: warning: no previous
 prototype for function 'jpeg_v2_0_dec_ring_insert_start'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1b5044021070efa3259f3e9548dc35d1eb6aa844
commit: 6ac27241106bc946bd50032f4cd96899c6a6fe69 drm/amdgpu: add JPEG v2.0 function supports
date:   7 months ago
config: s390-randconfig-r004-20200617 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 487ca07fcc75d52755c9fe2ee05bcb3b6eeeec44)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install s390 cross compiling tool for clang build
        # apt-get install binutils-s390-linux-gnu
        git checkout 6ac27241106bc946bd50032f4cd96899c6a6fe69
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_mode.h:33:
In file included from include/drm/drm_crtc.h:31:
In file included from include/linux/fb.h:17:
In file included from arch/s390/include/asm/io.h:76:
include/asm-generic/io.h:492:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:118:21: note: expanded from macro '__swab32'
___constant_swab32(x) :                                               ^
include/uapi/linux/swab.h:19:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x0000ff00UL) <<  8) |                                 ^
In file included from drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:24:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:57:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_mode.h:33:
In file included from include/drm/drm_crtc.h:31:
In file included from include/linux/fb.h:17:
In file included from arch/s390/include/asm/io.h:76:
include/asm-generic/io.h:492:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:118:21: note: expanded from macro '__swab32'
___constant_swab32(x) :                                               ^
include/uapi/linux/swab.h:20:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >>  8) |                                 ^
In file included from drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:24:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:57:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_mode.h:33:
In file included from include/drm/drm_crtc.h:31:
In file included from include/linux/fb.h:17:
In file included from arch/s390/include/asm/io.h:76:
include/asm-generic/io.h:492:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:118:21: note: expanded from macro '__swab32'
___constant_swab32(x) :                                               ^
include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:24:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:57:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_mode.h:33:
In file included from include/drm/drm_crtc.h:31:
In file included from include/linux/fb.h:17:
In file included from arch/s390/include/asm/io.h:76:
include/asm-generic/io.h:492:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:24:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:57:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_mode.h:33:
In file included from include/drm/drm_crtc.h:31:
In file included from include/linux/fb.h:17:
In file included from arch/s390/include/asm/io.h:76:
include/asm-generic/io.h:503:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:513:46: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew(cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:523:46: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel(cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:585:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:593:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:601:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:610:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:619:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:628:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
>> drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:442:6: warning: no previous prototype for function 'jpeg_v2_0_dec_ring_insert_start' [-Wmissing-prototypes]
void jpeg_v2_0_dec_ring_insert_start(struct amdgpu_ring *ring)
^
drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:442:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void jpeg_v2_0_dec_ring_insert_start(struct amdgpu_ring *ring)
^
static
>> drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:460:6: warning: no previous prototype for function 'jpeg_v2_0_dec_ring_insert_end' [-Wmissing-prototypes]
void jpeg_v2_0_dec_ring_insert_end(struct amdgpu_ring *ring)
^
drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:460:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void jpeg_v2_0_dec_ring_insert_end(struct amdgpu_ring *ring)
^
static
>> drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:479:6: warning: no previous prototype for function 'jpeg_v2_0_dec_ring_emit_fence' [-Wmissing-prototypes]
void jpeg_v2_0_dec_ring_emit_fence(struct amdgpu_ring *ring, u64 addr, u64 seq,
^
drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:479:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void jpeg_v2_0_dec_ring_emit_fence(struct amdgpu_ring *ring, u64 addr, u64 seq,
^
static
>> drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:528:6: warning: no previous prototype for function 'jpeg_v2_0_dec_ring_emit_ib' [-Wmissing-prototypes]
void jpeg_v2_0_dec_ring_emit_ib(struct amdgpu_ring *ring,
^
drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:528:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void jpeg_v2_0_dec_ring_emit_ib(struct amdgpu_ring *ring,
^
static
>> drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:579:6: warning: no previous prototype for function 'jpeg_v2_0_dec_ring_emit_reg_wait' [-Wmissing-prototypes]
void jpeg_v2_0_dec_ring_emit_reg_wait(struct amdgpu_ring *ring, uint32_t reg,
^
drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:579:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void jpeg_v2_0_dec_ring_emit_reg_wait(struct amdgpu_ring *ring, uint32_t reg,
^
static
>> drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:606:6: warning: no previous prototype for function 'jpeg_v2_0_dec_ring_emit_vm_flush' [-Wmissing-prototypes]
void jpeg_v2_0_dec_ring_emit_vm_flush(struct amdgpu_ring *ring,
^
drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:606:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void jpeg_v2_0_dec_ring_emit_vm_flush(struct amdgpu_ring *ring,
^
static
>> drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:621:6: warning: no previous prototype for function 'jpeg_v2_0_dec_ring_emit_wreg' [-Wmissing-prototypes]
void jpeg_v2_0_dec_ring_emit_wreg(struct amdgpu_ring *ring, uint32_t reg, uint32_t val)
^
drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:621:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void jpeg_v2_0_dec_ring_emit_wreg(struct amdgpu_ring *ring, uint32_t reg, uint32_t val)
^
static
>> drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:639:6: warning: no previous prototype for function 'jpeg_v2_0_dec_ring_nop' [-Wmissing-prototypes]
void jpeg_v2_0_dec_ring_nop(struct amdgpu_ring *ring, uint32_t count)
^
drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:639:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void jpeg_v2_0_dec_ring_nop(struct amdgpu_ring *ring, uint32_t count)
^
static
28 warnings generated.

vim +/jpeg_v2_0_dec_ring_insert_start +442 drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c

   434	
   435	/**
   436	 * jpeg_v2_0_dec_ring_insert_start - insert a start command
   437	 *
   438	 * @ring: amdgpu_ring pointer
   439	 *
   440	 * Write a start command to the ring.
   441	 */
 > 442	void jpeg_v2_0_dec_ring_insert_start(struct amdgpu_ring *ring)
   443	{
   444		amdgpu_ring_write(ring, PACKETJ(mmUVD_JRBC_EXTERNAL_REG_INTERNAL_OFFSET,
   445			0, 0, PACKETJ_TYPE0));
   446		amdgpu_ring_write(ring, 0x68e04);
   447	
   448		amdgpu_ring_write(ring, PACKETJ(JRBC_DEC_EXTERNAL_REG_WRITE_ADDR,
   449			0, 0, PACKETJ_TYPE0));
   450		amdgpu_ring_write(ring, 0x80010000);
   451	}
   452	
   453	/**
   454	 * jpeg_v2_0_dec_ring_insert_end - insert a end command
   455	 *
   456	 * @ring: amdgpu_ring pointer
   457	 *
   458	 * Write a end command to the ring.
   459	 */
 > 460	void jpeg_v2_0_dec_ring_insert_end(struct amdgpu_ring *ring)
   461	{
   462		amdgpu_ring_write(ring, PACKETJ(mmUVD_JRBC_EXTERNAL_REG_INTERNAL_OFFSET,
   463			0, 0, PACKETJ_TYPE0));
   464		amdgpu_ring_write(ring, 0x68e04);
   465	
   466		amdgpu_ring_write(ring, PACKETJ(JRBC_DEC_EXTERNAL_REG_WRITE_ADDR,
   467			0, 0, PACKETJ_TYPE0));
   468		amdgpu_ring_write(ring, 0x00010000);
   469	}
   470	
   471	/**
   472	 * jpeg_v2_0_dec_ring_emit_fence - emit an fence & trap command
   473	 *
   474	 * @ring: amdgpu_ring pointer
   475	 * @fence: fence to emit
   476	 *
   477	 * Write a fence and a trap command to the ring.
   478	 */
 > 479	void jpeg_v2_0_dec_ring_emit_fence(struct amdgpu_ring *ring, u64 addr, u64 seq,
   480					unsigned flags)
   481	{
   482		WARN_ON(flags & AMDGPU_FENCE_FLAG_64BIT);
   483	
   484		amdgpu_ring_write(ring, PACKETJ(mmUVD_JPEG_GPCOM_DATA0_INTERNAL_OFFSET,
   485			0, 0, PACKETJ_TYPE0));
   486		amdgpu_ring_write(ring, seq);
   487	
   488		amdgpu_ring_write(ring,	PACKETJ(mmUVD_JPEG_GPCOM_DATA1_INTERNAL_OFFSET,
   489			0, 0, PACKETJ_TYPE0));
   490		amdgpu_ring_write(ring, seq);
   491	
   492		amdgpu_ring_write(ring,	PACKETJ(mmUVD_LMI_JRBC_RB_MEM_WR_64BIT_BAR_LOW_INTERNAL_OFFSET,
   493			0, 0, PACKETJ_TYPE0));
   494		amdgpu_ring_write(ring, lower_32_bits(addr));
   495	
   496		amdgpu_ring_write(ring,	PACKETJ(mmUVD_LMI_JRBC_RB_MEM_WR_64BIT_BAR_HIGH_INTERNAL_OFFSET,
   497			0, 0, PACKETJ_TYPE0));
   498		amdgpu_ring_write(ring, upper_32_bits(addr));
   499	
   500		amdgpu_ring_write(ring,	PACKETJ(mmUVD_JPEG_GPCOM_CMD_INTERNAL_OFFSET,
   501			0, 0, PACKETJ_TYPE0));
   502		amdgpu_ring_write(ring, 0x8);
   503	
   504		amdgpu_ring_write(ring,	PACKETJ(mmUVD_JPEG_GPCOM_CMD_INTERNAL_OFFSET,
   505			0, PACKETJ_CONDITION_CHECK0, PACKETJ_TYPE4));
   506		amdgpu_ring_write(ring, 0);
   507	
   508		amdgpu_ring_write(ring,	PACKETJ(mmUVD_JRBC_EXTERNAL_REG_INTERNAL_OFFSET,
   509			0, 0, PACKETJ_TYPE0));
   510		amdgpu_ring_write(ring, 0x3fbc);
   511	
   512		amdgpu_ring_write(ring, PACKETJ(JRBC_DEC_EXTERNAL_REG_WRITE_ADDR,
   513			0, 0, PACKETJ_TYPE0));
   514		amdgpu_ring_write(ring, 0x1);
   515	
   516		amdgpu_ring_write(ring, PACKETJ(0, 0, 0, PACKETJ_TYPE7));
   517		amdgpu_ring_write(ring, 0);
   518	}
   519	
   520	/**
   521	 * jpeg_v2_0_dec_ring_emit_ib - execute indirect buffer
   522	 *
   523	 * @ring: amdgpu_ring pointer
   524	 * @ib: indirect buffer to execute
   525	 *
   526	 * Write ring commands to execute the indirect buffer.
   527	 */
 > 528	void jpeg_v2_0_dec_ring_emit_ib(struct amdgpu_ring *ring,
   529					struct amdgpu_job *job,
   530					struct amdgpu_ib *ib,
   531					uint32_t flags)
   532	{
   533		unsigned vmid = AMDGPU_JOB_GET_VMID(job);
   534	
   535		amdgpu_ring_write(ring, PACKETJ(mmUVD_LMI_JRBC_IB_VMID_INTERNAL_OFFSET,
   536			0, 0, PACKETJ_TYPE0));
   537		amdgpu_ring_write(ring, (vmid | (vmid << 4)));
   538	
   539		amdgpu_ring_write(ring, PACKETJ(mmUVD_LMI_JPEG_VMID_INTERNAL_OFFSET,
   540			0, 0, PACKETJ_TYPE0));
   541		amdgpu_ring_write(ring, (vmid | (vmid << 4)));
   542	
   543		amdgpu_ring_write(ring,	PACKETJ(mmUVD_LMI_JRBC_IB_64BIT_BAR_LOW_INTERNAL_OFFSET,
   544			0, 0, PACKETJ_TYPE0));
   545		amdgpu_ring_write(ring, lower_32_bits(ib->gpu_addr));
   546	
   547		amdgpu_ring_write(ring,	PACKETJ(mmUVD_LMI_JRBC_IB_64BIT_BAR_HIGH_INTERNAL_OFFSET,
   548			0, 0, PACKETJ_TYPE0));
   549		amdgpu_ring_write(ring, upper_32_bits(ib->gpu_addr));
   550	
   551		amdgpu_ring_write(ring,	PACKETJ(mmUVD_JRBC_IB_SIZE_INTERNAL_OFFSET,
   552			0, 0, PACKETJ_TYPE0));
   553		amdgpu_ring_write(ring, ib->length_dw);
   554	
   555		amdgpu_ring_write(ring,	PACKETJ(mmUVD_LMI_JRBC_RB_MEM_RD_64BIT_BAR_LOW_INTERNAL_OFFSET,
   556			0, 0, PACKETJ_TYPE0));
   557		amdgpu_ring_write(ring, lower_32_bits(ring->gpu_addr));
   558	
   559		amdgpu_ring_write(ring,	PACKETJ(mmUVD_LMI_JRBC_RB_MEM_RD_64BIT_BAR_HIGH_INTERNAL_OFFSET,
   560			0, 0, PACKETJ_TYPE0));
   561		amdgpu_ring_write(ring, upper_32_bits(ring->gpu_addr));
   562	
   563		amdgpu_ring_write(ring,	PACKETJ(0, 0, PACKETJ_CONDITION_CHECK0, PACKETJ_TYPE2));
   564		amdgpu_ring_write(ring, 0);
   565	
   566		amdgpu_ring_write(ring,	PACKETJ(mmUVD_JRBC_RB_COND_RD_TIMER_INTERNAL_OFFSET,
   567			0, 0, PACKETJ_TYPE0));
   568		amdgpu_ring_write(ring, 0x01400200);
   569	
   570		amdgpu_ring_write(ring, PACKETJ(mmUVD_JRBC_RB_REF_DATA_INTERNAL_OFFSET,
   571			0, 0, PACKETJ_TYPE0));
   572		amdgpu_ring_write(ring, 0x2);
   573	
   574		amdgpu_ring_write(ring,	PACKETJ(mmUVD_JRBC_STATUS_INTERNAL_OFFSET,
   575			0, PACKETJ_CONDITION_CHECK3, PACKETJ_TYPE3));
   576		amdgpu_ring_write(ring, 0x2);
   577	}
   578	
 > 579	void jpeg_v2_0_dec_ring_emit_reg_wait(struct amdgpu_ring *ring, uint32_t reg,
   580					uint32_t val, uint32_t mask)
   581	{
   582		uint32_t reg_offset = (reg << 2);
   583	
   584		amdgpu_ring_write(ring, PACKETJ(mmUVD_JRBC_RB_COND_RD_TIMER_INTERNAL_OFFSET,
   585			0, 0, PACKETJ_TYPE0));
   586		amdgpu_ring_write(ring, 0x01400200);
   587	
   588		amdgpu_ring_write(ring,	PACKETJ(mmUVD_JRBC_RB_REF_DATA_INTERNAL_OFFSET,
   589			0, 0, PACKETJ_TYPE0));
   590		amdgpu_ring_write(ring, val);
   591	
   592		amdgpu_ring_write(ring, PACKETJ(mmUVD_JRBC_EXTERNAL_REG_INTERNAL_OFFSET,
   593			0, 0, PACKETJ_TYPE0));
   594		if (reg_offset >= 0x10000 && reg_offset <= 0x105ff) {
   595			amdgpu_ring_write(ring, 0);
   596			amdgpu_ring_write(ring,
   597				PACKETJ((reg_offset >> 2), 0, 0, PACKETJ_TYPE3));
   598		} else {
   599			amdgpu_ring_write(ring, reg_offset);
   600			amdgpu_ring_write(ring,	PACKETJ(JRBC_DEC_EXTERNAL_REG_WRITE_ADDR,
   601				0, 0, PACKETJ_TYPE3));
   602		}
   603		amdgpu_ring_write(ring, mask);
   604	}
   605	
 > 606	void jpeg_v2_0_dec_ring_emit_vm_flush(struct amdgpu_ring *ring,
   607					unsigned vmid, uint64_t pd_addr)
   608	{
   609		struct amdgpu_vmhub *hub = &ring->adev->vmhub[ring->funcs->vmhub];
   610		uint32_t data0, data1, mask;
   611	
   612		pd_addr = amdgpu_gmc_emit_flush_gpu_tlb(ring, vmid, pd_addr);
   613	
   614		/* wait for register write */
   615		data0 = hub->ctx0_ptb_addr_lo32 + vmid * 2;
   616		data1 = lower_32_bits(pd_addr);
   617		mask = 0xffffffff;
   618		jpeg_v2_0_dec_ring_emit_reg_wait(ring, data0, data1, mask);
   619	}
   620	
 > 621	void jpeg_v2_0_dec_ring_emit_wreg(struct amdgpu_ring *ring, uint32_t reg, uint32_t val)
   622	{
   623		uint32_t reg_offset = (reg << 2);
   624	
   625		amdgpu_ring_write(ring,	PACKETJ(mmUVD_JRBC_EXTERNAL_REG_INTERNAL_OFFSET,
   626			0, 0, PACKETJ_TYPE0));
   627		if (reg_offset >= 0x10000 && reg_offset <= 0x105ff) {
   628			amdgpu_ring_write(ring, 0);
   629			amdgpu_ring_write(ring,
   630				PACKETJ((reg_offset >> 2), 0, 0, PACKETJ_TYPE0));
   631		} else {
   632			amdgpu_ring_write(ring, reg_offset);
   633			amdgpu_ring_write(ring,	PACKETJ(JRBC_DEC_EXTERNAL_REG_WRITE_ADDR,
   634				0, 0, PACKETJ_TYPE0));
   635		}
   636		amdgpu_ring_write(ring, val);
   637	}
   638	
 > 639	void jpeg_v2_0_dec_ring_nop(struct amdgpu_ring *ring, uint32_t count)
   640	{
   641		int i;
   642	
   643		WARN_ON(ring->wptr % 2 || count % 2);
   644	
   645		for (i = 0; i < count / 2; i++) {
   646			amdgpu_ring_write(ring, PACKETJ(0, 0, 0, PACKETJ_TYPE6));
   647			amdgpu_ring_write(ring, 0);
   648		}
   649	}
   650	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (25591 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ