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

Commit 6714091b authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc: Add check for maximum height"

parents aa1c4131 67e04152
Loading
Loading
Loading
Loading
+6 −4
Original line number Original line Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
// 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>
#include <linux/jiffies.h>
@@ -6186,10 +6186,12 @@ int msm_vidc_check_session_supported(struct msm_vidc_inst *inst)
				width_min, height_min);
				width_min, height_min);
			rc = -ENOTSUPP;
			rc = -ENOTSUPP;
		}
		}
		if (!rc && output_width > width_max) {
		if (!rc && (output_width > width_max ||
				output_height > height_max)) {
			s_vpr_e(sid,
			s_vpr_e(sid,
				"Unsupported width = %u supported max width = %u\n",
				"Unsupported WxH (%u)x(%u), max supported is (%u)x(%u)\n",
				output_width, width_max);
				output_width, output_height,
				width_max, height_max);
				rc = -ENOTSUPP;
				rc = -ENOTSUPP;
		}
		}