[RFC PATCH 12/29] OMAPDSS: Writeback: Add check for color_mode in dss_wb_simple_check()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add a check for the color_mode parameter provided by the user in
dss_wb_simple_check().

Signed-off-by: Archit Taneja <archit@xxxxxx>
---
 drivers/video/omap2/dss/writeback.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/video/omap2/dss/writeback.c b/drivers/video/omap2/dss/writeback.c
index 8b2c9b8..540e61d 100644
--- a/drivers/video/omap2/dss/writeback.c
+++ b/drivers/video/omap2/dss/writeback.c
@@ -153,6 +153,13 @@ int dss_wb_simple_check(struct omap_dss_writeback *wb,
 		return -EINVAL;
 	}
 
+	if ((dss_feat_get_supported_color_modes(wb->plane_id) &
+			info->color_mode) == 0) {
+		DSSERR("wb_simple_check: wb%d doesn't support mode %d\n",
+			wb->id, info->color_mode);
+		return -EINVAL;
+	}
+
 	if (info->capture_rate < 0 || info->capture_rate > 7) {
 		DSSERR("wb_simple_check: capture rate cannot be %d\n",
 			info->capture_rate);
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux