Skip to content

Commit b92b7c0

Browse files
authored
media: qcom: bring in venus/iris flip-switch patches (#391)
media: qcom: bring in venus/iris flip-switch patches
2 parents 721225f + 07ba285 commit b92b7c0

File tree

5 files changed

+19
-7
lines changed

5 files changed

+19
-7
lines changed

drivers/media/platform/qcom/iris/Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ qcom-iris-objs += iris_buffer.o \
1010
iris_hfi_gen2_packet.o \
1111
iris_hfi_gen2_response.o \
1212
iris_hfi_queue.o \
13+
iris_platform_gen1.o \
1314
iris_platform_gen2.o \
1415
iris_power.o \
1516
iris_probe.o \
@@ -26,8 +27,4 @@ qcom-iris-objs += iris_buffer.o \
2627
iris_vpu_buffer.o \
2728
iris_vpu_common.o \
2829

29-
ifeq ($(CONFIG_VIDEO_QCOM_VENUS),)
30-
qcom-iris-objs += iris_platform_gen1.o
31-
endif
32-
3330
obj-$(CONFIG_VIDEO_QCOM_IRIS) += qcom-iris.o

drivers/media/platform/qcom/iris/iris_probe.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,6 @@ static const struct of_device_id iris_dt_match[] = {
352352
.compatible = "qcom,qcs8300-iris",
353353
.data = &qcs8300_data,
354354
},
355-
#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_VENUS))
356355
{
357356
.compatible = "qcom,sc7280-venus",
358357
.data = &sc7280_data,
@@ -361,7 +360,6 @@ static const struct of_device_id iris_dt_match[] = {
361360
.compatible = "qcom,sm8250-venus",
362361
.data = &sm8250_data,
363362
},
364-
#endif
365363
{
366364
.compatible = "qcom,sm8550-iris",
367365
.data = &sm8550_data,

drivers/media/platform/qcom/iris/iris_vpu_buffer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ struct iris_inst;
6767
#define SIZE_DOLBY_RPU_METADATA (41 * 1024)
6868
#define H264_CABAC_HDR_RATIO_HD_TOT 1
6969
#define H264_CABAC_RES_RATIO_HD_TOT 3
70-
#define H265D_MAX_SLICE 1200
70+
#define H265D_MAX_SLICE 3600
7171
#define SIZE_H265D_HW_PIC_T SIZE_H264D_HW_PIC_T
7272
#define H265_CABAC_HDR_RATIO_HD_TOT 2
7373
#define H265_CABAC_RES_RATIO_HD_TOT 2

drivers/media/platform/qcom/venus/core.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -949,6 +949,7 @@ static const struct venus_resources sc7180_res = {
949949
.enc_nodename = "video-encoder",
950950
};
951951

952+
#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS))
952953
static const struct freq_tbl sm8250_freq_table[] = {
953954
{ 0, 444000000 },
954955
{ 0, 366000000 },
@@ -1069,6 +1070,7 @@ static const struct venus_resources sc7280_res = {
10691070
.dec_nodename = "video-decoder",
10701071
.enc_nodename = "video-encoder",
10711072
};
1073+
#endif
10721074

10731075
static const struct bw_tbl qcm2290_bw_table_dec[] = {
10741076
{ 352800, 597000, 0, 746000, 0 }, /* 1080p@30 + 720p@30 */
@@ -1125,11 +1127,15 @@ static const struct of_device_id venus_dt_match[] = {
11251127
{ .compatible = "qcom,msm8998-venus", .data = &msm8998_res, },
11261128
{ .compatible = "qcom,qcm2290-venus", .data = &qcm2290_res, },
11271129
{ .compatible = "qcom,sc7180-venus", .data = &sc7180_res, },
1130+
#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS))
11281131
{ .compatible = "qcom,sc7280-venus", .data = &sc7280_res, },
1132+
#endif
11291133
{ .compatible = "qcom,sdm660-venus", .data = &sdm660_res, },
11301134
{ .compatible = "qcom,sdm845-venus", .data = &sdm845_res, },
11311135
{ .compatible = "qcom,sdm845-venus-v2", .data = &sdm845_res_v2, },
1136+
#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS))
11321137
{ .compatible = "qcom,sm8250-venus", .data = &sm8250_res, },
1138+
#endif
11331139
{ }
11341140
};
11351141
MODULE_DEVICE_TABLE(of, venus_dt_match);

drivers/media/platform/qcom/venus/core.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ enum vpu_version {
5454
VPU_VERSION_AR50,
5555
VPU_VERSION_AR50_LITE,
5656
VPU_VERSION_IRIS1,
57+
#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS))
5758
VPU_VERSION_IRIS2,
5859
VPU_VERSION_IRIS2_1,
60+
#endif
5961
};
6062

6163
struct firmware_version {
@@ -525,13 +527,22 @@ struct venus_inst {
525527
#define IS_V1(core) ((core)->res->hfi_version == HFI_VERSION_1XX)
526528
#define IS_V3(core) ((core)->res->hfi_version == HFI_VERSION_3XX)
527529
#define IS_V4(core) ((core)->res->hfi_version == HFI_VERSION_4XX)
530+
#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS))
528531
#define IS_V6(core) ((core)->res->hfi_version == HFI_VERSION_6XX)
532+
#else
533+
#define IS_V6(core) (0)
534+
#endif
529535

530536
#define IS_AR50(core) ((core)->res->vpu_version == VPU_VERSION_AR50)
531537
#define IS_AR50_LITE(core) ((core)->res->vpu_version == VPU_VERSION_AR50_LITE)
532538
#define IS_IRIS1(core) ((core)->res->vpu_version == VPU_VERSION_IRIS1)
539+
#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS))
533540
#define IS_IRIS2(core) ((core)->res->vpu_version == VPU_VERSION_IRIS2)
534541
#define IS_IRIS2_1(core) ((core)->res->vpu_version == VPU_VERSION_IRIS2_1)
542+
#else
543+
#define IS_IRIS2(core) (0)
544+
#define IS_IRIS2_1(core) (0)
545+
#endif
535546

536547
static inline bool is_lite(struct venus_core *core)
537548
{

0 commit comments

Comments
 (0)