Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d88d2463 authored by Gustavo Padovan's avatar Gustavo Padovan Committed by Inki Dae
Browse files

drm/exynos: unify exynos_drm_plane names with drm core



Rename crtc_{widht,height} to crtc_{w,h} and src_{width,height} to
src_{w,h} to make it similar to the atomic state names.

Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: default avatarJoonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent a1bcc9da
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -237,8 +237,8 @@ static void decon_update_plane(struct exynos_drm_crtc *crtc,
	val = COORDINATE_X(plane->crtc_x) | COORDINATE_Y(plane->crtc_y);
	writel(val, ctx->addr + DECON_VIDOSDxA(win));

	val = COORDINATE_X(plane->crtc_x + plane->crtc_width - 1) |
		COORDINATE_Y(plane->crtc_y + plane->crtc_height - 1);
	val = COORDINATE_X(plane->crtc_x + plane->crtc_w - 1) |
		COORDINATE_Y(plane->crtc_y + plane->crtc_h - 1);
	writel(val, ctx->addr + DECON_VIDOSDxB(win));

	val = VIDOSD_Wx_ALPHA_R_F(0x0) | VIDOSD_Wx_ALPHA_G_F(0x0) |
@@ -251,11 +251,11 @@ static void decon_update_plane(struct exynos_drm_crtc *crtc,

	writel(plane->dma_addr[0], ctx->addr + DECON_VIDW0xADD0B0(win));

	val = plane->dma_addr[0] + pitch * plane->crtc_height;
	val = plane->dma_addr[0] + pitch * plane->crtc_h;
	writel(val, ctx->addr + DECON_VIDW0xADD1B0(win));

	val = OFFSIZE(pitch - plane->crtc_width * bpp)
		| PAGEWIDTH(plane->crtc_width * bpp);
	val = OFFSIZE(pitch - plane->crtc_w * bpp)
		| PAGEWIDTH(plane->crtc_w * bpp);
	writel(val, ctx->addr + DECON_VIDW0xADD2(win));

	decon_win_set_pixfmt(ctx, win, state->fb);
+7 −7
Original line number Diff line number Diff line
@@ -430,25 +430,25 @@ static void decon_update_plane(struct exynos_drm_crtc *crtc,
	DRM_DEBUG_KMS("start addr = 0x%lx\n",
			(unsigned long)val);
	DRM_DEBUG_KMS("ovl_width = %d, ovl_height = %d\n",
			plane->crtc_width, plane->crtc_height);
			plane->crtc_w, plane->crtc_h);

	/*
	 * OSD position.
	 * In case the window layout goes of LCD layout, DECON fails.
	 */
	if ((plane->crtc_x + plane->crtc_width) > mode->hdisplay)
		plane->crtc_x = mode->hdisplay - plane->crtc_width;
	if ((plane->crtc_y + plane->crtc_height) > mode->vdisplay)
		plane->crtc_y = mode->vdisplay - plane->crtc_height;
	if ((plane->crtc_x + plane->crtc_w) > mode->hdisplay)
		plane->crtc_x = mode->hdisplay - plane->crtc_w;
	if ((plane->crtc_y + plane->crtc_h) > mode->vdisplay)
		plane->crtc_y = mode->vdisplay - plane->crtc_h;

	val = VIDOSDxA_TOPLEFT_X(plane->crtc_x) |
		VIDOSDxA_TOPLEFT_Y(plane->crtc_y);
	writel(val, ctx->regs + VIDOSD_A(win));

	last_x = plane->crtc_x + plane->crtc_width;
	last_x = plane->crtc_x + plane->crtc_w;
	if (last_x)
		last_x--;
	last_y = plane->crtc_y + plane->crtc_height;
	last_y = plane->crtc_y + plane->crtc_h;
	if (last_y)
		last_y--;

+8 −8
Original line number Diff line number Diff line
@@ -44,12 +44,12 @@ enum exynos_drm_output_type {
 *	- the unit is screen coordinates.
 * @src_y: offset y on a framebuffer to be displayed.
 *	- the unit is screen coordinates.
 * @src_width: width of a partial image to be displayed from framebuffer.
 * @src_height: height of a partial image to be displayed from framebuffer.
 * @src_w: width of a partial image to be displayed from framebuffer.
 * @src_h: height of a partial image to be displayed from framebuffer.
 * @crtc_x: offset x on hardware screen.
 * @crtc_y: offset y on hardware screen.
 * @crtc_width: window width to be displayed (hardware screen).
 * @crtc_height: window height to be displayed (hardware screen).
 * @crtc_w: window width to be displayed (hardware screen).
 * @crtc_h: window height to be displayed (hardware screen).
 * @h_ratio: horizontal scaling ratio, 16.16 fixed point
 * @v_ratio: vertical scaling ratio, 16.16 fixed point
 * @dma_addr: array of bus(accessed by dma) address to the memory region
@@ -64,12 +64,12 @@ struct exynos_drm_plane {
	struct drm_plane base;
	unsigned int src_x;
	unsigned int src_y;
	unsigned int src_width;
	unsigned int src_height;
	unsigned int src_w;
	unsigned int src_h;
	unsigned int crtc_x;
	unsigned int crtc_y;
	unsigned int crtc_width;
	unsigned int crtc_height;
	unsigned int crtc_w;
	unsigned int crtc_h;
	unsigned int h_ratio;
	unsigned int v_ratio;
	dma_addr_t dma_addr[MAX_FB_BUFFER];
+7 −7
Original line number Diff line number Diff line
@@ -645,18 +645,18 @@ static void fimd_update_plane(struct exynos_drm_crtc *crtc,
	writel(val, ctx->regs + VIDWx_BUF_START(win, 0));

	/* buffer end address */
	size = pitch * plane->crtc_height;
	size = pitch * plane->crtc_h;
	val = (unsigned long)(dma_addr + size);
	writel(val, ctx->regs + VIDWx_BUF_END(win, 0));

	DRM_DEBUG_KMS("start addr = 0x%lx, end addr = 0x%lx, size = 0x%lx\n",
			(unsigned long)dma_addr, val, size);
	DRM_DEBUG_KMS("ovl_width = %d, ovl_height = %d\n",
			plane->crtc_width, plane->crtc_height);
			plane->crtc_w, plane->crtc_h);

	/* buffer size */
	buf_offsize = pitch - (plane->crtc_width * bpp);
	line_size = plane->crtc_width * bpp;
	buf_offsize = pitch - (plane->crtc_w * bpp);
	line_size = plane->crtc_w * bpp;
	val = VIDW_BUF_SIZE_OFFSET(buf_offsize) |
		VIDW_BUF_SIZE_PAGEWIDTH(line_size) |
		VIDW_BUF_SIZE_OFFSET_E(buf_offsize) |
@@ -670,10 +670,10 @@ static void fimd_update_plane(struct exynos_drm_crtc *crtc,
		VIDOSDxA_TOPLEFT_Y_E(plane->crtc_y);
	writel(val, ctx->regs + VIDOSD_A(win));

	last_x = plane->crtc_x + plane->crtc_width;
	last_x = plane->crtc_x + plane->crtc_w;
	if (last_x)
		last_x--;
	last_y = plane->crtc_y + plane->crtc_height;
	last_y = plane->crtc_y + plane->crtc_h;
	if (last_y)
		last_y--;

@@ -690,7 +690,7 @@ static void fimd_update_plane(struct exynos_drm_crtc *crtc,
		u32 offset = VIDOSD_D(win);
		if (win == 0)
			offset = VIDOSD_C(win);
		val = plane->crtc_width * plane->crtc_height;
		val = plane->crtc_w * plane->crtc_h;
		writel(val, ctx->regs + offset);

		DRM_DEBUG_KMS("osd size = 0x%x\n", (unsigned int)val);
+6 −5
Original line number Diff line number Diff line
@@ -97,17 +97,18 @@ static void exynos_plane_mode_set(struct drm_plane *plane,
	/* set drm framebuffer data. */
	exynos_plane->src_x = src_x;
	exynos_plane->src_y = src_y;
	exynos_plane->src_width = (actual_w * exynos_plane->h_ratio) >> 16;
	exynos_plane->src_height = (actual_h * exynos_plane->v_ratio) >> 16;
	exynos_plane->src_w = (actual_w * exynos_plane->h_ratio) >> 16;
	exynos_plane->src_h = (actual_h * exynos_plane->v_ratio) >> 16;

	/* set plane range to be displayed. */
	exynos_plane->crtc_x = crtc_x;
	exynos_plane->crtc_y = crtc_y;
	exynos_plane->crtc_width = actual_w;
	exynos_plane->crtc_height = actual_h;
	exynos_plane->crtc_w = actual_w;
	exynos_plane->crtc_h = actual_h;

	DRM_DEBUG_KMS("plane : offset_x/y(%d,%d), width/height(%d,%d)",
			exynos_plane->crtc_x, exynos_plane->crtc_y,
			exynos_plane->crtc_width, exynos_plane->crtc_height);
			exynos_plane->crtc_w, exynos_plane->crtc_h);

	plane->crtc = crtc;
}
Loading