]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
drm/atmel-hlcdc: Simplify the HLCDC layer logic
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Mon, 6 Feb 2017 17:57:19 +0000 (18:57 +0100)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 28 Feb 2017 10:57:56 +0000 (11:57 +0100)
commit9a45d33cdf82f138cc290236cde83483c6567394
tree2b42c76e129812506c0087debd510baa8d409606
parent6140cf20341975400fb2ee7a72fa6316c1bc74f0
drm/atmel-hlcdc: Simplify the HLCDC layer logic

An HLCDC layers in Atmel's nomenclature is either a DRM plane or a 'Post
Processing Layer' which can be used to output the results of the HLCDC
composition in a memory buffer.

atmel_hlcdc_layer.c was designed to be generic enough to be re-usable in
both cases, but we're not exposing the post-processing layer yet, and
even if we were, I'm not sure the code would provide the necessary tools
to manipulate this kind of layer.

Moreover, the code in atmel_hlcdc_{plane,layer}.c was designed before the
atomic modesetting API, and was trying solve the
check-setting/commit-if-ok/rollback-otherwise problem, which is now
entirely solved by the existing core infrastructure.

And finally, the code in atmel_hlcdc_layer.c is over-complicated compared
to what we really need. This rework is a good excuse to simplify it. Note
that this rework solves an existing resource leak (leading to a -EBUSY
error) which I failed to clearly identify.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Nicolas Ferre <nicolas.ferre@microchip.com>
drivers/gpu/drm/atmel-hlcdc/Makefile
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_layer.c [deleted file]
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.h [deleted file]
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c