diff options
author | Sean Paul <seanpaul@chromium.org> | 2017-06-27 15:18:17 +0200 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2017-06-27 15:18:17 +0200 |
commit | b740e76936c14354a9c5676a3eed839ea8472c41 (patch) | |
tree | dd0b74f64007dba28fcf12595af893e367d307ff /drivers/gpu/drm/sun4i/sun4i_layer.c | |
parent | drm/atomic-helper: Simplify commit tracking locking (diff) | |
parent | Backmerge tag 'v4.12-rc7' into drm-next (diff) | |
download | linux-b740e76936c14354a9c5676a3eed839ea8472c41.tar.xz linux-b740e76936c14354a9c5676a3eed839ea8472c41.zip |
Merge remote-tracking branch 'airlied/drm-next' into drm-misc-next
Required for Daniel's drm_vblank_cleanup cleanup
Diffstat (limited to 'drivers/gpu/drm/sun4i/sun4i_layer.c')
-rw-r--r-- | drivers/gpu/drm/sun4i/sun4i_layer.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/gpu/drm/sun4i/sun4i_layer.c b/drivers/gpu/drm/sun4i/sun4i_layer.c index f26bde5b9117..ead4f9d4c1ee 100644 --- a/drivers/gpu/drm/sun4i/sun4i_layer.c +++ b/drivers/gpu/drm/sun4i/sun4i_layer.c @@ -11,12 +11,12 @@ */ #include <drm/drm_atomic_helper.h> -#include <drm/drm_crtc.h> #include <drm/drm_plane_helper.h> #include <drm/drmP.h> #include "sun4i_backend.h" #include "sun4i_layer.h" +#include "sunxi_engine.h" struct sun4i_plane_desc { enum drm_plane_type type; @@ -128,15 +128,16 @@ static struct sun4i_layer *sun4i_layer_init_one(struct drm_device *drm, return layer; } -struct sun4i_layer **sun4i_layers_init(struct drm_device *drm, - struct sun4i_backend *backend) +struct drm_plane **sun4i_layers_init(struct drm_device *drm, + struct sunxi_engine *engine) { - struct sun4i_layer **layers; + struct drm_plane **planes; + struct sun4i_backend *backend = engine_to_sun4i_backend(engine); int i; - layers = devm_kcalloc(drm->dev, ARRAY_SIZE(sun4i_backend_planes) + 1, - sizeof(*layers), GFP_KERNEL); - if (!layers) + planes = devm_kcalloc(drm->dev, ARRAY_SIZE(sun4i_backend_planes) + 1, + sizeof(*planes), GFP_KERNEL); + if (!planes) return ERR_PTR(-ENOMEM); /* @@ -173,13 +174,13 @@ struct sun4i_layer **sun4i_layers_init(struct drm_device *drm, DRM_DEBUG_DRIVER("Assigning %s plane to pipe %d\n", i ? "overlay" : "primary", plane->pipe); - regmap_update_bits(backend->regs, SUN4I_BACKEND_ATTCTL_REG0(i), + regmap_update_bits(engine->regs, SUN4I_BACKEND_ATTCTL_REG0(i), SUN4I_BACKEND_ATTCTL_REG0_LAY_PIPESEL_MASK, SUN4I_BACKEND_ATTCTL_REG0_LAY_PIPESEL(plane->pipe)); layer->id = i; - layers[i] = layer; + planes[i] = &layer->plane; }; - return layers; + return planes; } |