drm: xlnx: zynqmp_dpsub: Minimize usage of global flag
authorAnatoliy Klymenko <anatoliy.klymenko@amd.com>
Tue, 16 Apr 2024 20:31:40 +0000 (13:31 -0700)
committerTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Wed, 24 Apr 2024 14:51:19 +0000 (17:51 +0300)
commit1836fd5ed98db85f249bf755978c964c2607a25d
treee6ef543fe46d85dfc4cc28089fe39025d90d4624
parentb0f0469ab662159f182f5af292b71cc5d42468a8
drm: xlnx: zynqmp_dpsub: Minimize usage of global flag

Avoid usage of global zynqmp_dpsub.dma_enabled flag in DPSUB layer
context. This flag signals whether the driver runs in DRM CRTC or DRM
bridge mode, assuming that all display layers share the same live or
non-live mode of operation. Using per-layer mode instead of global flag
will simplify future support of the hybrid scenario.

Remove redundant checks in DMA request/release contexts as
zynqmp_disp_layer.info is well-defined for all layer types, including the
correct number of DMA channels required for each particular layer.

Signed-off-by: Anatoliy Klymenko <anatoliy.klymenko@amd.com>
Reviewed-by: Tomi Valkeinen <tomi.valkainen@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240416-dp-live-fmt-v4-5-c7f379b7168e@amd.com
drivers/gpu/drm/xlnx/zynqmp_disp.c