[Intel-gfx] gem clflush optimization for media encoding

Zou, Nanhai nanhai.zou at intel.com
Wed Jun 22 05:13:09 CEST 2011


Hi,
	I have some questions about clflush usage in gem.

	For our encoding driver, each frame's input is raw YUV data, copy from CPU to GPU surface, output is encoded result, copy from GPU to CPU.

	The buffers are huge, for 1080p file, input buffer size could be 
1920x1080x1.5, a lot of CPU time is used in clflush.  I am trying to optimize that.

Question 1:
	If I  upload input buffer with movnti or movntdq (bypass cache) + sfence(clear write combine buffer) in the end, clflush should not be needed.
	How can I tell gem not to clflush the buffer in this case, do we need add an interface to do that?

Question2:
	How can I make sure output buffer will never be clflushed?
	Since it is CPU read only surface, clflush in not needed at all.

Thanks
Zou Nanhai



More information about the Intel-gfx mailing list