Linux Samsung SOC development
 help / color / mirror / Atom feed
From: Inki Dae <inki.dae@samsung.com>
To: Hoegeun Kwon <hoegeun.kwon@samsung.com>, dri-devel@lists.freedesktop.org
Cc: linux-samsung-soc@vger.kernel.org
Subject: Re: [PATCH] drm/exynos/gsc: fix the hardware limitations
Date: Thu, 24 Nov 2016 17:12:41 +0900	[thread overview]
Message-ID: <5836A0F9.8070705@samsung.com> (raw)
In-Reply-To: <1479973896-26902-1-git-send-email-hoegeun.kwon@samsung.com>



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

      reply	other threads:[~2016-11-24  8:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5836A0F9.8070705@samsung.com \
    --to=inki.dae@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hoegeun.kwon@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox