OSDN Git Service

drm/ingenic: Simplify code by using hwdescs array
authorPaul Cercueil <paul@crapouillou.net>
Tue, 26 Oct 2021 18:12:35 +0000 (19:12 +0100)
committerPaul Cercueil <paul@crapouillou.net>
Fri, 29 Oct 2021 20:29:09 +0000 (21:29 +0100)
commit1bdb542da736e299a3fb291e5905a14dc955b938
tree4e44c945905b127bc6ec26dc090fa652a4353323
parent675053115e4e809643e12ca817dc9147562a70d6
drm/ingenic: Simplify code by using hwdescs array

Instead of having one 'hwdesc' variable for the plane #0, one for the
plane #1 and one for the palette, use a 'hwdesc[3]' array, where the
DMA hardware descriptors are indexed by the plane's number.

v2: dma_hwdesc_addr() extended to support palette hwdesc. The palette
    hwdesc is now hwdesc[3] to simplify things. Add
    ingenic_drm_configure_hwdesc*() functions to factorize code.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20211026181240.213806-2-paul@crapouillou.net
Tested-by: Nikolaus Schaller <hns@goldelico.com>
Reviewed-by: Christophe Branchereau <cbranchereau@gmail.com>
drivers/gpu/drm/ingenic/ingenic-drm-drv.c