diff options
author | Joonyoung Shim <jy0922.shim@samsung.com> | 2015-04-07 02:59:38 -0400 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2015-04-12 22:39:41 -0400 |
commit | cb8a3db29f8fa8186185ba716f3f485a7f3fabe7 (patch) | |
tree | c5b5e88c568f92c83b02dd9bc3d9bec214b06e2a /drivers/gpu | |
parent | 2611015c7511106719bae904cac459383c55ffef (diff) |
drm/exynos: use src_x and src_y instead of fb_x and fb_y
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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos7_drm_decon.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_drv.h | 16 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_fimd.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_plane.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_mixer.c | 8 |
5 files changed, 20 insertions, 20 deletions
diff --git a/drivers/gpu/drm/exynos/exynos7_drm_decon.c b/drivers/gpu/drm/exynos/exynos7_drm_decon.c index 84a3638c69a6..1f7e33f59de6 100644 --- a/drivers/gpu/drm/exynos/exynos7_drm_decon.c +++ b/drivers/gpu/drm/exynos/exynos7_drm_decon.c | |||
@@ -440,8 +440,8 @@ static void decon_win_commit(struct exynos_drm_crtc *crtc, unsigned int win) | |||
440 | writel(plane->fb_height, ctx->regs + VIDW_WHOLE_Y(win)); | 440 | writel(plane->fb_height, ctx->regs + VIDW_WHOLE_Y(win)); |
441 | 441 | ||
442 | /* offset from the start of the buffer to read */ | 442 | /* offset from the start of the buffer to read */ |
443 | writel(plane->fb_x, ctx->regs + VIDW_OFFSET_X(win)); | 443 | writel(plane->src_x, ctx->regs + VIDW_OFFSET_X(win)); |
444 | writel(plane->fb_y, ctx->regs + VIDW_OFFSET_Y(win)); | 444 | writel(plane->src_y, ctx->regs + VIDW_OFFSET_Y(win)); |
445 | 445 | ||
446 | DRM_DEBUG_KMS("start addr = 0x%lx\n", | 446 | DRM_DEBUG_KMS("start addr = 0x%lx\n", |
447 | (unsigned long)val); | 447 | (unsigned long)val); |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h index a1013aa8a900..8e925838d047 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.h +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h | |||
@@ -47,14 +47,14 @@ enum exynos_drm_output_type { | |||
47 | * Exynos drm common overlay structure. | 47 | * Exynos drm common overlay structure. |
48 | * | 48 | * |
49 | * @base: plane object | 49 | * @base: plane object |
50 | * @fb_x: offset x on a framebuffer to be displayed. | 50 | * @src_x: offset x on a framebuffer to be displayed. |
51 | * - the unit is screen coordinates. | 51 | * - the unit is screen coordinates. |
52 | * @fb_y: offset y on a framebuffer to be displayed. | 52 | * @src_y: offset y on a framebuffer to be displayed. |
53 | * - the unit is screen coordinates. | 53 | * - the unit is screen coordinates. |
54 | * @fb_width: width of a framebuffer. | ||
55 | * @fb_height: height of a framebuffer. | ||
56 | * @src_width: width of a partial image to be displayed from framebuffer. | 54 | * @src_width: width of a partial image to be displayed from framebuffer. |
57 | * @src_height: height of a partial image to be displayed from framebuffer. | 55 | * @src_height: height of a partial image to be displayed from framebuffer. |
56 | * @fb_width: width of a framebuffer. | ||
57 | * @fb_height: height of a framebuffer. | ||
58 | * @crtc_x: offset x on hardware screen. | 58 | * @crtc_x: offset x on hardware screen. |
59 | * @crtc_y: offset y on hardware screen. | 59 | * @crtc_y: offset y on hardware screen. |
60 | * @crtc_width: window width to be displayed (hardware screen). | 60 | * @crtc_width: window width to be displayed (hardware screen). |
@@ -85,12 +85,12 @@ enum exynos_drm_output_type { | |||
85 | 85 | ||
86 | struct exynos_drm_plane { | 86 | struct exynos_drm_plane { |
87 | struct drm_plane base; | 87 | struct drm_plane base; |
88 | unsigned int fb_x; | 88 | unsigned int src_x; |
89 | unsigned int fb_y; | 89 | unsigned int src_y; |
90 | unsigned int fb_width; | ||
91 | unsigned int fb_height; | ||
92 | unsigned int src_width; | 90 | unsigned int src_width; |
93 | unsigned int src_height; | 91 | unsigned int src_height; |
92 | unsigned int fb_width; | ||
93 | unsigned int fb_height; | ||
94 | unsigned int crtc_x; | 94 | unsigned int crtc_x; |
95 | unsigned int crtc_y; | 95 | unsigned int crtc_y; |
96 | unsigned int crtc_width; | 96 | unsigned int crtc_width; |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 7964b278eefb..f0390411bb20 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c | |||
@@ -653,8 +653,8 @@ static void fimd_win_commit(struct exynos_drm_crtc *crtc, unsigned int win) | |||
653 | fimd_shadow_protect_win(ctx, win, true); | 653 | fimd_shadow_protect_win(ctx, win, true); |
654 | 654 | ||
655 | 655 | ||
656 | offset = plane->fb_x * (plane->bpp >> 3); | 656 | offset = plane->src_x * (plane->bpp >> 3); |
657 | offset += plane->fb_y * plane->pitch; | 657 | offset += plane->src_y * plane->pitch; |
658 | 658 | ||
659 | /* buffer start address */ | 659 | /* buffer start address */ |
660 | dma_addr = plane->dma_addr[0] + offset; | 660 | dma_addr = plane->dma_addr[0] + offset; |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_plane.c b/drivers/gpu/drm/exynos/exynos_drm_plane.c index 043a6ba2e842..5cb4ced9c4b5 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_plane.c +++ b/drivers/gpu/drm/exynos/exynos_drm_plane.c | |||
@@ -111,12 +111,12 @@ void exynos_plane_mode_set(struct drm_plane *plane, struct drm_crtc *crtc, | |||
111 | } | 111 | } |
112 | 112 | ||
113 | /* set drm framebuffer data. */ | 113 | /* set drm framebuffer data. */ |
114 | exynos_plane->fb_x = src_x; | 114 | exynos_plane->src_x = src_x; |
115 | exynos_plane->fb_y = src_y; | 115 | exynos_plane->src_y = src_y; |
116 | exynos_plane->fb_width = fb->width; | ||
117 | exynos_plane->fb_height = fb->height; | ||
118 | exynos_plane->src_width = src_w; | 116 | exynos_plane->src_width = src_w; |
119 | exynos_plane->src_height = src_h; | 117 | exynos_plane->src_height = src_h; |
118 | exynos_plane->fb_width = fb->width; | ||
119 | exynos_plane->fb_height = fb->height; | ||
120 | exynos_plane->bpp = fb->bits_per_pixel; | 120 | exynos_plane->bpp = fb->bits_per_pixel; |
121 | exynos_plane->pitch = fb->pitches[0]; | 121 | exynos_plane->pitch = fb->pitches[0]; |
122 | exynos_plane->pixel_format = fb->pixel_format; | 122 | exynos_plane->pixel_format = fb->pixel_format; |
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index b95ed919a36f..ede402bda086 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c | |||
@@ -457,8 +457,8 @@ static void vp_video_buffer(struct mixer_context *ctx, int win) | |||
457 | vp_reg_write(res, VP_SRC_WIDTH, plane->src_width); | 457 | vp_reg_write(res, VP_SRC_WIDTH, plane->src_width); |
458 | vp_reg_write(res, VP_SRC_HEIGHT, plane->src_height); | 458 | vp_reg_write(res, VP_SRC_HEIGHT, plane->src_height); |
459 | vp_reg_write(res, VP_SRC_H_POSITION, | 459 | vp_reg_write(res, VP_SRC_H_POSITION, |
460 | VP_SRC_H_POSITION_VAL(plane->fb_x)); | 460 | VP_SRC_H_POSITION_VAL(plane->src_x)); |
461 | vp_reg_write(res, VP_SRC_V_POSITION, plane->fb_y); | 461 | vp_reg_write(res, VP_SRC_V_POSITION, plane->src_y); |
462 | 462 | ||
463 | vp_reg_write(res, VP_DST_WIDTH, plane->crtc_width); | 463 | vp_reg_write(res, VP_DST_WIDTH, plane->crtc_width); |
464 | vp_reg_write(res, VP_DST_H_POSITION, plane->crtc_x); | 464 | 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) | |||
561 | 561 | ||
562 | /* converting dma address base and source offset */ | 562 | /* converting dma address base and source offset */ |
563 | dma_addr = plane->dma_addr[0] | 563 | dma_addr = plane->dma_addr[0] |
564 | + (plane->fb_x * plane->bpp >> 3) | 564 | + (plane->src_x * plane->bpp >> 3) |
565 | + (plane->fb_y * plane->pitch); | 565 | + (plane->src_y * plane->pitch); |
566 | src_x_offset = 0; | 566 | src_x_offset = 0; |
567 | src_y_offset = 0; | 567 | src_y_offset = 0; |
568 | 568 | ||