Searched refs:shader (Results 1 - 39 of 39) sorted by relevance

/linux-4.4.14/drivers/gpu/drm/vmwgfx/
H A Dvmwgfx_shader.c43 struct vmw_shader shader; member in struct:vmw_user_shader
164 struct vmw_shader *shader = vmw_res_to_shader(res); vmw_gb_shader_init() local
183 shader->size = size; vmw_gb_shader_init()
184 shader->type = type; vmw_gb_shader_init()
185 shader->num_input_sig = num_input_sig; vmw_gb_shader_init()
186 shader->num_output_sig = num_output_sig; vmw_gb_shader_init()
193 * GB shader code:
199 struct vmw_shader *shader = vmw_res_to_shader(res); vmw_gb_shader_create() local
211 DRM_ERROR("Failed to allocate a shader id.\n"); vmw_gb_shader_create()
222 DRM_ERROR("Failed reserving FIFO space for shader " vmw_gb_shader_create()
231 cmd->body.type = shader->type; vmw_gb_shader_create()
232 cmd->body.sizeInBytes = shader->size; vmw_gb_shader_create()
258 DRM_ERROR("Failed reserving FIFO space for shader " vmw_gb_shader_bind()
289 DRM_ERROR("Failed reserving FIFO space for shader " vmw_gb_shader_unbind()
332 DRM_ERROR("Failed reserving FIFO space for shader " vmw_gb_shader_destroy()
350 * DX shader code:
354 * vmw_dx_shader_commit_notify - Notify that a shader operation has been
357 * @res: Pointer to the shader resource.
364 struct vmw_dx_shader *shader = vmw_res_to_dx_shader(res); vmw_dx_shader_commit_notify() local
369 vmw_cotable_add_resource(shader->cotable, vmw_dx_shader_commit_notify()
370 &shader->cotable_head); vmw_dx_shader_commit_notify()
371 shader->committed = true; vmw_dx_shader_commit_notify()
372 res->id = shader->id; vmw_dx_shader_commit_notify()
376 list_del_init(&shader->cotable_head); vmw_dx_shader_commit_notify()
377 shader->committed = false; vmw_dx_shader_commit_notify()
384 * vmw_dx_shader_unscrub - Have the device reattach a MOB to a DX shader.
386 * @res: The shader resource
392 struct vmw_dx_shader *shader = vmw_res_to_dx_shader(res); vmw_dx_shader_unscrub() local
399 if (!list_empty(&shader->cotable_head) || !shader->committed) vmw_dx_shader_unscrub()
403 shader->ctx->id); vmw_dx_shader_unscrub()
405 DRM_ERROR("Failed reserving FIFO space for shader " vmw_dx_shader_unscrub()
412 cmd->body.cid = shader->ctx->id; vmw_dx_shader_unscrub()
413 cmd->body.shid = shader->id; vmw_dx_shader_unscrub()
418 vmw_cotable_add_resource(shader->cotable, &shader->cotable_head); vmw_dx_shader_unscrub()
424 * vmw_dx_shader_create - The DX shader create callback
426 * @res: The DX shader resource
429 * makes sure that we unscrub the shader if it's previously been scrubbed.
434 struct vmw_dx_shader *shader = vmw_res_to_dx_shader(res); vmw_dx_shader_create() local
437 WARN_ON_ONCE(!shader->committed); vmw_dx_shader_create()
445 res->id = shader->id; vmw_dx_shader_create()
450 * vmw_dx_shader_bind - The DX shader bind callback
452 * @res: The DX shader resource
471 * vmw_dx_shader_scrub - Have the device unbind a MOB from a DX shader.
473 * @res: The shader resource
475 * This function unbinds a MOB from the DX shader without requiring the
482 struct vmw_dx_shader *shader = vmw_res_to_dx_shader(res); vmw_dx_shader_scrub() local
489 if (list_empty(&shader->cotable_head)) vmw_dx_shader_scrub()
492 WARN_ON_ONCE(!shader->committed); vmw_dx_shader_scrub()
495 DRM_ERROR("Failed reserving FIFO space for shader " vmw_dx_shader_scrub()
502 cmd->body.cid = shader->ctx->id; vmw_dx_shader_scrub()
508 list_del_init(&shader->cotable_head); vmw_dx_shader_scrub()
514 * vmw_dx_shader_unbind - The dx shader unbind callback.
516 * @res: The shader resource
555 * Scrubs all shader MOBs so that any subsequent shader unbind or shader
574 * vmw_dx_shader_res_free - The DX shader free callback
576 * @res: The shader resource
578 * Frees the DX shader resource and updates memory accounting.
583 struct vmw_dx_shader *shader = vmw_res_to_dx_shader(res); vmw_dx_shader_res_free() local
585 vmw_resource_unreference(&shader->cotable); vmw_dx_shader_res_free()
586 kfree(shader); vmw_dx_shader_res_free()
591 * vmw_dx_shader_add - Add a shader resource as a command buffer managed
596 * @user_key: The id used for this shader.
597 * @shader_type: The shader type.
606 struct vmw_dx_shader *shader; vmw_dx_shader_add() local
612 vmw_shader_dx_size = ttm_round_pot(sizeof(*shader)); vmw_dx_shader_add()
621 DRM_ERROR("Out of graphics memory for shader " vmw_dx_shader_add()
626 shader = kmalloc(sizeof(*shader), GFP_KERNEL); vmw_dx_shader_add()
627 if (!shader) { vmw_dx_shader_add()
632 res = &shader->res; vmw_dx_shader_add()
633 shader->ctx = ctx; vmw_dx_shader_add()
634 shader->cotable = vmw_context_cotable(ctx, SVGA_COTABLE_DXSHADER); vmw_dx_shader_add()
635 shader->id = user_key; vmw_dx_shader_add()
636 shader->committed = false; vmw_dx_shader_add()
637 INIT_LIST_HEAD(&shader->cotable_head); vmw_dx_shader_add()
644 * The user_key name-space is not per shader type for DX shaders, vmw_dx_shader_add()
645 * so when hashing, use a single zero shader type. vmw_dx_shader_add()
653 res->id = shader->id; vmw_dx_shader_add()
665 * User-space shader management:
672 shader.res); vmw_user_shader_base_to_res()
678 container_of(res, struct vmw_user_shader, shader.res); vmw_user_shader_free()
688 struct vmw_shader *shader = vmw_res_to_shader(res); vmw_shader_free() local
691 kfree(shader); vmw_shader_free()
747 DRM_ERROR("Out of graphics memory for shader " vmw_user_shader_alloc()
760 res = &ushader->shader.res; vmw_user_shader_alloc()
800 struct vmw_shader *shader; vmw_shader_alloc() local
817 DRM_ERROR("Out of graphics memory for shader " vmw_shader_alloc()
822 shader = kzalloc(sizeof(*shader), GFP_KERNEL); vmw_shader_alloc()
823 if (unlikely(shader == NULL)) { vmw_shader_alloc()
830 res = &shader->res; vmw_shader_alloc()
860 DRM_ERROR("Could not find buffer for shader " vmw_shader_define()
867 DRM_ERROR("Illegal buffer- or shader size.\n"); vmw_shader_define()
881 DRM_ERROR("Illegal shader type.\n"); vmw_shader_define()
901 * vmw_shader_id_ok - Check whether a compat shader user key and
902 * shader type are within valid bounds.
904 * @user_key: User space id of the shader.
915 * vmw_shader_key - Compute a hash key suitable for a compat shader.
917 * @user_key: User space id of the shader.
929 * vmw_shader_remove - Stage a compat shader for removal.
931 * @man: Pointer to the compat shader manager identifying the shader namespace.
932 * @user_key: The key that is used to identify the shader. The key is
933 * unique to the shader type.
952 * vmw_compat_shader_add - Create a compat shader and stage it for addition
955 * @man: Pointer to the compat shader manager identifying the shader namespace.
956 * @user_key: The key that is used to identify the shader. The key is
957 * unique to the shader type.
958 * @bytecode: Pointer to the bytecode of the shader.
960 * @tfile: Pointer to a struct ttm_object_file that the guest-backed shader is
995 /* Map and copy shader bytecode. */ vmw_compat_shader_add()
1026 * vmw_shader_lookup - Look up a compat shader
1029 * the shader namespace.
1030 * @user_key: The user space id of the shader.
1031 * @shader_type: The shader type.
1033 * Returns a refcounted pointer to a struct vmw_resource if the shader was
H A Dvmwgfx_binding.h173 * struct vmw_dx_shader_bindings - per shader type context binding state
175 * @shader: The shader binding for this shader type
176 * @const_buffer: Const buffer bindings for this shader type.
177 * @shader_res: Shader resource view bindings for this shader type.
178 * @dirty_sr: Bitmap tracking individual shader resource bindings changes
184 struct vmw_ctx_bindinfo_shader shader; member in struct:vmw_dx_shader_bindings
H A Dvmwgfx_binding.c50 * (surface, shader or even DX query) is conceptually a context binding that
77 * @per_shader: Per shader-type bindings.
151 offsetof(struct vmw_ctx_binding_state, per_shader[0].shader),
152 offsetof(struct vmw_ctx_binding_state, per_shader[1].shader),
153 offsetof(struct vmw_ctx_binding_state, per_shader[2].shader),
258 * @shader_slot: The shader slot of the binding. If none, then set to 0.
487 * vmw_binding_scrub_shader - scrub a shader binding from a context.
504 DRM_ERROR("Failed reserving FIFO space for shader " vmw_binding_scrub_shader()
598 * vmw_binding_scrub_dx_shader - scrub a dx shader binding from a context.
615 DRM_ERROR("Failed reserving FIFO space for DX shader " vmw_binding_scrub_dx_shader()
646 DRM_ERROR("Failed reserving FIFO space for DX shader " vmw_binding_scrub_cb()
747 * vmw_binding_emit_set_sr - Issue delayed DX shader resource binding commands
773 DRM_ERROR("Failed reserving FIFO space for DX shader" vmw_emit_set_sr()
915 * vmw_binding_emit_dirty_ps - Issue delayed per shader binding commands
H A Dvmwgfx_so.c303 * @man: Pointer to the compat shader manager identifying the shader namespace.
308 * @user_key: The key that is used to identify the shader. The key is
396 * @man: Pointer to the view manager identifying the shader namespace.
H A Dvmwgfx_execbuf.c841 * @shader_slot: The shader slot to user for the bindings.
2222 DRM_ERROR("Illegal shader type %u.\n", vmw_cmd_set_shader()
2372 DRM_ERROR("Illegal const buffer shader %u slot %u.\n", vmw_cmd_dx_set_single_constant_buffer()
2406 DRM_ERROR("Invalid shader binding.\n"); vmw_cmd_dx_set_shader_res()
2446 DRM_ERROR("Illegal shader type %u.\n", vmw_cmd_dx_set_shader()
2454 DRM_ERROR("Could not find shader for binding.\n"); vmw_cmd_dx_set_shader()
2949 DRM_ERROR("Could not find shader to remove.\n"); vmw_cmd_dx_destroy_shader()
2992 DRM_ERROR("Could not find shader to bind.\n"); vmw_cmd_dx_bind_shader()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/clk/
H A Dmcp77.c206 const int shader = cstate->domain[nv_clk_src_shader]; mcp77_clk_calc() local
218 /* Calculate clock * 2, so shader clock can use it too */ mcp77_clk_calc()
242 if (shader == nvkm_clk_read(&clk->base, nv_clk_src_href)) { mcp77_clk_calc()
245 clock = calc_pll(clk, 0x4020, shader, &N, &M, &P1); mcp77_clk_calc()
247 out = calc_P((core << 1), shader, &divs); mcp77_clk_calc()
249 if (abs(shader - out) <= mcp77_clk_calc()
250 abs(shader - clock) && mcp77_clk_calc()
284 nvkm_debug(subdev, "shader: hrefm4\n"); mcp77_clk_calc()
286 nvkm_debug(subdev, "shader: nvpll\n"); mcp77_clk_calc()
288 nvkm_debug(subdev, "shader: spll\n"); mcp77_clk_calc()
407 { nv_clk_src_shader , 0xff, 0, "shader", 1000 },
H A Dg84.c36 { nv_clk_src_shader , 0xff, 0, "shader", 1000 },
H A Dnv50.c374 const int shader = cstate->domain[nv_clk_src_shader]; nv50_clk_calc() local
450 /* core/shader: disconnect nvclk/sclk from their PLLs (nvclk to dom6, nv50_clk_calc()
467 /* shader: tie to nvclk if possible, otherwise use spll. have to be nv50_clk_calc()
468 * very careful that the shader clock is at least twice the core, or nv50_clk_calc()
473 if (P1-- && shader == (core << 1)) { nv50_clk_calc()
477 freq = calc_pll(clk, 0x4020, shader, &N, &M, &P1); nv50_clk_calc()
551 { nv_clk_src_shader , 0xff, 0, "shader", 1000 },
H A Dnv40.c168 /* use the second pll for shader/rop clock, if it differs from core */ nv40_clk_calc()
214 { nv_clk_src_shader , 0xff, 0, "shader", 1000 },
H A Dbase.c335 cstate->domain[nv_clk_src_shader] = perfE.shader; nvkm_pstate_new()
H A Dgt215.c526 { nv_clk_src_shader , 0x01, 0, "shader", 1000 },
/linux-4.4.14/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/
H A Dperf.h11 u32 shader; member in struct:nvbios_perfE
/linux-4.4.14/drivers/gpu/drm/vmwgfx/device_include/
H A Dsvga3d_limits.h49 * Maximum ID a shader can be assigned on a given context.
62 * Maximum size in dwords of shader text the SVGA device will allow.
H A Dsvga3d_cmd.h265 * Reserve some IDs to be used for the DX11 shader types.
618 * used by the fixed function pipeline or the vertex shader. It
759 * used by the fixed function pipeline or the vertex shader. It
953 /* Followed by variable number of DWORDs for shader bycode */
1870 * Define a guest-backed shader.
1884 * Bind a guest-backed shader.
1898 * Destroy a guest-backed shader.
1918 * Followed by a variable number of shader constants.
H A Dsvga3d_devcaps.h415 * SHADER_SAMPLE: Can the format be sampled from a shader?
H A Dsvga3d_types.h1169 * no vertex shader was bound.
1351 * Register limits for shader consts.
H A Dsvga3d_dx.h1245 uint32 sizeInBytes; /* Number of bytes of shader text. */
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/bios/
H A Dperf.c115 info->shader = nvbios_rd16(bios, perf + 0x06) * 1000; nvbios_perfEp()
116 info->core = info->shader + (signed char) nvbios_perfEp()
132 info->shader = nvbios_rd16(bios, perf + 0x0a) * 1000; nvbios_perfEp()
141 info->shader = nvbios_rd16(bios, perf + 0x0a) * 1000; nvbios_perfEp()
/linux-4.4.14/drivers/gpu/drm/amd/amdkfd/
H A Dkfd_flat_memory.c45 * “Flat” shader memory access – These are new shader vector memory
121 * that references this memory descriptor. This is the case for shader
123 * locations of assets (ex. the shader program location). In these cases
125 * address in the descriptor (ex. V# or T# or shader program location)
128 * space. For example a shader program cannot jump in/out between ATC
134 * S_LOAD and FLAT_* shader memory instructions where we have 64b pointers
178 * the shader for reporting a “memory violation” back to the
257 * For the S_LOAD and FLAT_* shader operations, the SUA mode is decoded from
H A Dkfd_dbgmgr.h117 * by CPU and GPU shader code within the process to set and query the content
119 * runtime and potentially GPU shader code interfacing with the HSA runtime.
132 HSA_EVENTTYPE_HW_EXCEPTION = 3, /* GPU shader exception event */
/linux-4.4.14/include/uapi/drm/
H A Dvmwgfx_drm.h821 * DRM_VMW_CREATE_SHADER - Create shader
823 * Creates a shader and optionally binds it to a dma buffer containing
824 * the shader byte-code.
839 * @shader_type: Shader type of the shader to create.
841 * where the shader byte-code starts
843 * shader byte-code
845 * can be used to subsequently identify the shader.
860 * DRM_VMW_UNREF_SHADER - Unreferences a shader
862 * Destroys a user-space reference to a shader, optionally destroying
869 * @handle: Handle identifying the shader to destroy.
H A Di915_drm.h608 /** Instruction cache, used by shader programs */
H A Dradeon_drm.h1011 /* max shader engines (SE) - needed for geometry shaders, etc. */
/linux-4.4.14/drivers/gpu/drm/radeon/
H A Dcayman_blit_shaders.c38 * shader instructions.
H A Devergreen_blit_shaders.c38 * shader instructions.
H A Dr600_blit_shaders.c38 * shader instructions.
H A Dr600_blit.c180 /* setup shader regs */ set_shaders()
H A Dr300_reg.h263 * The programmable vertex shader unit has a memory bank of unknown size
409 * shader side
H A Dcik.c3402 * @se_num: shader engine to address
3449 * @se_num: number of SEs (shader engines) for the asic
3479 * @se_num: number of SEs (shader engines) for the asic
7892 * - for gfx, hw shader state (0=PS...5=LS, 6=CS)
H A Dni.c1169 /* reprogram the shader complex */ cayman_gpu_init()
H A Dradeon_drv.h292 /* r6xx/r7xx pipe/shader config */
H A Devergreen_cs.c1999 DW 1 HEADER Header of the packet. Shader_Type in bit 1 of the Header will correspond to the shader type of the Load, see Type-3 Packet. evergreen_packet3_check()
H A Devergreen.c3779 /* set the shader const cache sizes to 0 */ evergreen_gpu_init()
H A Datombios.h7375 UCHAR ucActiveUnitNumPerSH; //requested active CU/RB/PRIM number per shader array
7376 UCHAR ucMaxUnitNumPerSH; //max CU/RB/PRIM number per shader array
/linux-4.4.14/drivers/gpu/drm/msm/
H A Dmsm_rd.c53 RD_PROGRAM, /* shader program, raw dump */
/linux-4.4.14/drivers/gpu/drm/amd/amdgpu/
H A Dcik_ih.c219 * - for gfx, hw shader state (0=PS...5=LS, 6=CS)
H A Dgfx_v7_0.c1860 * @se_num: shader engine to address
1910 * @se_num: number of SEs (shader engines) for the asic
1941 * @se_num: number of SEs (shader engines) for the asic
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/gr/
H A Dctxnv40.c644 /* Per-vertex shader state */ nv40_grctx_generate()
/linux-4.4.14/drivers/gpu/drm/amd/include/
H A Datombios.h7915 UCHAR ucActiveUnitNumPerSH; //requested active CU/RB/PRIM number per shader array
7916 UCHAR ucMaxUnitNumPerSH; //max CU/RB/PRIM number per shader array

Completed in 1868 milliseconds