mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
msm-vidc: restrict interlace clip resolution
[1] Some unsupported clip resolution like 1600x1200, firmware rejects
the session during load resources.
[2] Allow interlaced clip playback only if below conditions were met
- resolution <= 1920x1920
- max_mbs_per_frame <= (1920x1088)/256
Change-Id: I67fd5377603c9c9ca577369c18ca6133190dc386
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
This commit is contained in:
parent
7c73b4c8b5
commit
aeee6b18df
1 changed files with 12 additions and 0 deletions
|
|
@ -5588,6 +5588,18 @@ int msm_vidc_check_session_supported(struct msm_vidc_inst *inst)
|
|||
mbpf_max);
|
||||
rc = -ENOTSUPP;
|
||||
}
|
||||
if (!rc && inst->pic_struct !=
|
||||
MSM_VIDC_PIC_STRUCT_PROGRESSIVE &&
|
||||
(output_width > INTERLACE_WIDTH_MAX ||
|
||||
output_height > INTERLACE_HEIGHT_MAX ||
|
||||
(NUM_MBS_PER_FRAME(output_height, output_width) >
|
||||
INTERLACE_MB_PER_FRAME_MAX))) {
|
||||
dprintk(VIDC_ERR,
|
||||
"Unsupported interlace WxH = (%u)x(%u), max supported is - (%u)x(%u)\n",
|
||||
output_width, output_height,
|
||||
INTERLACE_WIDTH_MAX, INTERLACE_HEIGHT_MAX);
|
||||
rc = -ENOTSUPP;
|
||||
}
|
||||
}
|
||||
if (rc) {
|
||||
dprintk(VIDC_ERR,
|
||||
|
|
|
|||
Loading…
Reference in a new issue