Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: iris: Add support for HFI_PROP_OPB_ENABLE to control split mode

Add handling for the HFI_PROP_OPB_ENABLE property, which allows enabling
or disabling split mode in the firmware. When HFI_PROP_OPB_ENABLE is set
to true, the firmware activates split mode for output picture buffers
(OPB). The OPB format is determined by the HFI_PROP_COLOR_FORMAT
property, supporting NV12 or QC08C formats.

Signed-off-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Reviewed-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>

authored by

Dikshita Agarwal and committed by
Hans Verkuil
7c1f3bd5 bcaaa08d

+17
+15
drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c
··· 422 422 sizeof(u32)); 423 423 } 424 424 425 + static int iris_hfi_gen2_set_opb_enable(struct iris_inst *inst, u32 plane) 426 + { 427 + u32 port = iris_hfi_gen2_get_port(inst, plane); 428 + u32 opb_enable = iris_split_mode_enabled(inst); 429 + 430 + return iris_hfi_gen2_session_set_property(inst, 431 + HFI_PROP_OPB_ENABLE, 432 + HFI_HOST_FLAGS_NONE, 433 + port, 434 + HFI_PAYLOAD_U32, 435 + &opb_enable, 436 + sizeof(u32)); 437 + } 438 + 425 439 static int iris_hfi_gen2_set_colorformat(struct iris_inst *inst, u32 plane) 426 440 { 427 441 u32 port = iris_hfi_gen2_get_port(inst, plane); ··· 541 527 {HFI_PROP_SIGNAL_COLOR_INFO, iris_hfi_gen2_set_colorspace }, 542 528 {HFI_PROP_PROFILE, iris_hfi_gen2_set_profile }, 543 529 {HFI_PROP_LEVEL, iris_hfi_gen2_set_level }, 530 + {HFI_PROP_OPB_ENABLE, iris_hfi_gen2_set_opb_enable }, 544 531 {HFI_PROP_COLOR_FORMAT, iris_hfi_gen2_set_colorformat }, 545 532 {HFI_PROP_LINEAR_STRIDE_SCANLINE, iris_hfi_gen2_set_linear_stride_scanline }, 546 533 {HFI_PROP_TIER, iris_hfi_gen2_set_tier },
+1
drivers/media/platform/qcom/iris/iris_hfi_gen2_defines.h
··· 91 91 #define HFI_PROP_BUFFER_MARK 0x0300016c 92 92 #define HFI_PROP_RAW_RESOLUTION 0x03000178 93 93 #define HFI_PROP_TOTAL_PEAK_BITRATE 0x0300017C 94 + #define HFI_PROP_OPB_ENABLE 0x03000184 94 95 #define HFI_PROP_COMV_BUFFER_COUNT 0x03000193 95 96 #define HFI_PROP_END 0x03FFFFFF 96 97
+1
drivers/media/platform/qcom/iris/iris_platform_gen2.c
··· 691 691 }; 692 692 693 693 static const u32 sm8550_vdec_output_config_params[] = { 694 + HFI_PROP_OPB_ENABLE, 694 695 HFI_PROP_COLOR_FORMAT, 695 696 HFI_PROP_LINEAR_STRIDE_SCANLINE, 696 697 };