[igt-dev] [PATCH i-g-t 1/3] lib: Move common gpgpu/media functions to gpu_fill library

Katarzyna Dec katarzyna.dec at intel.com
Wed Apr 4 13:20:03 UTC 2018


On Wed, Mar 28, 2018 at 03:17:55PM +0100, Szwichtenberg, Radoslaw wrote:
> On Tue, 2018-03-27 at 15:36 +0200, Katarzyna Dec wrote:
> > Gpgpu_fill and media_fill libraries are very similar and many
> > functions can be shared. I have created library gpu_fill with
> > all functions needed for implementing gpgpu_fill and media_fill
> > tests for all Gens. Duplicates, e.g. where only name was changed,
> > were removed. The earliest common function remained.
> > 
> 
> > -static void
> > -gen8_emit_state_base_address(struct intel_batchbuffer *batch)
> > -{
> > -	OUT_BATCH(GEN8_STATE_BASE_ADDRESS | (16 - 2));
> > -
> > -	/* general */
> > -	OUT_BATCH(0 | (0x78 << 4) | (0 << 1) |  BASE_ADDRESS_MODIFY);
> > -	OUT_BATCH(0);
> > -
> Why did you choose 
> > +	OUT_BATCH(0 | BASE_ADDRESS_MODIFY);
> 
> and not the one above? Does it make any difference which is used?
> 
> Radek
>
During refactoring code I have found documentation inaccuracy.
There were 2 very similar functions for media and gpgpu, where the one
for gpgpu was configured like it would be using indirect state (while
we are using CURBE). I have checked if media fill version
(OUT_BATCH(0 | BASE_ADDRESS_MODIFY)) works fine on gpgpu gen8 and
I have decided to unify them.
I forgot to mention that in commit msg, but I will in the next version.

Kasia


More information about the igt-dev mailing list