* [PATCH] media:staging/intel-ipu3: update minimal GDC envelope size to 4
@ 2019-02-14 10:56 bingbu.cao
2019-02-15 6:31 ` Tomasz Figa
0 siblings, 1 reply; 2+ messages in thread
From: bingbu.cao @ 2019-02-14 10:56 UTC (permalink / raw)
To: linux-media; +Cc: sakari.ailus, tfiga, andy.yeh, bingbu.cao
From: Bingbu Cao <bingbu.cao@intel.com>
The ipu3 GDC function need some envelope to do filtering and the
minimal envelope size(GDC in - out) for ipu3 should be 4.
Current value 4 was defined for older version GDC, this patch
correct it.
Signed-off-by: Bingbu Cao <bingbu.cao@intel.com>
---
drivers/staging/media/ipu3/ipu3-css.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/media/ipu3/ipu3-css.c b/drivers/staging/media/ipu3/ipu3-css.c
index 44c55639389a..8864206fd7e3 100644
--- a/drivers/staging/media/ipu3/ipu3-css.c
+++ b/drivers/staging/media/ipu3/ipu3-css.c
@@ -23,9 +23,8 @@
#define IPU3_CSS_MAX_H 3136
#define IPU3_CSS_MAX_W 4224
-/* filter size from graph settings is fixed as 4 */
-#define FILTER_SIZE 4
-#define MIN_ENVELOPE 8
+/* minimal envelope size(GDC in - out) should be 4 */
+#define MIN_ENVELOPE 4
/*
* pre-allocated buffer size for CSS ABI, auxiliary frames
@@ -1821,9 +1820,9 @@ int ipu3_css_fmt_try(struct ipu3_css *css,
vf->width = ipu3_css_adjust(vf->width, VF_ALIGN_W);
vf->height = ipu3_css_adjust(vf->height, 1);
- s = (bds->width - gdc->width) / 2 - FILTER_SIZE;
+ s = (bds->width - gdc->width) / 2;
env->width = s < MIN_ENVELOPE ? MIN_ENVELOPE : s;
- s = (bds->height - gdc->height) / 2 - FILTER_SIZE;
+ s = (bds->height - gdc->height) / 2;
env->height = s < MIN_ENVELOPE ? MIN_ENVELOPE : s;
css->pipes[pipe].bindex =
@@ -2245,9 +2244,8 @@ int ipu3_css_set_parameters(struct ipu3_css *css, unsigned int pipe,
css_pipe->aux_frames[a].height,
css_pipe->rect[g].width,
css_pipe->rect[g].height,
- css_pipe->rect[e].width + FILTER_SIZE,
- css_pipe->rect[e].height +
- FILTER_SIZE);
+ css_pipe->rect[e].width,
+ css_pipe->rect[e].height);
}
}
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] media:staging/intel-ipu3: update minimal GDC envelope size to 4
2019-02-14 10:56 [PATCH] media:staging/intel-ipu3: update minimal GDC envelope size to 4 bingbu.cao
@ 2019-02-15 6:31 ` Tomasz Figa
0 siblings, 0 replies; 2+ messages in thread
From: Tomasz Figa @ 2019-02-15 6:31 UTC (permalink / raw)
To: Cao Bing Bu; +Cc: Linux Media Mailing List, Sakari Ailus, Yeh, Andy, Bingbu Cao
Hi Bingbu,
On Thu, Feb 14, 2019 at 7:50 PM <bingbu.cao@intel.com> wrote:
>
> From: Bingbu Cao <bingbu.cao@intel.com>
>
> The ipu3 GDC function need some envelope to do filtering and the
> minimal envelope size(GDC in - out) for ipu3 should be 4.
> Current value 4 was defined for older version GDC, this patch
> correct it.
>
> Signed-off-by: Bingbu Cao <bingbu.cao@intel.com>
> ---
> drivers/staging/media/ipu3/ipu3-css.c | 14 ++++++--------
> 1 file changed, 6 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/staging/media/ipu3/ipu3-css.c b/drivers/staging/media/ipu3/ipu3-css.c
> index 44c55639389a..8864206fd7e3 100644
> --- a/drivers/staging/media/ipu3/ipu3-css.c
> +++ b/drivers/staging/media/ipu3/ipu3-css.c
> @@ -23,9 +23,8 @@
> #define IPU3_CSS_MAX_H 3136
> #define IPU3_CSS_MAX_W 4224
>
> -/* filter size from graph settings is fixed as 4 */
> -#define FILTER_SIZE 4
> -#define MIN_ENVELOPE 8
> +/* minimal envelope size(GDC in - out) should be 4 */
> +#define MIN_ENVELOPE 4
>
> /*
> * pre-allocated buffer size for CSS ABI, auxiliary frames
> @@ -1821,9 +1820,9 @@ int ipu3_css_fmt_try(struct ipu3_css *css,
> vf->width = ipu3_css_adjust(vf->width, VF_ALIGN_W);
> vf->height = ipu3_css_adjust(vf->height, 1);
>
> - s = (bds->width - gdc->width) / 2 - FILTER_SIZE;
> + s = (bds->width - gdc->width) / 2;
> env->width = s < MIN_ENVELOPE ? MIN_ENVELOPE : s;
> - s = (bds->height - gdc->height) / 2 - FILTER_SIZE;
> + s = (bds->height - gdc->height) / 2;
> env->height = s < MIN_ENVELOPE ? MIN_ENVELOPE : s;
>
> css->pipes[pipe].bindex =
> @@ -2245,9 +2244,8 @@ int ipu3_css_set_parameters(struct ipu3_css *css, unsigned int pipe,
> css_pipe->aux_frames[a].height,
> css_pipe->rect[g].width,
> css_pipe->rect[g].height,
> - css_pipe->rect[e].width + FILTER_SIZE,
> - css_pipe->rect[e].height +
> - FILTER_SIZE);
> + css_pipe->rect[e].width,
> + css_pipe->rect[e].height);
> }
> }
>
> --
> 1.9.1
>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Best regards,
Tomasz
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-02-15 6:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-14 10:56 [PATCH] media:staging/intel-ipu3: update minimal GDC envelope size to 4 bingbu.cao
2019-02-15 6:31 ` Tomasz Figa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).