Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c75923fb authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc: Add support for DCVS for 2K resolution and VP9"

parents 61a997f2 d313724a
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -186,6 +186,9 @@ void msm_dcvs_init_load(struct msm_vidc_inst *inst)
		} else if (dcvs->load > load_1080p) {
			dcvs->load_low = DCVS_DEC_SVS_LOAD;
			dcvs->load_high = DCVS_DEC_NOMINAL_LOAD;
		} else {
			dcvs->load_low = DCVS_DEC_SVS2_LOAD;
			dcvs->load_high = DCVS_DEC_SVS_LOAD;
		}
	} else { /* encoder */
		if (dcvs->load >= load_uhd) {
@@ -285,11 +288,11 @@ void msm_dcvs_monitor_buffer(struct msm_vidc_inst *inst)
		dcvs->threshold_disp_buf_high = new_ftb;
		if (dcvs->threshold_disp_buf_high <=
			dcvs->threshold_disp_buf_low +
			DCVS_DEC_EXTRA_OUTPUT_BUFFERS) {
			DCVS_BUFFER_SAFEGUARD) {
			dcvs->threshold_disp_buf_high =
				dcvs->threshold_disp_buf_low +
				DCVS_DEC_EXTRA_OUTPUT_BUFFERS
				+ (DCVS_DEC_EXTRA_OUTPUT_BUFFERS == 0);
				DCVS_BUFFER_SAFEGUARD
				+ (DCVS_BUFFER_SAFEGUARD == 0);
		}

		dcvs->threshold_disp_buf_high =
@@ -526,11 +529,13 @@ static bool msm_dcvs_check_supported(struct msm_vidc_inst *inst)
				V4L2_PIX_FMT_HEVC) ||
			(inst->fmts[OUTPUT_PORT]->fourcc ==
				V4L2_PIX_FMT_VP8) ||
			(inst->fmts[OUTPUT_PORT]->fourcc ==
				V4L2_PIX_FMT_VP9) ||
			(inst->fmts[OUTPUT_PORT]->fourcc ==
				V4L2_PIX_FMT_H264_NO_SC);
		if (!is_codec_supported ||
			!IS_VALID_DCVS_SESSION(num_mbs_per_frame,
					DCVS_MIN_SUPPORTED_MBPERFRAME))
					DCVS_DEC_MIN_SUPPORTED_MBPERFRAME))
			return false;

		if (!output_buf_req) {
+5 −2
Original line number Diff line number Diff line
@@ -15,8 +15,9 @@
#define _MSM_VIDC_DCVS_H_
#include "msm_vidc_internal.h"

/* Minimum number of display buffers plus an extra safeguard*/
/* Minimum number of display buffers */
#define DCVS_MIN_DISPLAY_BUFF 4
#define DCVS_MIN_DISPLAY_BUFF 5
/* Low threshold for encoder dcvs */
#define DCVS_ENC_LOW_THR 4
/* High threshold for encoder dcvs */
@@ -31,6 +32,7 @@
#define DCVS_TURBO_THRESHOLD 4

/* Instance max load above which DCVS kicks in for decoder */
#define DCVS_DEC_SVS2_LOAD NUM_MBS_PER_SEC(1088, 1920, 30)
#define DCVS_DEC_SVS_LOAD NUM_MBS_PER_SEC(1088, 1920, 60)
#define DCVS_DEC_NOMINAL_LOAD NUM_MBS_PER_SEC(2160, 3840, 30)
#define DCVS_DEC_TURBO_LOAD NUM_MBS_PER_SEC(2160, 3840, 60)
@@ -39,9 +41,10 @@
#define DCVS_ENC_TURBO_LOAD NUM_MBS_PER_SEC(2160, 3840, 30)

/* Considering one safeguard buffer */
#define DCVS_BUFFER_SAFEGUARD 1
#define DCVS_BUFFER_SAFEGUARD (DCVS_DEC_EXTRA_OUTPUT_BUFFERS - 1)
/* Supported DCVS MBs per frame */
#define DCVS_MIN_SUPPORTED_MBPERFRAME NUM_MBS_PER_FRAME(2160, 3840)
#define DCVS_DEC_MIN_SUPPORTED_MBPERFRAME NUM_MBS_PER_FRAME(1440, 2560)

void msm_dcvs_init(struct msm_vidc_inst *inst);
void msm_dcvs_init_load(struct msm_vidc_inst *inst);