[Mesa-dev] [PATCH 04/16] intel/isl/icl: Add the maximum surface size limit

Kenneth Graunke kenneth at whitecape.org
Tue Feb 13 23:13:40 UTC 2018


On Tuesday, February 13, 2018 11:15:04 AM PST Anuj Phogat wrote:
> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
> ---
>  src/intel/isl/isl.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c
> index 59f512fc05..c9873d96df 100644
> --- a/src/intel/isl/isl.c
> +++ b/src/intel/isl/isl.c
> @@ -1483,7 +1483,7 @@ isl_surf_init_s(const struct isl_device *dev,
>         */
>        if (size > (uint64_t) 1 << 31)
>           return false;
> -   } else {
> +   } else if (ISL_DEV_GEN(dev) == 9 || ISL_DEV_GEN(dev) == 10) {

I'd just do:

   } else if (ISL_DEV_GEN(dev) < 11) {

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

>        /* From the Skylake PRM Vol 5, Maximum Surface Size in Bytes:
>         *    "In addition to restrictions on maximum height, width, and depth,
>         *     surfaces are also restricted to a maximum size of 2^38 bytes.
> @@ -1492,6 +1492,10 @@ isl_surf_init_s(const struct isl_device *dev,
>         */
>        if (size > (uint64_t) 1 << 38)
>           return false;
> +   } else {
> +      /* gen11+ platforms raised this limit to 2^44 bytes. */
> +      if (size > (uint64_t) 1 << 44)
> +         return false;
>     }
>  
>     *surf = (struct isl_surf) {
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180213/90c21427/attachment.sig>


More information about the mesa-dev mailing list