drm: atmel-hlcdc: move output mode selection in CRTC implementation
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Wed, 6 Jan 2016 10:14:15 +0000 (11:14 +0100)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Thu, 14 Apr 2016 07:17:27 +0000 (09:17 +0200)
commitaca63b766140f1abf14cbc22ccc5d7c7599b807c
treed2a0a8fc3317c4d34a0e57eaa4a1e1b86d50eb7d
parent79a3fc2d98111e371bd4c49e6f2de26ef8deb03f
drm: atmel-hlcdc: move output mode selection in CRTC implementation

In order to support multiple outputs we need to move the output mode
selection to the CRTC object, so that the output validity check can be
done against the drm_atomic_state.

If the connectors selected by a specific mode setting are requiring
incompatible bus format the atomic operation is aborted (->atomic_check()
returns -EINVAL).

In order to implement that, we need to define our own CRTC state and
overload default ->reset(), ->atomic_duplicate_state() and
->atomic_destroy_state() functions.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c