* [PATCH] drm/exynos/gsc: fix the hardware limitations
@ 2016-11-24 7:51 ` Hoegeun Kwon
2016-11-24 8:12 ` Inki Dae
0 siblings, 1 reply; 2+ messages in thread
From: Hoegeun Kwon @ 2016-11-24 7:51 UTC (permalink / raw)
To: inki.dae, dri-devel; +Cc: linux-samsung-soc, hoegeun.kwon
The maximum size of input or output rotation is 2047 x 2047.
Fixed an error on limitations.
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
---
drivers/gpu/drm/exynos/exynos_drm_gsc.c | 11 +++++++++--
include/uapi/drm/exynos_drm.h | 2 ++
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gsc.c b/drivers/gpu/drm/exynos/exynos_drm_gsc.c
index bef5798..36e05ae 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_gsc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_gsc.c
@@ -71,6 +71,7 @@
#define GSC_CROP_MIN 32
#define GSC_SCALE_MAX 4224
#define GSC_SCALE_MIN 32
+#define GSC_ROT_MAX 2047
#define GSC_COEF_RATIO 7
#define GSC_COEF_PHASE 9
#define GSC_COEF_ATTR 16
@@ -1371,6 +1372,8 @@ static int gsc_init_prop_list(struct exynos_drm_ippdrv *ippdrv)
prop_list->scale_max.vsize = GSC_SCALE_MAX;
prop_list->scale_min.hsize = GSC_SCALE_MIN;
prop_list->scale_min.vsize = GSC_SCALE_MIN;
+ prop_list->rot_max.hsize = GSC_ROT_MAX;
+ prop_list->rot_max.vsize = GSC_ROT_MAX;
return 0;
}
@@ -1444,7 +1447,9 @@ static int gsc_ippdrv_check_property(struct device *dev,
if ((pos->h < pp->crop_min.hsize) ||
(sz->vsize > pp->crop_max.hsize) ||
(pos->w < pp->crop_min.vsize) ||
- (sz->hsize > pp->crop_max.vsize)) {
+ (sz->hsize > pp->crop_max.vsize) ||
+ (pos->h > pp->rot_max.hsize) ||
+ (pos->w > pp->rot_max.vsize)) {
DRM_ERROR("out of crop size.\n");
goto err_property;
}
@@ -1465,7 +1470,9 @@ static int gsc_ippdrv_check_property(struct device *dev,
if ((pos->h < pp->scale_min.hsize) ||
(sz->vsize > pp->scale_max.hsize) ||
(pos->w < pp->scale_min.vsize) ||
- (sz->hsize > pp->scale_max.vsize)) {
+ (sz->hsize > pp->scale_max.vsize) ||
+ (pos->h > pp->rot_max.hsize) ||
+ (pos->w > pp->rot_max.vsize)) {
DRM_ERROR("out of scale size.\n");
goto err_property;
}
diff --git a/include/uapi/drm/exynos_drm.h b/include/uapi/drm/exynos_drm.h
index cb3e9f9..d5d5518 100644
--- a/include/uapi/drm/exynos_drm.h
+++ b/include/uapi/drm/exynos_drm.h
@@ -192,6 +192,7 @@ enum drm_exynos_planer {
* @crop_max: crop max resolution.
* @scale_min: scale min resolution.
* @scale_max: scale max resolution.
+ * @rot_max: rotation max resolution.
*/
struct drm_exynos_ipp_prop_list {
__u32 version;
@@ -210,6 +211,7 @@ struct drm_exynos_ipp_prop_list {
struct drm_exynos_sz crop_max;
struct drm_exynos_sz scale_min;
struct drm_exynos_sz scale_max;
+ struct drm_exynos_sz rot_max;
};
/**
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/exynos/gsc: fix the hardware limitations
2016-11-24 7:51 ` [PATCH] drm/exynos/gsc: fix the hardware limitations Hoegeun Kwon
@ 2016-11-24 8:12 ` Inki Dae
0 siblings, 0 replies; 2+ messages in thread
From: Inki Dae @ 2016-11-24 8:12 UTC (permalink / raw)
To: Hoegeun Kwon, dri-devel; +Cc: linux-samsung-soc
2016년 11월 24일 16:51에 Hoegeun Kwon 이(가) 쓴 글:
> The maximum size of input or output rotation is 2047 x 2047.
> Fixed an error on limitations.
You would need to consider other SoC - Exynos5250/5250/5410/5420/5433 because other have different rotation limitations like below,
Exynos5250
Maximum size : 2048x2048 for Tile Mode or Rotation
Exynos5410/5420
Maximum size : 2016x2016 for Tile mode or Rotation
In case of Exynos5433, it seems more complicated. Refer to Chapter 45.5.4 Size Constraints of TRM document.
Thanks.
>
> Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
> ---
> drivers/gpu/drm/exynos/exynos_drm_gsc.c | 11 +++++++++--
> include/uapi/drm/exynos_drm.h | 2 ++
> 2 files changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_gsc.c b/drivers/gpu/drm/exynos/exynos_drm_gsc.c
> index bef5798..36e05ae 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_gsc.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_gsc.c
> @@ -71,6 +71,7 @@
> #define GSC_CROP_MIN 32
> #define GSC_SCALE_MAX 4224
> #define GSC_SCALE_MIN 32
> +#define GSC_ROT_MAX 2047
> #define GSC_COEF_RATIO 7
> #define GSC_COEF_PHASE 9
> #define GSC_COEF_ATTR 16
> @@ -1371,6 +1372,8 @@ static int gsc_init_prop_list(struct exynos_drm_ippdrv *ippdrv)
> prop_list->scale_max.vsize = GSC_SCALE_MAX;
> prop_list->scale_min.hsize = GSC_SCALE_MIN;
> prop_list->scale_min.vsize = GSC_SCALE_MIN;
> + prop_list->rot_max.hsize = GSC_ROT_MAX;
> + prop_list->rot_max.vsize = GSC_ROT_MAX;
>
> return 0;
> }
> @@ -1444,7 +1447,9 @@ static int gsc_ippdrv_check_property(struct device *dev,
> if ((pos->h < pp->crop_min.hsize) ||
> (sz->vsize > pp->crop_max.hsize) ||
> (pos->w < pp->crop_min.vsize) ||
> - (sz->hsize > pp->crop_max.vsize)) {
> + (sz->hsize > pp->crop_max.vsize) ||
> + (pos->h > pp->rot_max.hsize) ||
> + (pos->w > pp->rot_max.vsize)) {
> DRM_ERROR("out of crop size.\n");
> goto err_property;
> }
> @@ -1465,7 +1470,9 @@ static int gsc_ippdrv_check_property(struct device *dev,
> if ((pos->h < pp->scale_min.hsize) ||
> (sz->vsize > pp->scale_max.hsize) ||
> (pos->w < pp->scale_min.vsize) ||
> - (sz->hsize > pp->scale_max.vsize)) {
> + (sz->hsize > pp->scale_max.vsize) ||
> + (pos->h > pp->rot_max.hsize) ||
> + (pos->w > pp->rot_max.vsize)) {
> DRM_ERROR("out of scale size.\n");
> goto err_property;
> }
> diff --git a/include/uapi/drm/exynos_drm.h b/include/uapi/drm/exynos_drm.h
> index cb3e9f9..d5d5518 100644
> --- a/include/uapi/drm/exynos_drm.h
> +++ b/include/uapi/drm/exynos_drm.h
> @@ -192,6 +192,7 @@ enum drm_exynos_planer {
> * @crop_max: crop max resolution.
> * @scale_min: scale min resolution.
> * @scale_max: scale max resolution.
> + * @rot_max: rotation max resolution.
> */
> struct drm_exynos_ipp_prop_list {
> __u32 version;
> @@ -210,6 +211,7 @@ struct drm_exynos_ipp_prop_list {
> struct drm_exynos_sz crop_max;
> struct drm_exynos_sz scale_min;
> struct drm_exynos_sz scale_max;
> + struct drm_exynos_sz rot_max;
> };
>
> /**
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-24 8:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20161124075140epcas1p3817fa30557dab14ac56f6b122aa59cee@epcas1p3.samsung.com>
2016-11-24 7:51 ` [PATCH] drm/exynos/gsc: fix the hardware limitations Hoegeun Kwon
2016-11-24 8:12 ` 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.