diff options
author | Steve Longerbeam <slongerbeam@gmail.com> | 2014-06-26 03:05:48 +0200 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2014-08-18 14:17:46 +0200 |
commit | 2eb671c485c06133ff0b568d5ec3c09fda0f4359 (patch) | |
tree | 3de5c19175c786578767a78ca2895561019c45fe /drivers | |
parent | gpu: ipu-v3: Add ipu-cpmem unit (diff) | |
download | linux-2eb671c485c06133ff0b568d5ec3c09fda0f4359.tar.xz linux-2eb671c485c06133ff0b568d5ec3c09fda0f4359.zip |
staging: imx-drm: Convert to new ipu_cpmem API
The ipu_cpmem_*() calls now take a channel pointer instead of a
pointer into cpmem for that channel.
Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/imx-drm/ipuv3-plane.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/staging/imx-drm/ipuv3-plane.c b/drivers/staging/imx-drm/ipuv3-plane.c index 6f393a11f44d..6ffe1bbbcf16 100644 --- a/drivers/staging/imx-drm/ipuv3-plane.c +++ b/drivers/staging/imx-drm/ipuv3-plane.c @@ -62,7 +62,6 @@ static inline int calc_bandwidth(int width, int height, unsigned int vref) int ipu_plane_set_base(struct ipu_plane *ipu_plane, struct drm_framebuffer *fb, int x, int y) { - struct ipu_ch_param __iomem *cpmem; struct drm_gem_cma_object *cma_obj; unsigned long eba; @@ -75,13 +74,12 @@ int ipu_plane_set_base(struct ipu_plane *ipu_plane, struct drm_framebuffer *fb, dev_dbg(ipu_plane->base.dev->dev, "phys = %pad, x = %d, y = %d", &cma_obj->paddr, x, y); - cpmem = ipu_get_cpmem(ipu_plane->ipu_ch); - ipu_cpmem_set_stride(cpmem, fb->pitches[0]); + ipu_cpmem_set_stride(ipu_plane->ipu_ch, fb->pitches[0]); eba = cma_obj->paddr + fb->offsets[0] + fb->pitches[0] * y + (fb->bits_per_pixel >> 3) * x; - ipu_cpmem_set_buffer(cpmem, 0, eba); - ipu_cpmem_set_buffer(cpmem, 1, eba); + ipu_cpmem_set_buffer(ipu_plane->ipu_ch, 0, eba); + ipu_cpmem_set_buffer(ipu_plane->ipu_ch, 1, eba); /* cache offsets for subsequent pageflips */ ipu_plane->x = x; @@ -97,7 +95,6 @@ int ipu_plane_mode_set(struct ipu_plane *ipu_plane, struct drm_crtc *crtc, uint32_t src_x, uint32_t src_y, uint32_t src_w, uint32_t src_h) { - struct ipu_ch_param __iomem *cpmem; struct device *dev = ipu_plane->base.dev->dev; int ret; @@ -175,10 +172,9 @@ int ipu_plane_mode_set(struct ipu_plane *ipu_plane, struct drm_crtc *crtc, return ret; } - cpmem = ipu_get_cpmem(ipu_plane->ipu_ch); - ipu_ch_param_zero(cpmem); - ipu_cpmem_set_resolution(cpmem, src_w, src_h); - ret = ipu_cpmem_set_fmt(cpmem, fb->pixel_format); + ipu_cpmem_zero(ipu_plane->ipu_ch); + ipu_cpmem_set_resolution(ipu_plane->ipu_ch, src_w, src_h); + ret = ipu_cpmem_set_fmt(ipu_plane->ipu_ch, fb->pixel_format); if (ret < 0) { dev_err(dev, "unsupported pixel format 0x%08x\n", fb->pixel_format); |