diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2013-06-16 23:01:02 +0400 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2013-08-10 01:17:46 +0400 |
commit | cb2025d2509ffab1c426509fd9de3d83e40398b9 (patch) | |
tree | f09c3a2637c1ec65774faf1af58ead1a3fda942e /drivers/gpu/drm/rcar-du/rcar_du_kms.c | |
parent | 7fe99fda5f5c52a01b2c966aa68341a0b3d8ab33 (diff) | |
download | linux-cb2025d2509ffab1c426509fd9de3d83e40398b9.tar.xz |
drm/rcar-du: Introduce CRTCs groups
The R8A7779 DU is split in per-CRTC resources (scan-out engine, blending
unit, timings generator, ...) and device-global resources (start/stop
control, planes, ...) shared between the two CRTCs.
The R8A7790 introduced a third CRTC with its own set of global resources
This would be modeled as two separate DU device instances if it wasn't
for a handful or resources that are shared between the three CRTCs
(mostly related to input and output routing). For this reason the
R8A7790 DU must be modeled as a single device with three CRTCs, two sets
of "semi-global" resources, and a few device-global resources.
Introduce a new rcar_du_group driver-specific object, without any real
counterpart in the DU documentation, that models those semi-global
resources.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Diffstat (limited to 'drivers/gpu/drm/rcar-du/rcar_du_kms.c')
-rw-r--r-- | drivers/gpu/drm/rcar-du/rcar_du_kms.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_kms.c b/drivers/gpu/drm/rcar-du/rcar_du_kms.c index a1343fbde57a..c32e0f9d4823 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_kms.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_kms.c @@ -174,17 +174,20 @@ int rcar_du_modeset_init(struct rcar_du_device *rcdu) rcdu->ddev->mode_config.max_height = 2047; rcdu->ddev->mode_config.funcs = &rcar_du_mode_config_funcs; - ret = rcar_du_planes_init(rcdu); + rcdu->group.dev = rcdu; + rcdu->group.index = 0; + rcdu->group.used_crtcs = 0; + + ret = rcar_du_planes_init(&rcdu->group); if (ret < 0) return ret; for (i = 0; i < ARRAY_SIZE(rcdu->crtcs); ++i) { - ret = rcar_du_crtc_create(rcdu, i); + ret = rcar_du_crtc_create(&rcdu->group, i); if (ret < 0) return ret; } - rcdu->used_crtcs = 0; rcdu->num_crtcs = i; for (i = 0; i < rcdu->pdata->num_encoders; ++i) { @@ -215,7 +218,7 @@ int rcar_du_modeset_init(struct rcar_du_device *rcdu) encoder->possible_clones = 1 << 0; } - ret = rcar_du_planes_register(rcdu); + ret = rcar_du_planes_register(&rcdu->group); if (ret < 0) return ret; |