All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/3] exynos: fix coordinate computation in g2d_copy
@ 2014-06-01 16:04 Tobias Jakobi
  2014-06-01 16:04 ` [PATCH v2 2/3] exynos: fix G2D_DOUBLE_TO_FIXED for non-integer input Tobias Jakobi
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Tobias Jakobi @ 2014-06-01 16:04 UTC (permalink / raw)
  To: dri-devel; +Cc: Tobias Jakobi

The right-bottom register isn't set correctly.
Looks like a copy-and-paste error.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
---
 exynos/exynos_fimg2d.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/exynos/exynos_fimg2d.c b/exynos/exynos_fimg2d.c
index 0b14618..a565910 100644
--- a/exynos/exynos_fimg2d.c
+++ b/exynos/exynos_fimg2d.c
@@ -382,7 +382,7 @@ int g2d_copy(struct g2d_context *ctx, struct g2d_image *src,
 	g2d_add_cmd(ctx, DST_LEFT_TOP_REG, pt.val);
 	pt.val = 0;
 	pt.data.x = dst_x + w;
-	pt.data.y = dst_x + h;
+	pt.data.y = dst_y + h;
 	g2d_add_cmd(ctx, DST_RIGHT_BOTTOM_REG, pt.val);
 
 	rop4.val = 0;
-- 
1.8.5.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 2/3] exynos: fix G2D_DOUBLE_TO_FIXED for non-integer input
  2014-06-01 16:04 [PATCH v2 1/3] exynos: fix coordinate computation in g2d_copy Tobias Jakobi
@ 2014-06-01 16:04 ` Tobias Jakobi
  2014-06-13  5:05   ` Inki Dae
  2014-06-01 16:04 ` [PATCH v2 3/3] exynos: fix scaling factor computation in g2d_copy_with_scale Tobias Jakobi
  2014-06-13  5:06 ` [PATCH v2 1/3] exynos: fix coordinate computation in g2d_copy Inki Dae
  2 siblings, 1 reply; 6+ messages in thread
From: Tobias Jakobi @ 2014-06-01 16:04 UTC (permalink / raw)
  To: dri-devel; +Cc: Tobias Jakobi

The hardware accepts scaling factors formatted in a
fixed-point format. The current macro casts to integer
first, then multiplies by the fp conversion factor.

This does not make any sense. In particular, truly
'fractional' inputs, like 1.5, won't work that way.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
---
 exynos/fimg2d.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/exynos/fimg2d.h b/exynos/fimg2d.h
index 1aac378..4785e2f 100644
--- a/exynos/fimg2d.h
+++ b/exynos/fimg2d.h
@@ -25,7 +25,7 @@
 #define G2D_MAX_CMD_LIST_NR	64
 #define G2D_PLANE_MAX_NR	2
 
-#define G2D_DOUBLE_TO_FIXED(d)		((unsigned int)(d) * 65536.0)
+#define G2D_DOUBLE_TO_FIXED(d)		((unsigned int)((d) * 65536.0))
 
 enum e_g2d_color_mode {
 	/* COLOR FORMAT */
-- 
1.8.5.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 3/3] exynos: fix scaling factor computation in g2d_copy_with_scale
  2014-06-01 16:04 [PATCH v2 1/3] exynos: fix coordinate computation in g2d_copy Tobias Jakobi
  2014-06-01 16:04 ` [PATCH v2 2/3] exynos: fix G2D_DOUBLE_TO_FIXED for non-integer input Tobias Jakobi
@ 2014-06-01 16:04 ` Tobias Jakobi
  2014-06-13  5:06   ` Inki Dae
  2014-06-13  5:06 ` [PATCH v2 1/3] exynos: fix coordinate computation in g2d_copy Inki Dae
  2 siblings, 1 reply; 6+ messages in thread
From: Tobias Jakobi @ 2014-06-01 16:04 UTC (permalink / raw)
  To: dri-devel; +Cc: Tobias Jakobi

When division of source and destination width yields the
scaling factor for the x-coordinate, then it should be
source/destination _height_ for y.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
---
 exynos/exynos_fimg2d.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/exynos/exynos_fimg2d.c b/exynos/exynos_fimg2d.c
index a565910..fc281b6 100644
--- a/exynos/exynos_fimg2d.c
+++ b/exynos/exynos_fimg2d.c
@@ -451,7 +451,7 @@ int g2d_copy_with_scale(struct g2d_context *ctx, struct g2d_image *src,
 	else {
 		scale = 1;
 		scale_x = (double)src_w / (double)dst_w;
-		scale_y = (double)src_w / (double)dst_h;
+		scale_y = (double)src_h / (double)dst_h;
 	}
 
 	if (src_x + src_w > src->width)
-- 
1.8.5.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 2/3] exynos: fix G2D_DOUBLE_TO_FIXED for non-integer input
  2014-06-01 16:04 ` [PATCH v2 2/3] exynos: fix G2D_DOUBLE_TO_FIXED for non-integer input Tobias Jakobi
@ 2014-06-13  5:05   ` Inki Dae
  0 siblings, 0 replies; 6+ messages in thread
From: Inki Dae @ 2014-06-13  5:05 UTC (permalink / raw)
  To: Tobias Jakobi; +Cc: dri-devel

On 2014년 06월 02일 01:04, Tobias Jakobi wrote:
> The hardware accepts scaling factors formatted in a
> fixed-point format. The current macro casts to integer
> first, then multiplies by the fp conversion factor.
> 
> This does not make any sense. In particular, truly
> 'fractional' inputs, like 1.5, won't work that way.

Signed-off-by: Inki Dae <inki.dae@samsung.com>

Thanks,
Inki Dae

> 
> Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
> ---
>  exynos/fimg2d.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/exynos/fimg2d.h b/exynos/fimg2d.h
> index 1aac378..4785e2f 100644
> --- a/exynos/fimg2d.h
> +++ b/exynos/fimg2d.h
> @@ -25,7 +25,7 @@
>  #define G2D_MAX_CMD_LIST_NR	64
>  #define G2D_PLANE_MAX_NR	2
>  
> -#define G2D_DOUBLE_TO_FIXED(d)		((unsigned int)(d) * 65536.0)
> +#define G2D_DOUBLE_TO_FIXED(d)		((unsigned int)((d) * 65536.0))
>  
>  enum e_g2d_color_mode {
>  	/* COLOR FORMAT */
> 

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/3] exynos: fix coordinate computation in g2d_copy
  2014-06-01 16:04 [PATCH v2 1/3] exynos: fix coordinate computation in g2d_copy Tobias Jakobi
  2014-06-01 16:04 ` [PATCH v2 2/3] exynos: fix G2D_DOUBLE_TO_FIXED for non-integer input Tobias Jakobi
  2014-06-01 16:04 ` [PATCH v2 3/3] exynos: fix scaling factor computation in g2d_copy_with_scale Tobias Jakobi
@ 2014-06-13  5:06 ` Inki Dae
  2 siblings, 0 replies; 6+ messages in thread
From: Inki Dae @ 2014-06-13  5:06 UTC (permalink / raw)
  To: Tobias Jakobi; +Cc: dri-devel

On 2014년 06월 02일 01:04, Tobias Jakobi wrote:
> The right-bottom register isn't set correctly.
> Looks like a copy-and-paste error.

Signed-off-by: Inki Dae <inki.dae@samsung.com>

Thanks,
Inki Dae

> 
> Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
> ---
>  exynos/exynos_fimg2d.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/exynos/exynos_fimg2d.c b/exynos/exynos_fimg2d.c
> index 0b14618..a565910 100644
> --- a/exynos/exynos_fimg2d.c
> +++ b/exynos/exynos_fimg2d.c
> @@ -382,7 +382,7 @@ int g2d_copy(struct g2d_context *ctx, struct g2d_image *src,
>  	g2d_add_cmd(ctx, DST_LEFT_TOP_REG, pt.val);
>  	pt.val = 0;
>  	pt.data.x = dst_x + w;
> -	pt.data.y = dst_x + h;
> +	pt.data.y = dst_y + h;
>  	g2d_add_cmd(ctx, DST_RIGHT_BOTTOM_REG, pt.val);
>  
>  	rop4.val = 0;
> 

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 3/3] exynos: fix scaling factor computation in g2d_copy_with_scale
  2014-06-01 16:04 ` [PATCH v2 3/3] exynos: fix scaling factor computation in g2d_copy_with_scale Tobias Jakobi
@ 2014-06-13  5:06   ` Inki Dae
  0 siblings, 0 replies; 6+ messages in thread
From: Inki Dae @ 2014-06-13  5:06 UTC (permalink / raw)
  To: Tobias Jakobi; +Cc: dri-devel

On 2014년 06월 02일 01:04, Tobias Jakobi wrote:
> When division of source and destination width yields the
> scaling factor for the x-coordinate, then it should be
> source/destination _height_ for y.

Signed-off-by: Inki Dae <inki.dae@samsung.com>

Thanks,
Inki Dae

> 
> Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
> ---
>  exynos/exynos_fimg2d.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/exynos/exynos_fimg2d.c b/exynos/exynos_fimg2d.c
> index a565910..fc281b6 100644
> --- a/exynos/exynos_fimg2d.c
> +++ b/exynos/exynos_fimg2d.c
> @@ -451,7 +451,7 @@ int g2d_copy_with_scale(struct g2d_context *ctx, struct g2d_image *src,
>  	else {
>  		scale = 1;
>  		scale_x = (double)src_w / (double)dst_w;
> -		scale_y = (double)src_w / (double)dst_h;
> +		scale_y = (double)src_h / (double)dst_h;
>  	}
>  
>  	if (src_x + src_w > src->width)
> 

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-06-13  5:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-01 16:04 [PATCH v2 1/3] exynos: fix coordinate computation in g2d_copy Tobias Jakobi
2014-06-01 16:04 ` [PATCH v2 2/3] exynos: fix G2D_DOUBLE_TO_FIXED for non-integer input Tobias Jakobi
2014-06-13  5:05   ` Inki Dae
2014-06-01 16:04 ` [PATCH v2 3/3] exynos: fix scaling factor computation in g2d_copy_with_scale Tobias Jakobi
2014-06-13  5:06   ` Inki Dae
2014-06-13  5:06 ` [PATCH v2 1/3] exynos: fix coordinate computation in g2d_copy Inki Dae

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.