summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVikash Garodia <vgarodia@codeaurora.org>2021-03-23 18:50:37 +0530
committerVikash Garodia <vgarodia@codeaurora.org>2021-03-24 11:22:20 +0530
commit67e04152d6eb7fbfaae884d22d9dad353433795a (patch)
tree30333b912f6261c41af2b3f1334e3d2f760f7111
parentf31d17c6e9f05cf77bd429615c8f6136838cfba0 (diff)
downloadvideo-driver-67e04152d6eb7fbfaae884d22d9dad353433795a.tar.gz
msm: vidc: Add check for maximum height
While accepting a video session, keep a check for frame height w.r.t maximum capability. CRs-Fixed: 2883699 Change-Id: I068dd9af868093dbdddf0301d8d40a95643314e0 Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
-rw-r--r--msm/vidc/msm_vidc_common.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/msm/vidc/msm_vidc_common.c b/msm/vidc/msm_vidc_common.c
index 2619d1f..3bc3d51 100644
--- a/msm/vidc/msm_vidc_common.c
+++ b/msm/vidc/msm_vidc_common.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
- * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
*/
#include <linux/jiffies.h>
@@ -6186,10 +6186,12 @@ int msm_vidc_check_session_supported(struct msm_vidc_inst *inst)
width_min, height_min);
rc = -ENOTSUPP;
}
- if (!rc && output_width > width_max) {
+ if (!rc && (output_width > width_max ||
+ output_height > height_max)) {
s_vpr_e(sid,
- "Unsupported width = %u supported max width = %u\n",
- output_width, width_max);
+ "Unsupported WxH (%u)x(%u), max supported is (%u)x(%u)\n",
+ output_width, output_height,
+ width_max, height_max);
rc = -ENOTSUPP;
}