]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
drm: rcar-du: Split CRTC handling to support hardware indexing
authorKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Fri, 27 Apr 2018 22:21:52 +0000 (23:21 +0100)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Sat, 5 May 2018 14:11:19 +0000 (17:11 +0300)
commit5361cc7f8e9146f393cfcb76890d8c80a4e73086
treed4b225f12cfd439cf896bf3dc2773e390799cea3
parent425f33bdcd4f492546354cbe4daafe420c450a83
drm: rcar-du: Split CRTC handling to support hardware indexing

The DU CRTC driver does not support distinguishing between a hardware
index, and a software (CRTC) index in the event that a DU channel might
not be populated by the hardware.

Support this by adapting the rcar_du_device_info structure to store a
bitmask of available channels rather than a count of CRTCs. The count
can then be obtained by determining the hamming weight of the bitmask.

This allows the rcar_du_crtc_create() function to distinguish between
both index types, and non-populated DU channels will be skipped without
leaving a gap in the software CRTC indexes.

Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
drivers/gpu/drm/rcar-du/rcar_du_crtc.c
drivers/gpu/drm/rcar-du/rcar_du_crtc.h
drivers/gpu/drm/rcar-du/rcar_du_drv.c
drivers/gpu/drm/rcar-du/rcar_du_drv.h
drivers/gpu/drm/rcar-du/rcar_du_kms.c