hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/media/platform/qcom/venus/core.h
....@@ -119,6 +119,11 @@
119119 * struct venus_core - holds core parameters valid for all instances
120120 *
121121 * @base: IO memory base address
122
+ * @vbif_base IO memory vbif base address
123
+ * @cpu_base IO memory cpu base address
124
+ * @cpu_cs_base IO memory cpu_cs base address
125
+ * @cpu_ic_base IO memory cpu_ic base address
126
+ * @wrapper_base IO memory wrapper base address
122127 * @irq: Venus irq
123128 * @clks: an array of struct clk pointers
124129 * @vcodec0_clks: an array of vcodec0 struct clk pointers
....@@ -152,6 +157,11 @@
152157 */
153158 struct venus_core {
154159 void __iomem *base;
160
+ void __iomem *vbif_base;
161
+ void __iomem *cpu_base;
162
+ void __iomem *cpu_cs_base;
163
+ void __iomem *cpu_ic_base;
164
+ void __iomem *wrapper_base;
155165 int irq;
156166 struct clk *clks[VIDC_CLKS_NUM_MAX];
157167 struct clk *vcodec0_clks[VIDC_VCODEC_CLKS_NUM_MAX];
....@@ -283,7 +293,6 @@
283293 VENUS_DEC_STATE_DRAIN = 5,
284294 VENUS_DEC_STATE_DECODING = 6,
285295 VENUS_DEC_STATE_DRC = 7,
286
- VENUS_DEC_STATE_DRC_FLUSH_DONE = 8,
287296 };
288297
289298 struct venus_ts_metadata {
....@@ -348,7 +357,7 @@
348357 * @priv: a private for HFI operations callbacks
349358 * @session_type: the type of the session (decoder or encoder)
350359 * @hprop: a union used as a holder by get property
351
- * @last_buf: last capture buffer for dynamic-resoluton-change
360
+ * @next_buf_last: a flag to mark next queued capture buffer as last
352361 */
353362 struct venus_inst {
354363 struct list_head list;
....@@ -410,12 +419,14 @@
410419 union hfi_get_property hprop;
411420 unsigned int core_acquired: 1;
412421 unsigned int bit_depth;
413
- struct vb2_buffer *last_buf;
422
+ bool next_buf_last;
423
+ bool drain_active;
414424 };
415425
416426 #define IS_V1(core) ((core)->res->hfi_version == HFI_VERSION_1XX)
417427 #define IS_V3(core) ((core)->res->hfi_version == HFI_VERSION_3XX)
418428 #define IS_V4(core) ((core)->res->hfi_version == HFI_VERSION_4XX)
429
+#define IS_V6(core) ((core)->res->hfi_version == HFI_VERSION_6XX)
419430
420431 #define ctrl_to_inst(ctrl) \
421432 container_of((ctrl)->handler, struct venus_inst, ctrl_handler)