Re: [PATCH 1/2] drm/i915: Return a default RCS context size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 11/01/18 14:55, Oscar Mateo wrote:
Instead of returning whatever size the latest GEN used. This is because
context sizes for new GENs can go up or down, but the only safe thing to
do for missing cases is to use the largest known one, whatever that is.

Suggested-by: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>
Signed-off-by: Oscar Mateo <oscar.mateo@xxxxxxxxx>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@xxxxxxxxx>
---
  drivers/gpu/drm/i915/intel_engine_cs.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c
index e88b2fd..db758c5 100644
--- a/drivers/gpu/drm/i915/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/intel_engine_cs.c
@@ -38,6 +38,7 @@
   */
  #define HSW_CXT_TOTAL_SIZE		(17 * PAGE_SIZE)

Could use a comment here with the explanation in the commit message, but it is relatively clear anyway, so:

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

Thanks,
Daniele

+#define DEFAULT_LR_CONTEXT_RENDER_SIZE	(22 * PAGE_SIZE)
  #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)
@@ -181,6 +182,7 @@ struct engine_info {
  		switch (INTEL_GEN(dev_priv)) {
  		default:
  			MISSING_CASE(INTEL_GEN(dev_priv));
+			return DEFAULT_LR_CONTEXT_RENDER_SIZE;
  		case 10:
  			return GEN10_LR_CONTEXT_RENDER_SIZE;
  		case 9:

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux