Revert "media: venus: vdec: Clamp param smaller than 1fps and bigger than 240."

This reverts commit a532533f8f which is
commit 377dc500d253f0b26732b2cb062e89668aef890a upstream.

It breaks the Android kernel build and can be brought back in the future
in an safe way if it is really needed.

Bug: 161946584
Change-Id: I47d2957aec610d2288b92e4875e2d15704470d20
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman
2025-09-03 14:10:04 +00:00
parent f48ff3ec4f
commit d8f5ff933f
2 changed files with 3 additions and 4 deletions

View File

@@ -25,8 +25,6 @@
#define VIDC_VCODEC_CLKS_NUM_MAX 2
#define VIDC_PMDOMAINS_NUM_MAX 3
#define VENUS_MAX_FPS 240
extern int venus_fw_debug;
struct freq_tbl {

View File

@@ -427,10 +427,11 @@ static int vdec_s_parm(struct file *file, void *fh, struct v4l2_streamparm *a)
us_per_frame = timeperframe->numerator * (u64)USEC_PER_SEC;
do_div(us_per_frame, timeperframe->denominator);
us_per_frame = clamp(us_per_frame, 1, USEC_PER_SEC);
if (!us_per_frame)
return -EINVAL;
fps = (u64)USEC_PER_SEC;
do_div(fps, us_per_frame);
fps = min(VENUS_MAX_FPS, fps);
inst->fps = fps;
inst->timeperframe = *timeperframe;