pvr: emit tpu_tag_cdm_ctrl in compute stream when present

An extra control register word, tpu_tag_cdm_ctrl, will be present when
TPU_DM_GLOBAL_REGISTERS feature is present.

Emit it when it's needed.

The document of this register is available, however I don't think any of
the bits are needed to be set for our current feature set, so just emit
0 now.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30552>
This commit is contained in:
Icenowy Zheng
2024-08-07 13:50:01 +08:00
parent 19bf1b661b
commit e9fe18727e
2 changed files with 14 additions and 0 deletions
+8
View File
@@ -663,6 +663,14 @@ SOFTWARE.
<field name="border_colour_table_address" start="0" end="37" shift="2" type="address"/>
</struct>
<!-- FIXME: This register depends on TPU_DM_GLOBAL_REGISTERS. -->
<struct name="TPU_TAG_CDM_CTRL" length="1">
<field name="af_ratio_truncate_to_integer" start="3" end="3" type="bool"/>
<field name="af_ratio_truncate_to_half" start="2" end="2" type="bool"/>
<field name="af_filtering_mode" start="1" end="1" type="bool"/>
<field name="yuv_cam_invalidate" start="0" end="0" type="bool"/>
</struct>
<struct name="USC_PIXEL_OUTPUT_CTRL" length="1">
<field name="partition_mask" start="3" end="20" type="uint"/>
<field name="enable_4th_partition" start="2" end="2" type="bool"/>
+6
View File
@@ -119,6 +119,12 @@ pvr_submit_info_stream_init(struct pvr_compute_ctx *ctx,
stream_ptr += pvr_cmd_length(CR_COMPUTE_CLUSTER);
}
if (PVR_HAS_FEATURE(dev_info, tpu_dm_global_registers)) {
pvr_csb_pack (stream_ptr, CR_TPU_TAG_CDM_CTRL, value) {
}
stream_ptr += pvr_cmd_length(CR_TPU_TAG_CDM_CTRL);
}
if (PVR_HAS_FEATURE(dev_info, gpu_multicore_support)) {
pvr_finishme(
"Emit execute_count when feature gpu_multicore_support is present");