drm/exynos: use src_x and src_y instead of fb_x and fb_y
authorJoonyoung Shim <jy0922.shim@samsung.com>
Tue, 7 Apr 2015 06:59:38 +0000 (15:59 +0900)
committerInki Dae <inki.dae@samsung.com>
Mon, 13 Apr 2015 02:39:41 +0000 (11:39 +0900)
It's more reasonable to use src_x and src_y to represent source as
counterpart of destination(crtc). Already we are using src_width and
src_height for width and height of source.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos7_drm_decon.c
drivers/gpu/drm/exynos/exynos_drm_drv.h
drivers/gpu/drm/exynos/exynos_drm_fimd.c
drivers/gpu/drm/exynos/exynos_drm_plane.c
drivers/gpu/drm/exynos/exynos_mixer.c

index 84a3638c69a63783a518235ec63381dd20bae2a0..1f7e33f59de69e3ecf6c4f4ac865c1746d491d8d 100644 (file)
@@ -440,8 +440,8 @@ static void decon_win_commit(struct exynos_drm_crtc *crtc, unsigned int win)
        writel(plane->fb_height, ctx->regs + VIDW_WHOLE_Y(win));
 
        /* offset from the start of the buffer to read */
-       writel(plane->fb_x, ctx->regs + VIDW_OFFSET_X(win));
-       writel(plane->fb_y, ctx->regs + VIDW_OFFSET_Y(win));
+       writel(plane->src_x, ctx->regs + VIDW_OFFSET_X(win));
+       writel(plane->src_y, ctx->regs + VIDW_OFFSET_Y(win));
 
        DRM_DEBUG_KMS("start addr = 0x%lx\n",
                        (unsigned long)val);
index a1013aa8a9006bb8e851aecf8060061a53a55d5f..8e925838d047483aaf091be7586650674e87858f 100644 (file)
@@ -47,14 +47,14 @@ enum exynos_drm_output_type {
  * Exynos drm common overlay structure.
  *
  * @base: plane object
- * @fb_x: offset x on a framebuffer to be displayed.
+ * @src_x: offset x on a framebuffer to be displayed.
  *     - the unit is screen coordinates.
- * @fb_y: offset y on a framebuffer to be displayed.
+ * @src_y: offset y on a framebuffer to be displayed.
  *     - the unit is screen coordinates.
- * @fb_width: width of a framebuffer.
- * @fb_height: height of a framebuffer.
  * @src_width: width of a partial image to be displayed from framebuffer.
  * @src_height: height of a partial image to be displayed from framebuffer.
+ * @fb_width: width of a framebuffer.
+ * @fb_height: height of a framebuffer.
  * @crtc_x: offset x on hardware screen.
  * @crtc_y: offset y on hardware screen.
  * @crtc_width: window width to be displayed (hardware screen).
@@ -85,12 +85,12 @@ enum exynos_drm_output_type {
 
 struct exynos_drm_plane {
        struct drm_plane base;
-       unsigned int fb_x;
-       unsigned int fb_y;
-       unsigned int fb_width;
-       unsigned int fb_height;
+       unsigned int src_x;
+       unsigned int src_y;
        unsigned int src_width;
        unsigned int src_height;
+       unsigned int fb_width;
+       unsigned int fb_height;
        unsigned int crtc_x;
        unsigned int crtc_y;
        unsigned int crtc_width;
index 7964b278eefb7dd42c08c439d8c04d5b5703cd72..f0390411bb20e6c87d59f59bcd6ba150e21be115 100644 (file)
@@ -653,8 +653,8 @@ static void fimd_win_commit(struct exynos_drm_crtc *crtc, unsigned int win)
        fimd_shadow_protect_win(ctx, win, true);
 
 
-       offset = plane->fb_x * (plane->bpp >> 3);
-       offset += plane->fb_y * plane->pitch;
+       offset = plane->src_x * (plane->bpp >> 3);
+       offset += plane->src_y * plane->pitch;
 
        /* buffer start address */
        dma_addr = plane->dma_addr[0] + offset;
index 043a6ba2e842654c7b3a01d352e4a552f395164c..5cb4ced9c4b5e9c95b0b414e30151ab428e01130 100644 (file)
@@ -111,12 +111,12 @@ void exynos_plane_mode_set(struct drm_plane *plane, struct drm_crtc *crtc,
        }
 
        /* set drm framebuffer data. */
-       exynos_plane->fb_x = src_x;
-       exynos_plane->fb_y = src_y;
-       exynos_plane->fb_width = fb->width;
-       exynos_plane->fb_height = fb->height;
+       exynos_plane->src_x = src_x;
+       exynos_plane->src_y = src_y;
        exynos_plane->src_width = src_w;
        exynos_plane->src_height = src_h;
+       exynos_plane->fb_width = fb->width;
+       exynos_plane->fb_height = fb->height;
        exynos_plane->bpp = fb->bits_per_pixel;
        exynos_plane->pitch = fb->pitches[0];
        exynos_plane->pixel_format = fb->pixel_format;
index b95ed919a36fedebdacc20f6e272da48c2161bb4..ede402bda086d6cfb31e6f11c42246f39f623342 100644 (file)
@@ -457,8 +457,8 @@ static void vp_video_buffer(struct mixer_context *ctx, int win)
        vp_reg_write(res, VP_SRC_WIDTH, plane->src_width);
        vp_reg_write(res, VP_SRC_HEIGHT, plane->src_height);
        vp_reg_write(res, VP_SRC_H_POSITION,
-                       VP_SRC_H_POSITION_VAL(plane->fb_x));
-       vp_reg_write(res, VP_SRC_V_POSITION, plane->fb_y);
+                       VP_SRC_H_POSITION_VAL(plane->src_x));
+       vp_reg_write(res, VP_SRC_V_POSITION, plane->src_y);
 
        vp_reg_write(res, VP_DST_WIDTH, plane->crtc_width);
        vp_reg_write(res, VP_DST_H_POSITION, plane->crtc_x);
@@ -561,8 +561,8 @@ static void mixer_graph_buffer(struct mixer_context *ctx, int win)
 
        /* converting dma address base and source offset */
        dma_addr = plane->dma_addr[0]
-               + (plane->fb_x * plane->bpp >> 3)
-               + (plane->fb_y * plane->pitch);
+               + (plane->src_x * plane->bpp >> 3)
+               + (plane->src_y * plane->pitch);
        src_x_offset = 0;
        src_y_offset = 0;