diff mbox

[2/2,v4] drm/i915/icl: Gen11 render context size

Message ID 1515711307-28979-2-git-send-email-oscar.mateo@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

oscar.mateo@intel.com Jan. 11, 2018, 10:55 p.m. UTC
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Gen11 removes the Resource Streamer, which frees up a big chunk of
the context image. BSpec indicates 12538 DWORDs (13 pages), plus
one page for PPHWSP.

Please notice that, when looking at the BSpec context image table,
the right filter has to be applied as some rows are excluded for
specific GENs. Also, some rows apply per-subslice (for the
calculation above, we have supposed I915_MAX_SUBSLICES = 8).

v2: Rebase.
v3: Use the right size as per the BSpec.
v4:
  - Rebased on top of the default context size (Rodrigo)
  - Clarify in the commit message where the subslice calculation
    comes from.

BSpec: 18907

Acked-by: Ben Widawsky <benjamin.widawsky@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
---
 drivers/gpu/drm/i915/intel_engine_cs.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Daniele Ceraolo Spurio Jan. 12, 2018, 12:01 a.m. UTC | #1
On 11/01/18 14:55, Oscar Mateo wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> Gen11 removes the Resource Streamer, which frees up a big chunk of
> the context image. BSpec indicates 12538 DWORDs (13 pages), plus
> one page for PPHWSP.
>

This is actually 12544 dwords according to the specs (I've already 
confirmed it with Oscar via IM). Still 13 pages anyway.

Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>

Thanks,
Daniele

> Please notice that, when looking at the BSpec context image table,
> the right filter has to be applied as some rows are excluded for
> specific GENs. Also, some rows apply per-subslice (for the
> calculation above, we have supposed I915_MAX_SUBSLICES = 8).
> 
> v2: Rebase.
> v3: Use the right size as per the BSpec.
> v4:
>    - Rebased on top of the default context size (Rodrigo)
>    - Clarify in the commit message where the subslice calculation
>      comes from.
> 
> BSpec: 18907
> 
> Acked-by: Ben Widawsky <benjamin.widawsky@intel.com>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> ---
>   drivers/gpu/drm/i915/intel_engine_cs.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c
> index db758c5..1e7bf40 100644
> --- a/drivers/gpu/drm/i915/intel_engine_cs.c
> +++ b/drivers/gpu/drm/i915/intel_engine_cs.c
> @@ -42,6 +42,7 @@
>   #define GEN8_LR_CONTEXT_RENDER_SIZE	(20 * PAGE_SIZE)
>   #define GEN9_LR_CONTEXT_RENDER_SIZE	(22 * PAGE_SIZE)
>   #define GEN10_LR_CONTEXT_RENDER_SIZE	(18 * PAGE_SIZE)
> +#define GEN11_LR_CONTEXT_RENDER_SIZE	(14 * PAGE_SIZE)
>   
>   #define GEN8_LR_CONTEXT_OTHER_SIZE	( 2 * PAGE_SIZE)
>   
> @@ -183,6 +184,8 @@ struct engine_info {
>   		default:
>   			MISSING_CASE(INTEL_GEN(dev_priv));
>   			return DEFAULT_LR_CONTEXT_RENDER_SIZE;
> +		case 11:
> +			return GEN11_LR_CONTEXT_RENDER_SIZE;
>   		case 10:
>   			return GEN10_LR_CONTEXT_RENDER_SIZE;
>   		case 9:
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c
index db758c5..1e7bf40 100644
--- a/drivers/gpu/drm/i915/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/intel_engine_cs.c
@@ -42,6 +42,7 @@ 
 #define GEN8_LR_CONTEXT_RENDER_SIZE	(20 * PAGE_SIZE)
 #define GEN9_LR_CONTEXT_RENDER_SIZE	(22 * PAGE_SIZE)
 #define GEN10_LR_CONTEXT_RENDER_SIZE	(18 * PAGE_SIZE)
+#define GEN11_LR_CONTEXT_RENDER_SIZE	(14 * PAGE_SIZE)
 
 #define GEN8_LR_CONTEXT_OTHER_SIZE	( 2 * PAGE_SIZE)
 
@@ -183,6 +184,8 @@  struct engine_info {
 		default:
 			MISSING_CASE(INTEL_GEN(dev_priv));
 			return DEFAULT_LR_CONTEXT_RENDER_SIZE;
+		case 11:
+			return GEN11_LR_CONTEXT_RENDER_SIZE;
 		case 10:
 			return GEN10_LR_CONTEXT_RENDER_SIZE;
 		case 9: