diff options
author | Steve Longerbeam <slongerbeam@gmail.com> | 2014-06-25 21:05:48 -0400 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2014-08-18 08:17:46 -0400 |
commit | 2eb671c485c06133ff0b568d5ec3c09fda0f4359 (patch) | |
tree | 3de5c19175c786578767a78ca2895561019c45fe | |
parent | 7d2691da901d71ff62ad974510ea7149b391bdfe (diff) |
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>
-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) | |||
62 | int ipu_plane_set_base(struct ipu_plane *ipu_plane, struct drm_framebuffer *fb, | 62 | int ipu_plane_set_base(struct ipu_plane *ipu_plane, struct drm_framebuffer *fb, |
63 | int x, int y) | 63 | int x, int y) |
64 | { | 64 | { |
65 | struct ipu_ch_param __iomem *cpmem; | ||
66 | struct drm_gem_cma_object *cma_obj; | 65 | struct drm_gem_cma_object *cma_obj; |
67 | unsigned long eba; | 66 | unsigned long eba; |
68 | 67 | ||
@@ -75,13 +74,12 @@ int ipu_plane_set_base(struct ipu_plane *ipu_plane, struct drm_framebuffer *fb, | |||
75 | dev_dbg(ipu_plane->base.dev->dev, "phys = %pad, x = %d, y = %d", | 74 | dev_dbg(ipu_plane->base.dev->dev, "phys = %pad, x = %d, y = %d", |
76 | &cma_obj->paddr, x, y); | 75 | &cma_obj->paddr, x, y); |
77 | 76 | ||
78 | cpmem = ipu_get_cpmem(ipu_plane->ipu_ch); | 77 | ipu_cpmem_set_stride(ipu_plane->ipu_ch, fb->pitches[0]); |
79 | ipu_cpmem_set_stride(cpmem, fb->pitches[0]); | ||
80 | 78 | ||
81 | eba = cma_obj->paddr + fb->offsets[0] + | 79 | eba = cma_obj->paddr + fb->offsets[0] + |
82 | fb->pitches[0] * y + (fb->bits_per_pixel >> 3) * x; | 80 | fb->pitches[0] * y + (fb->bits_per_pixel >> 3) * x; |
83 | ipu_cpmem_set_buffer(cpmem, 0, eba); | 81 | ipu_cpmem_set_buffer(ipu_plane->ipu_ch, 0, eba); |
84 | ipu_cpmem_set_buffer(cpmem, 1, eba); | 82 | ipu_cpmem_set_buffer(ipu_plane->ipu_ch, 1, eba); |
85 | 83 | ||
86 | /* cache offsets for subsequent pageflips */ | 84 | /* cache offsets for subsequent pageflips */ |
87 | ipu_plane->x = x; | 85 | ipu_plane->x = x; |
@@ -97,7 +95,6 @@ int ipu_plane_mode_set(struct ipu_plane *ipu_plane, struct drm_crtc *crtc, | |||
97 | uint32_t src_x, uint32_t src_y, | 95 | uint32_t src_x, uint32_t src_y, |
98 | uint32_t src_w, uint32_t src_h) | 96 | uint32_t src_w, uint32_t src_h) |
99 | { | 97 | { |
100 | struct ipu_ch_param __iomem *cpmem; | ||
101 | struct device *dev = ipu_plane->base.dev->dev; | 98 | struct device *dev = ipu_plane->base.dev->dev; |
102 | int ret; | 99 | int ret; |
103 | 100 | ||
@@ -175,10 +172,9 @@ int ipu_plane_mode_set(struct ipu_plane *ipu_plane, struct drm_crtc *crtc, | |||
175 | return ret; | 172 | return ret; |
176 | } | 173 | } |
177 | 174 | ||
178 | cpmem = ipu_get_cpmem(ipu_plane->ipu_ch); | 175 | ipu_cpmem_zero(ipu_plane->ipu_ch); |
179 | ipu_ch_param_zero(cpmem); | 176 | ipu_cpmem_set_resolution(ipu_plane->ipu_ch, src_w, src_h); |
180 | ipu_cpmem_set_resolution(cpmem, src_w, src_h); | 177 | ret = ipu_cpmem_set_fmt(ipu_plane->ipu_ch, fb->pixel_format); |
181 | ret = ipu_cpmem_set_fmt(cpmem, fb->pixel_format); | ||
182 | if (ret < 0) { | 178 | if (ret < 0) { |
183 | dev_err(dev, "unsupported pixel format 0x%08x\n", | 179 | dev_err(dev, "unsupported pixel format 0x%08x\n", |
184 | fb->pixel_format); | 180 | fb->pixel_format); |