From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 059FAC2BD09 for ; Tue, 9 Jul 2024 19:44:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BA3B410E63A; Tue, 9 Jul 2024 19:44:07 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="EXnExHR1"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id DE0B510E63A for ; Tue, 9 Jul 2024 19:44:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1720554247; x=1752090247; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ZbRwXDTpowOp526BGcBGYM0n5s/oBfPRskFoSwouC9k=; b=EXnExHR1EercNVwzXulPrp7MtPFC7rR/5F5dHKfpy4J90b0SUr8dMr6R xRDb4hExUL04r52FKe+xrWXFM05ZIObCECf/KHEhcMGI8kgtXQ6QfW5YA RVgzfJFOBPza+JqMPu+gl5WFKCZRrS7a1arMGN5bSAIoOTj1W188mIOhU Biq3tjzdSBTP5a8dpuLG9sH5sIWGyxXOFuec+7+TuwCPE/NP2Tmg1l0oE Ds51L5ioo3sGuD5q+VBoxlVB4SkKEcC4RtXN5X1RfAr1HLW6GN2vOGsbB 8UGMQT+sgqJRa9ZhfUdzGwDcjYey2Roy2XUO8PzsbRnGtWNZ0RCKcrkJY g==; X-CSE-ConnectionGUID: 20PRimZsTHqmDRXBCMhUSw== X-CSE-MsgGUID: 7TxvOq71T9W3VH7tqLNhPg== X-IronPort-AV: E=McAfee;i="6700,10204,11128"; a="17469518" X-IronPort-AV: E=Sophos;i="6.09,195,1716274800"; d="scan'208";a="17469518" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jul 2024 12:44:06 -0700 X-CSE-ConnectionGUID: rDbsGxoKSCiAWFZEqrz1rw== X-CSE-MsgGUID: 5foD7NMCTFqv/aYFX36OUw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,195,1716274800"; d="scan'208";a="52562212" Received: from saurabhg-nuc10i5fnh.jf.intel.com ([10.165.125.7]) by fmviesa004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jul 2024 12:44:06 -0700 From: Akshata Jahagirdar To: intel-xe@lists.freedesktop.org Cc: lucas.demarchi@intel.com, lucas.demarchi@gmail.com, Akshata Jahagirdar Subject: [PATCH 0/6] Implement compression support on BMG Date: Wed, 10 Jul 2024 00:53:44 -0700 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" According to the SAS for BMG compression, we need to decompress during eviction, and not recompress on restore. Due to this, we need to introduce encoding pat_index in case of vram too. This patch explores the solution of setting up an additional identity map for the vram, this time at the end of previous mapping offset and with compressed pat_index. We then select the appropriate mapping during eviction/restore/clear. Akshata Jahagirdar (6): drm/xe/xe2: Introduce identity map for compressed pat for vram drm/xe/migrate: Handle clear ccs logic for xe2 dgfx drm/xe/migrate: Add kunit to test clear functionality drm/xe/xe_migrate: Handle migration logic for xe2+ dgfx drm/xe/migrate: Add kunit to test migration functionality for BMG drm/xe/xe2: Do not run xe_bo_test for xe2+ dgfx drivers/gpu/drm/xe/tests/xe_bo.c | 6 + drivers/gpu/drm/xe/tests/xe_migrate.c | 388 +++++++++++++++++++++ drivers/gpu/drm/xe/tests/xe_migrate_test.c | 1 + drivers/gpu/drm/xe/tests/xe_migrate_test.h | 1 + drivers/gpu/drm/xe/xe_device.h | 5 + drivers/gpu/drm/xe/xe_migrate.c | 66 +++- 6 files changed, 449 insertions(+), 18 deletions(-) -- 2.34.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8E55AC2BD09 for ; Tue, 9 Jul 2024 20:07:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5020C10E664; Tue, 9 Jul 2024 20:07:25 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="bi7V+4WS"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id A24A210E664 for ; Tue, 9 Jul 2024 20:07:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1720555644; x=1752091644; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ZbRwXDTpowOp526BGcBGYM0n5s/oBfPRskFoSwouC9k=; b=bi7V+4WS8VHtuVGSOEkxm7OKcHoZpU+o/h894rMuX6iI2lviMGJtwdm0 YThiwCvodFr7qEdkSEm1MXShadJsAByPJ++CzIVtPF72VTSG6E8kB5mxQ ZrtlK1AuPQpEMuC/w3Bn+8RwiItp1Be9LA6J9BTpCPSoYOaRl+7FyWfUd 6AP136lrFu3X1+tRxgBeQR0eZc/rkjF8jMnzZftEPdZIZAZKPiPPh0Kh6 NBJ/4vKaBDssBcUzGDeWue5hNwdF8HxzbPUvOnGfjzVkNj/LAYRVqOY8K 378riTHM4DWqklgyt+bH2OjUR8AENd9ftd+yM15ZKOhq7e0AviZ5YEtfs Q==; X-CSE-ConnectionGUID: cIpQBe9vSmmgrKkRBmNDww== X-CSE-MsgGUID: K69x/WMpRuyJGcLBoGMXpA== X-IronPort-AV: E=McAfee;i="6700,10204,11128"; a="21657236" X-IronPort-AV: E=Sophos;i="6.09,195,1716274800"; d="scan'208";a="21657236" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jul 2024 13:07:23 -0700 X-CSE-ConnectionGUID: zwugORipT8ycst9rQXIB8A== X-CSE-MsgGUID: ZooSXeL1R4yKGRAcXEMnWw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,195,1716274800"; d="scan'208";a="52567776" Received: from saurabhg-nuc10i5fnh.jf.intel.com ([10.165.125.7]) by fmviesa004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jul 2024 13:07:21 -0700 From: Akshata Jahagirdar To: intel-xe@lists.freedesktop.org Cc: lucas.demarchi@intel.com, lucas.demarchi@gmail.com, Akshata Jahagirdar Subject: [PATCH 0/6] Implement compression support on BMG Date: Wed, 10 Jul 2024 01:17:04 -0700 Message-ID: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" Message-ID: <20240710081704.Itzliwx92dXXTnHFpl1KpJaraVBgBJC5CTXCw33HCAU@z> According to the SAS for BMG compression, we need to decompress during eviction, and not recompress on restore. Due to this, we need to introduce encoding pat_index in case of vram too. This patch explores the solution of setting up an additional identity map for the vram, this time at the end of previous mapping offset and with compressed pat_index. We then select the appropriate mapping during eviction/restore/clear. Akshata Jahagirdar (6): drm/xe/xe2: Introduce identity map for compressed pat for vram drm/xe/migrate: Handle clear ccs logic for xe2 dgfx drm/xe/migrate: Add kunit to test clear functionality drm/xe/xe_migrate: Handle migration logic for xe2+ dgfx drm/xe/migrate: Add kunit to test migration functionality for BMG drm/xe/xe2: Do not run xe_bo_test for xe2+ dgfx drivers/gpu/drm/xe/tests/xe_bo.c | 6 + drivers/gpu/drm/xe/tests/xe_migrate.c | 388 +++++++++++++++++++++ drivers/gpu/drm/xe/tests/xe_migrate_test.c | 1 + drivers/gpu/drm/xe/tests/xe_migrate_test.h | 1 + drivers/gpu/drm/xe/xe_device.h | 5 + drivers/gpu/drm/xe/xe_migrate.c | 66 +++- 6 files changed, 449 insertions(+), 18 deletions(-) -- 2.34.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 369C6C3DA41 for ; Wed, 10 Jul 2024 23:17:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EBB5C10E92C; Wed, 10 Jul 2024 23:17:23 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="WvT+REj6"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id D8BB210E92C for ; Wed, 10 Jul 2024 23:17:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1720653443; x=1752189443; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ZbRwXDTpowOp526BGcBGYM0n5s/oBfPRskFoSwouC9k=; b=WvT+REj6f32zuMtmlk7wHsAQFNmmnhayJZZ9ngzA6NqRcTKAJaICgL+3 IPI8w+J7cn0An3uypirsiqxWnRckb8oW+KVeMnPdjo1ZrhMFjoNrhPD8e NUvk3f3WWeKh4wCzUur48iOrKs/FHM41FysCLLZmjn3u8yd0JlsBnC5a5 6HaYJK86tVbGixUXEtfIj/jqJj/mA0aqRayIL30bT3S565Zioet04ggiK 3Xd+XVnhxQ9GvyF8GDhKUqZXvIbazFi2Rrn0pv7QYHLje1hAomD5X7sAz sL4aP0Eq00Ht4iSIIYlh5UWRH/c3du6KtuhJP4NMyJFG0GSazexF+1/vK A==; X-CSE-ConnectionGUID: 3COeHPEyQtKEGl2gowULew== X-CSE-MsgGUID: qmmYlrSvSGKayE5A/R52ig== X-IronPort-AV: E=McAfee;i="6700,10204,11129"; a="18120787" X-IronPort-AV: E=Sophos;i="6.09,198,1716274800"; d="scan'208";a="18120787" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jul 2024 16:17:23 -0700 X-CSE-ConnectionGUID: PoZJr3aiR5OkZY6s+ggDdw== X-CSE-MsgGUID: 84/Hw0jYTn+idyYXugPWqQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,198,1716274800"; d="scan'208";a="52672240" Received: from saurabhg-nuc10i5fnh.jf.intel.com ([10.165.125.7]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jul 2024 16:17:21 -0700 From: Akshata Jahagirdar To: intel-xe@lists.freedesktop.org Cc: lucas.demarchi@intel.com, lucas.demarchi@gmail.com, Akshata Jahagirdar Subject: [PATCH 0/6] Implement compression support on BMG Date: Thu, 11 Jul 2024 04:27:04 -0700 Message-ID: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" Message-ID: <20240711112704.bzKgJ3z-dcIvBsvaJplPOFmaksW2RMX-vL-4z2RRIUg@z> According to the SAS for BMG compression, we need to decompress during eviction, and not recompress on restore. Due to this, we need to introduce encoding pat_index in case of vram too. This patch explores the solution of setting up an additional identity map for the vram, this time at the end of previous mapping offset and with compressed pat_index. We then select the appropriate mapping during eviction/restore/clear. Akshata Jahagirdar (6): drm/xe/xe2: Introduce identity map for compressed pat for vram drm/xe/migrate: Handle clear ccs logic for xe2 dgfx drm/xe/migrate: Add kunit to test clear functionality drm/xe/xe_migrate: Handle migration logic for xe2+ dgfx drm/xe/migrate: Add kunit to test migration functionality for BMG drm/xe/xe2: Do not run xe_bo_test for xe2+ dgfx drivers/gpu/drm/xe/tests/xe_bo.c | 6 + drivers/gpu/drm/xe/tests/xe_migrate.c | 388 +++++++++++++++++++++ drivers/gpu/drm/xe/tests/xe_migrate_test.c | 1 + drivers/gpu/drm/xe/tests/xe_migrate_test.h | 1 + drivers/gpu/drm/xe/xe_device.h | 5 + drivers/gpu/drm/xe/xe_migrate.c | 66 +++- 6 files changed, 449 insertions(+), 18 deletions(-) -- 2.34.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 81807C3DA42 for ; Thu, 11 Jul 2024 00:33:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5423610E88F; Thu, 11 Jul 2024 00:33:16 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="T/517PI4"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id 54A7410E741 for ; Thu, 11 Jul 2024 00:33:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1720657995; x=1752193995; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ZbRwXDTpowOp526BGcBGYM0n5s/oBfPRskFoSwouC9k=; b=T/517PI4bjmV9HxncN/QhIcyLcMwews1l7jyob+UIjH1kaBuS6r2Xjzn 9ieJFVP9yUdaUoEGtZoY74Vcui6m0TUmqs5l32ZpJTA2fQC3OfuSGuc+H iYrIRk1sJ0XxDOiWZY3YnBWU4QiUdboSHw+n0gXZ6dFDGhTpVg4dtNT2A spNO5vZ8nc1H3Gjkk+2tSvx1jEgDgN6RXJZgSm2Hb5P2f0iOoFcfi1Ab/ uhhjyHOnnt1la0yHfYhpSdzIiTd6bZhdO0DyZUYvqY/7L5uwKK06zu7Pp Up5EmA04Fm1OZz2saDJdO1uQK/I0019621UsIF7c1vSL8FHTaKHMH/EEF w==; X-CSE-ConnectionGUID: jPPmSQCPSFWDxwktwbB8wg== X-CSE-MsgGUID: Ocw8jaiLRDmE537EWWI2UA== X-IronPort-AV: E=McAfee;i="6700,10204,11129"; a="17884750" X-IronPort-AV: E=Sophos;i="6.09,198,1716274800"; d="scan'208";a="17884750" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jul 2024 17:33:15 -0700 X-CSE-ConnectionGUID: z5leENfMSKyI+oecY8VQkA== X-CSE-MsgGUID: AvbgEGa9S9O6vfuUnmIhFA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,198,1716274800"; d="scan'208";a="71603844" Received: from saurabhg-nuc10i5fnh.jf.intel.com ([10.165.125.7]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jul 2024 17:33:14 -0700 From: Akshata Jahagirdar To: intel-xe@lists.freedesktop.org Cc: akshatajahagirdar6@gmail.com, Akshata Jahagirdar Subject: [PATCH 0/6] Implement compression support on BMG Date: Thu, 11 Jul 2024 05:42:58 -0700 Message-ID: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" Message-ID: <20240711124258.hgzuqdXPkWMuZ9bpI8iJfJKHbO4Um6lY5Ee-eV2VYNQ@z> According to the SAS for BMG compression, we need to decompress during eviction, and not recompress on restore. Due to this, we need to introduce encoding pat_index in case of vram too. This patch explores the solution of setting up an additional identity map for the vram, this time at the end of previous mapping offset and with compressed pat_index. We then select the appropriate mapping during eviction/restore/clear. Akshata Jahagirdar (6): drm/xe/xe2: Introduce identity map for compressed pat for vram drm/xe/migrate: Handle clear ccs logic for xe2 dgfx drm/xe/migrate: Add kunit to test clear functionality drm/xe/xe_migrate: Handle migration logic for xe2+ dgfx drm/xe/migrate: Add kunit to test migration functionality for BMG drm/xe/xe2: Do not run xe_bo_test for xe2+ dgfx drivers/gpu/drm/xe/tests/xe_bo.c | 6 + drivers/gpu/drm/xe/tests/xe_migrate.c | 388 +++++++++++++++++++++ drivers/gpu/drm/xe/tests/xe_migrate_test.c | 1 + drivers/gpu/drm/xe/tests/xe_migrate_test.h | 1 + drivers/gpu/drm/xe/xe_device.h | 5 + drivers/gpu/drm/xe/xe_migrate.c | 66 +++- 6 files changed, 449 insertions(+), 18 deletions(-) -- 2.34.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8EEC7C3DA41 for ; Thu, 11 Jul 2024 00:57:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5F70710E753; Thu, 11 Jul 2024 00:57:42 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="CqEZXayn"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1332F10E0C9 for ; Thu, 11 Jul 2024 00:57:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1720659459; x=1752195459; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ZbRwXDTpowOp526BGcBGYM0n5s/oBfPRskFoSwouC9k=; b=CqEZXaynCGLlfIbpmurU8dCTdXFbIQa76AH3y2jSBNm8NWotC5vniqHm bYbbMuJyPNbhCLGrE1u6PorajMd+czG23OftexVcioqa+/cL5AIqwG1T0 DHs0J+Ta7err22/3pUzyZk42CO5Ewlbylne266Y/LmeVY5StRQMNKJNrQ 2VBfH6JV1D7zaZZ5MjscnW+eikQhx2NQbjBf2Uh0aAW5fpcwAg6e/8xOG ZDgtOGSMVjoVOsAzZ70pn5Na+k0B9xzQD4uTb8/3nOd26gGBZaipYRW2w ri28JKOA6utb6y+cSnAkKVfTR0Ls6UBpcUE87hqFJcM55Dm72GHojSE2D w==; X-CSE-ConnectionGUID: 4cR7A+8iSjaowOrOeCiJpA== X-CSE-MsgGUID: fFtCefDBTTe/NIktBuiGzQ== X-IronPort-AV: E=McAfee;i="6700,10204,11129"; a="17720384" X-IronPort-AV: E=Sophos;i="6.09,198,1716274800"; d="scan'208";a="17720384" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jul 2024 17:57:39 -0700 X-CSE-ConnectionGUID: budUzSnZTwWFoz71OuSXtg== X-CSE-MsgGUID: vaxpTKKCT4y1uFZw2yPyXw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,198,1716274800"; d="scan'208";a="48475730" Received: from saurabhg-nuc10i5fnh.jf.intel.com ([10.165.125.7]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jul 2024 17:57:38 -0700 From: Akshata Jahagirdar To: intel-xe@lists.freedesktop.org Cc: akshatajahagirdar6@gmail.com, Akshata Jahagirdar Subject: [PATCH 0/6] Implement compression support on BMG Date: Thu, 11 Jul 2024 06:07:22 -0700 Message-ID: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" Message-ID: <20240711130722.CIZDrZ8q4hfNohZn7jVcz12990BUdYMV8W7WmjnuG5s@z> According to the SAS for BMG compression, we need to decompress during eviction, and not recompress on restore. Due to this, we need to introduce encoding pat_index in case of vram too. This patch explores the solution of setting up an additional identity map for the vram, this time at the end of previous mapping offset and with compressed pat_index. We then select the appropriate mapping during eviction/restore/clear. Akshata Jahagirdar (6): drm/xe/xe2: Introduce identity map for compressed pat for vram drm/xe/migrate: Handle clear ccs logic for xe2 dgfx drm/xe/migrate: Add kunit to test clear functionality drm/xe/xe_migrate: Handle migration logic for xe2+ dgfx drm/xe/migrate: Add kunit to test migration functionality for BMG drm/xe/xe2: Do not run xe_bo_test for xe2+ dgfx drivers/gpu/drm/xe/tests/xe_bo.c | 6 + drivers/gpu/drm/xe/tests/xe_migrate.c | 388 +++++++++++++++++++++ drivers/gpu/drm/xe/tests/xe_migrate_test.c | 1 + drivers/gpu/drm/xe/tests/xe_migrate_test.h | 1 + drivers/gpu/drm/xe/xe_device.h | 5 + drivers/gpu/drm/xe/xe_migrate.c | 66 +++- 6 files changed, 449 insertions(+), 18 deletions(-) -- 2.34.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ACD29C3271E for ; Thu, 11 Jul 2024 05:55:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 50E8210E948; Thu, 11 Jul 2024 05:55:16 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="jzbIS++s"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4EA9210E946 for ; Thu, 11 Jul 2024 05:55:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1720677315; x=1752213315; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=xWOzzb/dvuPpsmmZV8RDyTKoDLYOkEP1bfwa6QNtkV8=; b=jzbIS++s+iV3dk6fj9wIKdlwhcmT4AcnLJZtMBqYf17JGgRb3wilWL6G 7lFTYCwtnDnRi5nzNvyVOtWhpKg7qLFEPYQ3Idw5E23TVeFmM5adzyrxE Oz40yzyxy3mvzMZs5HHlChh4Q/sqDljawRTb7OWEsC5KjQvy748DsfNCm Y49/XjsJJKlbmpOEbIs7MhuYQq1sfwsqSIQ87PevjwJPPKb9tFNa/o20g h8yvYt9Hk/rQYG649qWu6mLB8EmzMvoHTM9+3+QFi7KA1Mq2Gdv45xsgW P/UPF2CDv547pCebNia9N70Qr2AEFip8rl/H0ejiEPR4UYpy/CbwK1LgC Q==; X-CSE-ConnectionGUID: Afy1kPWfSaiJslqDvtcArQ== X-CSE-MsgGUID: 3vu8EmuVSOijBSyL+/8vVg== X-IronPort-AV: E=McAfee;i="6700,10204,11129"; a="35468622" X-IronPort-AV: E=Sophos;i="6.09,199,1716274800"; d="scan'208";a="35468622" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jul 2024 22:55:15 -0700 X-CSE-ConnectionGUID: tlwG7K+8S9C6onI8SCSMXQ== X-CSE-MsgGUID: 0UFURMFTTUmaBUnGGo1N/w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,199,1716274800"; d="scan'208";a="53627673" Received: from dut1110bmgfrd.igk.intel.com ([10.211.177.149]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jul 2024 22:55:12 -0700 From: Akshata Jahagirdar To: intel-xe@lists.freedesktop.org Cc: akshatajahagirdar6@gmail.com, Akshata Jahagirdar Subject: [PATCH 0/6] Implement compression support on BMG Date: Thu, 11 Jul 2024 05:54:59 +0000 Message-ID: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" Message-ID: <20240711055459.fFyzOLbAA39Yh7EwZpAC4aLdAGTFfJPlqQFDUTubJ60@z> On Xe2 the compression has moved to a unified universal model (exactly one compression mode/format), where compression is now controlled via PAT on per-page basis. This now means KMD can decompress freely. This was problematic on DG2 since we had multiple compression formats, and the compression format used on a particular buffer was unknown to the KMD, so instead the raw CCS state needed to be copied around when evicting VRAM. In addition mixed VRAM and system memory buffers were not supported with compression enabled. On Xe2 dGPU compression is still only supported with VRAM, however we can now support compression with VRAM and system memory buffers, with GPU access being seamless underneath. So long as when doing VRAM -> sysmem the KMD does the move using compressed -> uncompressed, to decompress it. CPU access to such buffers is also possible, under the premise that userspace first decompress the corresponding pages being accessed. If the pages are already in system memory then KMD would have already decompressed them. When restoring such buffers with sysmem -> VRAM the KMD can't easily know which pages were originally compressed, so we always use uncompressed -> uncompressed here. With this it also means we can drop all the raw CCS handling on such platforms (including needing to allocate extra CCS storage). In order to support this we now need to have two different identity mappings for compressed and uncompressed VRAM. The additional identity map is the VRAM with compressed pat_index. We then select the appropriate mapping during migration/clear. Akshata Jahagirdar (6): drm/xe/xe2: Introduce identity map for compressed pat for vram drm/xe/migrate: Handle clear ccs logic for xe2 dgfx drm/xe/migrate: Add kunit to test clear functionality drm/xe/xe_migrate: Handle migration logic for xe2+ dgfx drm/xe/migrate: Add kunit to test migration functionality for BMG drm/xe/xe2: Do not run xe_bo_test for xe2+ dgfx drivers/gpu/drm/xe/tests/xe_bo.c | 6 + drivers/gpu/drm/xe/tests/xe_migrate.c | 388 +++++++++++++++++++++ drivers/gpu/drm/xe/tests/xe_migrate_test.c | 1 + drivers/gpu/drm/xe/tests/xe_migrate_test.h | 1 + drivers/gpu/drm/xe/xe_device.h | 5 + drivers/gpu/drm/xe/xe_migrate.c | 66 +++- 6 files changed, 449 insertions(+), 18 deletions(-) -- 2.34.1