Module: Mesa Branch: staging/23.0 Commit: d55ee3cf60e59559b9c275920f95770dbc8ac2e9 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d55ee3cf60e59559b9c275920f95770dbc8ac2e9
Author: Lionel Landwerlin <[email protected]> Date: Wed Mar 22 12:11:22 2023 +0200 isl: update max buffer size for SKL+ Signed-off-by: Lionel Landwerlin <[email protected]> Cc: mesa-stable Reviewed-by: José Roberto de Souza <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22066> (cherry picked from commit b7e5b3e318005eebbf9dbaf73e3139ffb5731230) --- .pick_status.json | 2 +- src/intel/isl/isl.c | 30 ++++++++++++++++++++---------- src/intel/isl/isl_surface_state.c | 6 +++++- 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 4b109cd03a6..ed84e34bc50 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -121,7 +121,7 @@ "description": "isl: update max buffer size for SKL+", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c index 4d09800cd1b..44ba6cef32b 100644 --- a/src/intel/isl/isl.c +++ b/src/intel/isl/isl.c @@ -313,16 +313,26 @@ isl_device_init(struct isl_device *dev, dev->ds.hiz_offset = 0; } - if (ISL_GFX_VER(dev) >= 7) { - /* From the IVB PRM, SURFACE_STATE::Height, - * - * For typed buffer and structured buffer surfaces, the number - * of entries in the buffer ranges from 1 to 2^27. For raw buffer - * surfaces, the number of entries in the buffer is the number of bytes - * which can range from 1 to 2^30. - * - * This limit is only concerned with raw buffers. - */ + /* From the IVB PRM, SURFACE_STATE::Height, + * + * For typed buffer and structured buffer surfaces, the number + * of entries in the buffer ranges from 1 to 2^27. For raw buffer + * surfaces, the number of entries in the buffer is the number of bytes + * which can range from 1 to 2^30. + * + * From the SKL PRM, SURFACE_STATE::Width/Height/Depth for RAW buffers, + * + * Width : bits [6:0] + * Height : bits [20:7] + * Depth : bits [31:21] + * + * So we can address 4Gb + * + * This limit is only concerned with raw buffers. + */ + if (ISL_GFX_VER(dev) >= 9) { + dev->max_buffer_size = 1ull << 32; + } else if (ISL_GFX_VER(dev) >= 7) { dev->max_buffer_size = 1ull << 30; } else { dev->max_buffer_size = 1ull << 27; diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c index 455e2f3bbb6..d3e58b80f72 100644 --- a/src/intel/isl/isl_surface_state.c +++ b/src/intel/isl/isl_surface_state.c @@ -907,7 +907,11 @@ isl_genX(buffer_fill_state_s)(const struct isl_device *dev, void *state, #endif #endif -#if GFX_VER >= 7 +#if GFX_VER >= 9 + s.Height = ((num_elements - 1) >> 7) & 0x3fff; + s.Width = (num_elements - 1) & 0x7f; + s.Depth = ((num_elements - 1) >> 21) & 0x7ff; +#elif GFX_VER >= 7 s.Height = ((num_elements - 1) >> 7) & 0x3fff; s.Width = (num_elements - 1) & 0x7f; s.Depth = ((num_elements - 1) >> 21) & 0x3ff;
