MLK-21509-4 drm/imx: dpu: crc: Add user-configurable CRC region(ROI) support
authorLiu Ying <victor.liu@nxp.com>
Sat, 13 Apr 2019 07:59:39 +0000 (15:59 +0800)
committerLiu Ying <victor.liu@nxp.com>
Mon, 29 Apr 2019 07:35:54 +0000 (15:35 +0800)
commit1d3b253e11f0d09f9956abb587962a751cd34b5f
treeba82b8a8f0e75b64c19be2e7642cf0457344cb6a
parented23d80c9c27f5ae1239fb1c551267041bc9e6fc
MLK-21509-4 drm/imx: dpu: crc: Add user-configurable CRC region(ROI) support

This patch adds user-configurable CRC region support.
The users may choose a region of interest(ROI) as the CRC source
(i.e., the CRC evaluation window) via the debugfs control node.
The ROI cannot exceed the display region as indicated by
drm_crtc_state->adjusted_mode.  The users may write a string in
the fashion of "roi:x1,y1,x2,y2" to the node to specify the ROI
within the display region.  The inclusive position at (x1, y1)
indicates the upper left of the region, while the exclusive
position at (x2, y2) indicates the lower right of the region.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
drivers/gpu/drm/imx/dpu/dpu-crc.c
drivers/gpu/drm/imx/dpu/dpu-crc.h
drivers/gpu/drm/imx/dpu/dpu-crtc.c
drivers/gpu/drm/imx/dpu/dpu-crtc.h
include/video/dpu.h