summaryrefslogtreecommitdiff
path: root/src/i965_gpe_utils.h
Commit message (Collapse)AuthorAgeFilesLines
* Add GPE function for MI_COPY_MEM_MEM commandXiang, Haihao2018-01-291-0/+11
| | | | | | | | | | This function is used to reads 4 bytes from memory and stores the value of that 4 bytes to back to memory, both source and destination addresses are Per Process Graphics Address It is a helper function for low power encoding support Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
* change prefix of function name from gen9 to i965 in gpe utilsWang Tiatian2017-09-221-4/+4
| | | | Signed-off-by: Wang Tiatian <tiantian.wang@intel.com>
* Unify the coding style in the driverXiang, Haihao2017-04-071-128/+105
| | | | | | | | | | | | | | | Linux coding style is used in the driver source code. Use the command below to format/indent .c/.h files $> astyle --style=linux -cnpUH -s4 -M120 <file> A script of style_unify is added in the top-level directory to handle all .c/.h files in the driver. There is no change to any functionality This fixes https://github.com/01org/intel-vaapi-driver/issues/99 Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
* ENC: move gpe related function into src/i965_gpe_utils.h/cPengfei Qu2017-03-021-0/+76
| | | | | | | | | | | | | | | | | v1: add align version for obj surface conversion to gpe surface remove comments and enum value v2: use intel->media_mocs to configure the memory property v3: add maro definition for AVC status/ctl register Fixes #43 Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com> Reviewed-by: Sean V Kelley<seanvk@posteo.de>
* Revert "ENC: move gpe related function into src/i965_gpe_utils.h/c"Sean V Kelley2017-01-171-87/+0
| | | | This reverts commit e1783804bcb35385ffabaeeeb8b4cc3c03d513e0.
* ENC: move gpe related function into src/i965_gpe_utils.h/cPengfei Qu2017-01-101-0/+87
| | | | | Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
* Add a function table for used GPE functionsXiang, Haihao2016-11-301-1/+91
| | | | | | | | It is useful for sharing GPE based code between different platforms Currently it is available on GEN8+ Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
* Rename gen9_gpe_mi_load_register_xxx() to gen8_gpe_mi_load_register_xxx()Xiang, Haihao2016-11-301-3/+3
| | | | | | xxx is mem/imm/reg and the 3 functions can be used for GEN8 too Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
* Add a new gpe function gen8_gpe_pipe_control() for GEN8Xiang, Haihao2016-11-181-0/+19
| | | | | Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
* Add a new gpe function gen8_gpe_mi_conditional_batch_buffer_end() for GEN8Xiang, Haihao2016-11-181-0/+5
| | | | | Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
* Add a new gpe function gen8_gpe_context_add_surface() to set surface state ↵Xiang, Haihao2016-11-181-0/+5
| | | | | | | | | on GEN8 v2: Add support for override_offset, clean up the code for 2D surface. Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
* Add a new gpe function gen8_gpe_reset_binding_table() to reset binging tableXiang, Haihao2016-11-181-0/+2
| | | | | Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
* Rename gen9_gpe_mi_store_register_mem() to gen8_gpe_mi_store_register_mem()Xiang, Haihao2016-11-181-1/+1
| | | | | | | | | | | This function can be used on GEN8 too v2: rebased v3: Fix commit log Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
* Rename gen9_gpe_mi_flush_dw() to gen8_gpe_mi_flush_dw()Xiang, Haihao2016-11-181-1/+1
| | | | | | | This function can be used on GEN8 too Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
* Rename gen9_gpe_mi_store_data_imm() to gen8_gpe_mi_store_data_imm()Xiang, Haihao2016-11-181-1/+1
| | | | | | | This function can be used on GEN8 too Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
* Rename gen9_gpe_mi_batch_buffer_start() to gen8_gpe_mi_batch_buffer_start()Xiang, Haihao2016-11-181-1/+1
| | | | | | | This function can be used on GEN8 too Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
* Rename gen9_gpe_media_object_walker() to gen8_gpe_media_object_walker()Xiang, Haihao2016-11-181-1/+1
| | | | | | | This function can be used on GEN8 too Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
* Rename i965_gpe_dri_object_to_2d_gpe_resource() to ↵Xiang, Haihao2016-11-181-5/+5
| | | | | | | | | i965_dri_object_to_2d_gpe_resource() Like as i965_dri_object_to_buffer_gpe_resource(), use i965_ instead of i965_gpe_ as prefix Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
* Rename gen8p_gpe_context_map_curbe()/gen8p_gpe_context_unmap_curbe() to ↵Xiang, Haihao2016-11-181-2/+2
| | | | | | | | | | i965_gpe_context_map_curbe()/i965_gpe_context_unmap_curbe() gpe_context->curbe.bo always points to the curbe buffer now, and the two functions can be used on all platforms Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
* Move sampler state related settings to the inner structure in i965_gpe_contextXiang, Haihao2016-11-181-4/+7
| | | | | | | | | | User can set sampler entry size and the number of sampler entries now. sampler.bo is always set even if the sampler state is a part of the dynamic state buffer, hence we can use the corresponding settings no matter sampler state is a part of the dynamic state buffer or not. Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
* Move interface descriptor remapping table related settings to the inner ↵Xiang, Haihao2016-11-181-2/+1
| | | | | | | | | | | | structure in i965_gpe_context This patch delete idrt_size and use (idrt.max_entries * idrt.entry_size) instead. idrt.bo is always set even if the interface descriptor remapping table is a part of the dynamic state buffer, hence we can use the corresponding settings no matter this table is a part of the dynamic state buffer or not. Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
* Move all curbe related settings to the inner structure in i965_gpe_contextXiang, Haihao2016-11-181-2/+1
| | | | | | | | | | To avoid confusion between curbe.length and curbe_size, this patch uses curbe.length only. curbe.bo is always set even if curbe is a part of the dynamic state buffer, hence we can use curbe related settings no matter it is a part of the dynamic state buffer or not. Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
* Initialize one 10bit-scaling gpe_context for Gen9Zhao Yakui2016-11-171-1/+3
| | | | | | | | | | | | | | | | V1->V2: Add the conv_p010.g9b shader into the dist list V3: remove the compiler warnings gen9_vme.c: In function 'gen9_intel_init_hevc_surface': gen9_vme.c:1836:9: warning: implicit declaration of function 'i965_image_processing' [-Wimplicit-function-declaration] i965_render.c: In function 'intel_render_put_surface': i965_render.c:3079:5: warning: implicit declaration of function 'i965_post_processing' [-Wimplicit-function-declaration] Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
* Add one API to initialize MEDIA_OBJECT_WALKER parameter for video ↵Zhao Yakui2016-11-171-0/+14
| | | | | | | | post-processing Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Reviewed-by: Xiang, Haihao<haihao.xiang@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
* Add the 10-bit flag for MEDIA_BLOCK_RW operation on P010 surfaceZhao Yakui2016-11-171-0/+1
| | | | | | | V1->V2: Use the is_16bpp instead of is_10bit Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
* Add the write_enabled flag of GPE media surface statepeng.chen2016-08-241-5/+10
| | | | | | Fix this issue: https://bugs.freedesktop.org/show_bug.cgi?id=94607 Signed-off-by: peng.chen <peng.c.chen@intel.com>
* Add some utility functions for i965_gpe_resourcesZhao Yakui2016-05-271-0/+115
| | | | | | | This is to add the wrapper function required by vp9 encoding. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Reviewed-by: Sean V Kelley <sean.v.kelley@intel.com>
* Use the buffer allocated externally to configure dynamic state for ↵Zhao Yakui2016-05-261-0/+13
| | | | | | | gpe_context on Gen8+ Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Reviewed-by: Sean V Kelley <sean.v.kelley@intel.com>
* Add some utility functions for MI commands for GEN9Xiang, Haihao2016-05-091-0/+102
| | | | | Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Reviewed-By: Sean V Kelley <sean.v.kelley@intel.com>
* Add 'struct i965_gpe_resource' and related utility functionsXiang, Haihao2016-05-091-0/+44
| | | | | Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Reviewed-By: Sean V Kelley <sean.v.kelley@intel.com>
* Media/SKL: Follow the spec to add the FORCE_MEDIA_AWAKE for media pipelineZhao Yakui2014-12-141-0/+5
| | | | | Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> (cherry picked from commit 1927da361bd529405340ca042df3ff9d4e5bb3e7)
* Media/Skl: Add the gen9_gpe_pipeline_setup to configure the media pipelineZhao Yakui2014-12-141-0/+4
| | | | | | | | As some media commands related with media pipeline are updated for SKL, one new function is used to config the media pipeline on SKL. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> (cherry picked from commit 4f895ea354ddc1717c1a6a9d905f5a02ac4287b7)
* Follow the spec to make BDW encoding media pipeline command support 48-bit ↵Zhao Yakui2014-02-271-0/+33
| | | | | | addressing mode Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
* Update the BDW surface/sampler state and media command for encoding/decodingZhao Yakui2014-02-271-0/+25
| | | | Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
* MEDIA_OBJECT uses hardware scoreboard during VME prediction on HaswellZhao Yakui2013-01-171-0/+41
| | | | | | | | | To get the precise VME prediction the current macroblock will depend on its neighbour mb(left, top, up-right). So the hardware scoreboard is used when submitting the MEDIA_OBJECT command. This is to do the preparation of adding MV prediction in VME prediction. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
* Config the media chroma surface in the binding table for HaswellZhao Yakui2012-10-231-0/+5
| | | | Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
* Cleanup VMEXiang, Haihao2012-02-291-0/+118
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>