At least in the one frame processing mode which is the only mode supported
by the current gsc driver, the buf idx is not meaningful for the driver.
Because only one address in the buffer is valid at a time, so it is OK to
convert the invalid buf idx from userspace to a valid idx, process the
frame, and return the result with original buf idx.
Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I8257cd39e33382f214ce4573e4a79f15ea498aab
DRM_DEBUG_KMS("prop_id[%d]buf_id[%d]buf_type[%d]\n",
property->prop_id, buf_id, buf_type);
- if (buf_id > GSC_MAX_SRC) {
- dev_info(ippdrv->dev, "invalid buf_id %d.\n", buf_id);
- return -EINVAL;
- }
+ buf_id %= GSC_MAX_SRC;
/* address register set */
switch (buf_type) {
DRM_DEBUG_KMS("prop_id[%d]buf_id[%d]buf_type[%d]\n",
property->prop_id, buf_id, buf_type);
- if (buf_id > GSC_MAX_DST) {
- dev_info(ippdrv->dev, "invalid buf_id %d.\n", buf_id);
- return -EINVAL;
- }
+ buf_id %= GSC_MAX_DST;
/* address register set */
switch (buf_type) {