All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-xe] [PATCH v2] drm/xe: implement driver initiated function-reset
@ 2023-10-11 13:31 Andrzej Hajda
  2023-10-11 17:22 ` [Intel-xe] ✓ CI.Patch_applied: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Andrzej Hajda @ 2023-10-11 13:31 UTC (permalink / raw)
  To: intel-xe; +Cc: Andrzej Hajda, Rodrigo Vivi

Driver initiated function-reset (FLR) is the highest level of reset
that we can trigger from within the driver. In contrast to PCI FLR it
doesn't require re-enumeration of PCI BAR. It can be useful in case
GT fails to reset. It is also the only way to trigger GSC reset from
the driver and can be used in future addition of GSC support.

v2:
  - use regs from xe_regs.h
  - move the flag to xe.mmio
  - call flr only on root gt
  - use BIOS protection check
  - copy/paste comments from i915

Signed-off-by: Andrzej Hajda <andrzej.hajda@intel.com>
---
Hi all,

This is initial attempt to implement Driver-FLR in xe. Implementation
is copied from i915. I've skipped comments, but I can re-add them if
requested.
In i915 Driver-FLR is performed on driver unload if GSC was used.
In xe GSC is not yet supported, but I have added trigger to perform FLR
in case GT fails to reset, I guess this could be proper use-case and
of course this is prerequisite to GSC support.

Regards
Andrzej
---
 drivers/gpu/drm/xe/regs/xe_regs.h    |  7 +++
 drivers/gpu/drm/xe/xe_device_types.h |  2 +
 drivers/gpu/drm/xe/xe_gt.c           |  2 +
 drivers/gpu/drm/xe/xe_mmio.c         | 82 ++++++++++++++++++++++++++++
 4 files changed, 93 insertions(+)

diff --git a/drivers/gpu/drm/xe/regs/xe_regs.h b/drivers/gpu/drm/xe/regs/xe_regs.h
index dbb0ea1a585eda..ac5fa25877766e 100644
--- a/drivers/gpu/drm/xe/regs/xe_regs.h
+++ b/drivers/gpu/drm/xe/regs/xe_regs.h
@@ -53,8 +53,15 @@
 
 #define SOFTWARE_FLAGS_SPR33			XE_REG(0x4f084)
 
+#define GU_CNTL_PROTECTED			XE_REG(0x10100C)
+#define   DRIVERINT_FLR_DIS			REG_BIT(31)
+
 #define GU_CNTL					XE_REG(0x101010)
 #define   LMEM_INIT				REG_BIT(7)
+#define   DRIVERFLR				REG_BIT(31)
+
+#define GU_DEBUG				XE_REG(0x101018)
+#define   DRIVERFLR_STATUS			REG_BIT(31)
 
 #define XEHP_CLOCK_GATE_DIS			XE_REG(0x101014)
 #define   SGSI_SIDECLK_DIS			REG_BIT(17)
diff --git a/drivers/gpu/drm/xe/xe_device_types.h b/drivers/gpu/drm/xe/xe_device_types.h
index 0efa7a1d2188e9..886d1c769c27fd 100644
--- a/drivers/gpu/drm/xe/xe_device_types.h
+++ b/drivers/gpu/drm/xe/xe_device_types.h
@@ -285,6 +285,8 @@ struct xe_device {
 		size_t size;
 		/** @regs: pointer to MMIO space for device */
 		void *regs;
+		/** @needs_flr_on_fini: requests function-reset on fini */
+		bool needs_flr_on_fini;
 	} mmio;
 
 	/** @mem: memory info for device */
diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
index c63e2e4750b1ea..37e9576b92b5da 100644
--- a/drivers/gpu/drm/xe/xe_gt.c
+++ b/drivers/gpu/drm/xe/xe_gt.c
@@ -616,6 +616,8 @@ static int gt_reset(struct xe_gt *gt)
 	xe_uevent_gt_reset_failure(to_pci_dev(gt_to_xe(gt)->drm.dev),
 				   gt_to_tile(gt)->id, gt->info.id);
 
+	gt_to_xe(gt)->mmio.needs_flr_on_fini = true;
+
 	return err;
 }
 
diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c
index e4cf9bfec422e6..27a0ebe2324daa 100644
--- a/drivers/gpu/drm/xe/xe_mmio.c
+++ b/drivers/gpu/drm/xe/xe_mmio.c
@@ -4,6 +4,7 @@
  */
 
 #include <linux/minmax.h>
+#include <linux/units.h>
 
 #include "xe_mmio.h"
 
@@ -372,6 +373,83 @@ static void xe_mmio_probe_tiles(struct xe_device *xe)
 	}
 }
 
+/*
+ * The driver-initiated FLR is the highest level of reset that we can trigger
+ * from within the driver. It is different from the PCI FLR in that it doesn't
+ * fully reset the SGUnit and doesn't modify the PCI config space and therefore
+ * it doesn't require a re-enumeration of the PCI BARs. However, the
+ * driver-initiated FLR does still cause a reset of both GT and display and a
+ * memory wipe of local and stolen memory, so recovery would require a full HW
+ * re-init and saving/restoring (or re-populating) the wiped memory. Since we
+ * perform the FLR as the very last action before releasing access to the HW
+ * during the driver release flow, we don't attempt recovery at all, because
+ * if/when a new instance of i915 is bound to the device it will do a full
+ * re-init anyway.
+ */
+static void driver_flr(struct xe_device *xe)
+{
+	const unsigned int flr_timeout = 3 * MICRO; /* specs recommend a 3s wait */
+	struct xe_gt *gt = xe_root_mmio_gt(xe);
+	int ret;
+
+	if (xe_mmio_read32(gt, GU_CNTL_PROTECTED) & DRIVERINT_FLR_DIS) {
+		drm_info_once(&xe->drm, "BIOS Disabled Driver-FLR\n");
+		return;
+	}
+
+	drm_dbg(&xe->drm, "Triggering Driver-FLR\n");
+
+	/*
+	 * Make sure any pending FLR requests have cleared by waiting for the
+	 * FLR trigger bit to go to zero. Also clear GU_DEBUG's DRIVERFLR_STATUS
+	 * to make sure it's not still set from a prior attempt (it's a write to
+	 * clear bit).
+	 * Note that we should never be in a situation where a previous attempt
+	 * is still pending (unless the HW is totally dead), but better to be
+	 * safe in case something unexpected happens
+	 */
+	ret = xe_mmio_wait32(gt, GU_CNTL, DRIVERFLR, 0, flr_timeout, NULL, false);
+	if (ret) {
+		drm_err(&xe->drm, "Driver-FLR-prepare wait for ready failed! %d\n", ret);
+		return;
+	}
+	xe_mmio_write32(gt, GU_DEBUG, DRIVERFLR_STATUS);
+
+	/* Trigger the actual Driver-FLR */
+	xe_mmio_rmw32(gt, GU_CNTL, 0, DRIVERFLR);
+
+	/* Wait for hardware teardown to complete */
+	ret = xe_mmio_wait32(gt, GU_CNTL, DRIVERFLR, 0, flr_timeout, NULL, false);
+	if (ret) {
+		drm_err(&xe->drm, "Driver-FLR-teardown wait completion failed! %d\n", ret);
+		return;
+	}
+
+	/* Wait for hardware/firmware re-init to complete */
+	ret = xe_mmio_wait32(gt, GU_DEBUG, DRIVERFLR_STATUS, DRIVERFLR_STATUS,
+			     flr_timeout, NULL, false);
+	if (ret) {
+		drm_err(&xe->drm, "Driver-FLR-reinit wait completion failed! %d\n", ret);
+		return;
+	}
+
+	/* Clear sticky completion status */
+	xe_mmio_write32(gt, GU_DEBUG, DRIVERFLR_STATUS);
+}
+
+static void driver_flr_fini(struct drm_device *drm, void *arg)
+{
+	struct xe_device *xe = arg;
+
+	if (xe->mmio.needs_flr_on_fini)
+		driver_flr(xe);
+}
+
+static int driver_flr_init(struct xe_device *xe)
+{
+	return drmm_add_action_or_reset(&xe->drm, driver_flr_fini, xe);
+}
+
 static void mmio_fini(struct drm_device *drm, void *arg)
 {
 	struct xe_device *xe = arg;
@@ -405,6 +483,10 @@ int xe_mmio_init(struct xe_device *xe)
 	if (err)
 		return err;
 
+	err = driver_flr_init(xe);
+	if (err)
+		return err;
+
 	/* Setup first tile; other tiles (if present) will be setup later. */
 	root_tile->mmio.size = xe->mmio.size;
 	root_tile->mmio.regs = xe->mmio.regs;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Intel-xe] ✓ CI.Patch_applied: success for drm/xe: implement driver initiated function-reset
  2023-10-11 13:31 [Intel-xe] [PATCH v2] drm/xe: implement driver initiated function-reset Andrzej Hajda
@ 2023-10-11 17:22 ` Patchwork
  2023-10-11 17:22 ` [Intel-xe] ✓ CI.checkpatch: " Patchwork
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2023-10-11 17:22 UTC (permalink / raw)
  To: Andrzej Hajda; +Cc: intel-xe

== Series Details ==

Series: drm/xe: implement driver initiated function-reset
URL   : https://patchwork.freedesktop.org/series/124976/
State : success

== Summary ==

=== Applying kernel patches on branch 'drm-xe-next' with base: ===
Base commit: 81cbfcc83 Revert "drm/i915/display: Fix a use-after-free when intel_edp_init_connector fails"
=== git am output follows ===
Applying: drm/xe: implement driver initiated function-reset



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Intel-xe] ✓ CI.checkpatch: success for drm/xe: implement driver initiated function-reset
  2023-10-11 13:31 [Intel-xe] [PATCH v2] drm/xe: implement driver initiated function-reset Andrzej Hajda
  2023-10-11 17:22 ` [Intel-xe] ✓ CI.Patch_applied: success for " Patchwork
@ 2023-10-11 17:22 ` Patchwork
  2023-10-11 17:23 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
  2023-10-13 20:31 ` [Intel-xe] [PATCH v2] " Rodrigo Vivi
  3 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2023-10-11 17:22 UTC (permalink / raw)
  To: Andrzej Hajda; +Cc: intel-xe

== Series Details ==

Series: drm/xe: implement driver initiated function-reset
URL   : https://patchwork.freedesktop.org/series/124976/
State : success

== Summary ==

+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt
Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master
63c2b6b160bca2df6efc7bc4cea6f442097d7854
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 0b9c4e95c871b61c494447a21dbac4f167f41b76
Author: Andrzej Hajda <andrzej.hajda@intel.com>
Date:   Wed Oct 11 15:31:18 2023 +0200

    drm/xe: implement driver initiated function-reset
    
    Driver initiated function-reset (FLR) is the highest level of reset
    that we can trigger from within the driver. In contrast to PCI FLR it
    doesn't require re-enumeration of PCI BAR. It can be useful in case
    GT fails to reset. It is also the only way to trigger GSC reset from
    the driver and can be used in future addition of GSC support.
    
    v2:
      - use regs from xe_regs.h
      - move the flag to xe.mmio
      - call flr only on root gt
      - use BIOS protection check
      - copy/paste comments from i915
    
    Signed-off-by: Andrzej Hajda <andrzej.hajda@intel.com>
+ /mt/dim checkpatch 81cbfcc83d65c3c69866f356cb83497a47f9d297 drm-intel
0b9c4e95c drm/xe: implement driver initiated function-reset



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Intel-xe] ✓ CI.KUnit: success for drm/xe: implement driver initiated function-reset
  2023-10-11 13:31 [Intel-xe] [PATCH v2] drm/xe: implement driver initiated function-reset Andrzej Hajda
  2023-10-11 17:22 ` [Intel-xe] ✓ CI.Patch_applied: success for " Patchwork
  2023-10-11 17:22 ` [Intel-xe] ✓ CI.checkpatch: " Patchwork
@ 2023-10-11 17:23 ` Patchwork
  2023-10-13 20:31 ` [Intel-xe] [PATCH v2] " Rodrigo Vivi
  3 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2023-10-11 17:23 UTC (permalink / raw)
  To: Andrzej Hajda; +Cc: intel-xe

== Series Details ==

Series: drm/xe: implement driver initiated function-reset
URL   : https://patchwork.freedesktop.org/series/124976/
State : success

== Summary ==

+ trap cleanup EXIT
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig
stty: 'standard input': Inappropriate ioctl for device
[17:22:29] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[17:22:33] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make ARCH=um O=.kunit --jobs=48
[17:22:53] Starting KUnit Kernel (1/1)...
[17:22:53] ============================================================
[17:22:53] ========================== xe_bo  ==========================
[17:22:53] [SKIPPED] xe_ccs_migrate_kunit
[17:22:53] [SKIPPED] xe_bo_evict_kunit
[17:22:53] ===================== [SKIPPED] xe_bo ======================
[17:22:53] ======================= xe_dma_buf  ========================
[17:22:53] [SKIPPED] xe_dma_buf_kunit
[17:22:53] =================== [SKIPPED] xe_dma_buf ===================
[17:22:53] ======================= xe_migrate  ========================
[17:22:53] [SKIPPED] xe_migrate_sanity_kunit
[17:22:53] =================== [SKIPPED] xe_migrate ===================
[17:22:53] ========================= xe_pci  ==========================
[17:22:53] [PASSED] xe_gmdid_graphics_ip
[17:22:53] [PASSED] xe_gmdid_media_ip
[17:22:53] ===================== [PASSED] xe_pci ======================
[17:22:53] ========================= xe_rtp  ==========================
[17:22:53] ================== xe_rtp_process_tests  ===================
[17:22:53] [PASSED] coalesce-same-reg
[17:22:53] [PASSED] no-match-no-add
[17:22:53] [PASSED] no-match-no-add-multiple-rules
[17:22:53] [PASSED] two-regs-two-entries
[17:22:53] [PASSED] clr-one-set-other
[17:22:53] [PASSED] set-field
[17:22:53] [PASSED] conflict-duplicate
[17:22:53] [PASSED] conflict-not-disjoint
[17:22:53] [PASSED] conflict-reg-type
[17:22:53] ============== [PASSED] xe_rtp_process_tests ===============
[17:22:53] ===================== [PASSED] xe_rtp ======================
[17:22:53] ========================== xe_wa  ==========================
[17:22:53] ======================== xe_wa_gt  =========================
[17:22:53] [PASSED] TIGERLAKE (B0)
[17:22:53] [PASSED] DG1 (A0)
[17:22:53] [PASSED] DG1 (B0)
[17:22:53] [PASSED] ALDERLAKE_S (A0)
[17:22:53] [PASSED] ALDERLAKE_S (B0)
[17:22:53] [PASSED] ALDERLAKE_S (C0)
[17:22:53] [PASSED] ALDERLAKE_S (D0)
[17:22:53] [PASSED] ALDERLAKE_P (A0)
[17:22:53] [PASSED] ALDERLAKE_P (B0)
[17:22:53] [PASSED] ALDERLAKE_P (C0)
[17:22:53] [PASSED] ALDERLAKE_S_RPLS (D0)
[17:22:53] [PASSED] ALDERLAKE_P_RPLU (E0)
[17:22:53] [PASSED] DG2_G10 (A0)
[17:22:53] [PASSED] DG2_G10 (A1)
[17:22:53] [PASSED] DG2_G10 (B0)
[17:22:53] [PASSED] DG2_G10 (C0)
[17:22:53] [PASSED] DG2_G11 (A0)
[17:22:53] [PASSED] DG2_G11 (B0)
[17:22:53] [PASSED] DG2_G11 (B1)
[17:22:53] [PASSED] DG2_G12 (A0)
[17:22:53] [PASSED] DG2_G12 (A1)
[17:22:53] [PASSED] PVC (B0)
[17:22:53] [PASSED] PVC (B1)
[17:22:53] [PASSED] PVC (C0)
[17:22:53] ==================== [PASSED] xe_wa_gt =====================
[17:22:53] ====================== [PASSED] xe_wa ======================
[17:22:53] ============================================================
[17:22:53] Testing complete. Ran 39 tests: passed: 35, skipped: 4
[17:22:53] Elapsed time: 24.709s total, 4.209s configuring, 20.380s building, 0.095s running

+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/tests/.kunitconfig
[17:22:54] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[17:22:55] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make ARCH=um O=.kunit --jobs=48
[17:23:15] Starting KUnit Kernel (1/1)...
[17:23:15] ============================================================
[17:23:15] ================== drm_test_pick_cmdline  ==================
[17:23:15] [PASSED] drm_test_pick_cmdline_res_1920_1080_60
[17:23:15] =============== drm_test_pick_cmdline_named  ===============
[17:23:15] [PASSED] NTSC
[17:23:15] [PASSED] NTSC-J
[17:23:15] [PASSED] PAL
[17:23:15] [PASSED] PAL-M
[17:23:15] =========== [PASSED] drm_test_pick_cmdline_named ===========
[17:23:15] ============== [PASSED] drm_test_pick_cmdline ==============
[17:23:15] ======================== drm_buddy  ========================
[17:23:15] [PASSED] drm_test_buddy_alloc_limit
[17:23:15] [PASSED] drm_test_buddy_alloc_range
[17:23:15] [PASSED] drm_test_buddy_alloc_optimistic
[17:23:15] [PASSED] drm_test_buddy_alloc_pessimistic
[17:23:15] [PASSED] drm_test_buddy_alloc_smoke
[17:23:15] [PASSED] drm_test_buddy_alloc_pathological
[17:23:15] ==================== [PASSED] drm_buddy ====================
[17:23:15] =================== drm_cmdline_parser  ====================
[17:23:15] [PASSED] drm_test_cmdline_force_d_only
[17:23:15] [PASSED] drm_test_cmdline_force_D_only_dvi
[17:23:15] [PASSED] drm_test_cmdline_force_D_only_hdmi
[17:23:15] [PASSED] drm_test_cmdline_force_D_only_not_digital
[17:23:15] [PASSED] drm_test_cmdline_force_e_only
[17:23:15] [PASSED] drm_test_cmdline_res
[17:23:15] [PASSED] drm_test_cmdline_res_vesa
[17:23:15] [PASSED] drm_test_cmdline_res_vesa_rblank
[17:23:15] [PASSED] drm_test_cmdline_res_rblank
[17:23:15] [PASSED] drm_test_cmdline_res_bpp
[17:23:15] [PASSED] drm_test_cmdline_res_refresh
[17:23:15] [PASSED] drm_test_cmdline_res_bpp_refresh
[17:23:15] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced
[17:23:15] [PASSED] drm_test_cmdline_res_bpp_refresh_margins
[17:23:15] [PASSED] drm_test_cmdline_res_bpp_refresh_force_off
[17:23:15] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on
[17:23:15] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_analog
[17:23:15] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_digital
[17:23:15] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on
[17:23:15] [PASSED] drm_test_cmdline_res_margins_force_on
[17:23:15] [PASSED] drm_test_cmdline_res_vesa_margins
[17:23:15] [PASSED] drm_test_cmdline_name
[17:23:15] [PASSED] drm_test_cmdline_name_bpp
[17:23:15] [PASSED] drm_test_cmdline_name_option
[17:23:15] [PASSED] drm_test_cmdline_name_bpp_option
[17:23:15] [PASSED] drm_test_cmdline_rotate_0
[17:23:15] [PASSED] drm_test_cmdline_rotate_90
[17:23:15] [PASSED] drm_test_cmdline_rotate_180
[17:23:15] [PASSED] drm_test_cmdline_rotate_270
[17:23:15] [PASSED] drm_test_cmdline_hmirror
[17:23:15] [PASSED] drm_test_cmdline_vmirror
[17:23:15] [PASSED] drm_test_cmdline_margin_options
[17:23:15] [PASSED] drm_test_cmdline_multiple_options
[17:23:15] [PASSED] drm_test_cmdline_bpp_extra_and_option
[17:23:15] [PASSED] drm_test_cmdline_extra_and_option
[17:23:15] [PASSED] drm_test_cmdline_freestanding_options
[17:23:15] [PASSED] drm_test_cmdline_freestanding_force_e_and_options
[17:23:15] [PASSED] drm_test_cmdline_panel_orientation
[17:23:15] ================ drm_test_cmdline_invalid  =================
[17:23:15] [PASSED] margin_only
[17:23:15] [PASSED] interlace_only
[17:23:15] [PASSED] res_missing_x
[17:23:15] [PASSED] res_missing_y
[17:23:15] [PASSED] res_bad_y
[17:23:15] [PASSED] res_missing_y_bpp
[17:23:15] [PASSED] res_bad_bpp
[17:23:15] [PASSED] res_bad_refresh
[17:23:15] [PASSED] res_bpp_refresh_force_on_off
[17:23:15] [PASSED] res_invalid_mode
[17:23:15] [PASSED] res_bpp_wrong_place_mode
[17:23:15] [PASSED] name_bpp_refresh
[17:23:15] [PASSED] name_refresh
[17:23:15] [PASSED] name_refresh_wrong_mode
[17:23:15] [PASSED] name_refresh_invalid_mode
[17:23:15] [PASSED] rotate_multiple
[17:23:15] [PASSED] rotate_invalid_val
[17:23:15] [PASSED] rotate_truncated
[17:23:15] [PASSED] invalid_option
[17:23:15] [PASSED] invalid_tv_option
[17:23:15] [PASSED] truncated_tv_option
[17:23:15] ============ [PASSED] drm_test_cmdline_invalid =============
[17:23:15] =============== drm_test_cmdline_tv_options  ===============
[17:23:15] [PASSED] NTSC
[17:23:15] [PASSED] NTSC_443
[17:23:15] [PASSED] NTSC_J
[17:23:15] [PASSED] PAL
[17:23:15] [PASSED] PAL_M
[17:23:15] [PASSED] PAL_N
[17:23:15] [PASSED] SECAM
[17:23:15] =========== [PASSED] drm_test_cmdline_tv_options ===========
[17:23:15] =============== [PASSED] drm_cmdline_parser ================
[17:23:15] ================ drm_get_tv_mode_from_name  ================
[17:23:15] ========== drm_test_get_tv_mode_from_name_valid  ===========
[17:23:15] [PASSED] NTSC
[17:23:15] [PASSED] NTSC-443
[17:23:15] [PASSED] NTSC-J
[17:23:15] [PASSED] PAL
[17:23:15] [PASSED] PAL-M
[17:23:15] [PASSED] PAL-N
[17:23:15] [PASSED] SECAM
[17:23:15] ====== [PASSED] drm_test_get_tv_mode_from_name_valid =======
[17:23:15] [PASSED] drm_test_get_tv_mode_from_name_truncated
[17:23:15] ============ [PASSED] drm_get_tv_mode_from_name ============
[17:23:15] ==================== drm_damage_helper  ====================
[17:23:15] [PASSED] drm_test_damage_iter_no_damage
[17:23:15] [PASSED] drm_test_damage_iter_no_damage_fractional_src
[17:23:15] [PASSED] drm_test_damage_iter_no_damage_src_moved
[17:23:15] [PASSED] drm_test_damage_iter_no_damage_fractional_src_moved
[17:23:15] [PASSED] drm_test_damage_iter_no_damage_not_visible
[17:23:15] [PASSED] drm_test_damage_iter_no_damage_no_crtc
[17:23:15] [PASSED] drm_test_damage_iter_no_damage_no_fb
[17:23:15] [PASSED] drm_test_damage_iter_simple_damage
[17:23:15] [PASSED] drm_test_damage_iter_single_damage
[17:23:15] [PASSED] drm_test_damage_iter_single_damage_intersect_src
[17:23:15] [PASSED] drm_test_damage_iter_single_damage_outside_src
[17:23:15] [PASSED] drm_test_damage_iter_single_damage_fractional_src
[17:23:15] [PASSED] drm_test_damage_iter_single_damage_intersect_fractional_src
[17:23:15] [PASSED] drm_test_damage_iter_single_damage_outside_fractional_src
[17:23:15] [PASSED] drm_test_damage_iter_single_damage_src_moved
[17:23:15] [PASSED] drm_test_damage_iter_single_damage_fractional_src_moved
[17:23:15] [PASSED] drm_test_damage_iter_damage
[17:23:15] [PASSED] drm_test_damage_iter_damage_one_intersect
[17:23:15] [PASSED] drm_test_damage_iter_damage_one_outside
[17:23:15] [PASSED] drm_test_damage_iter_damage_src_moved
[17:23:15] [PASSED] drm_test_damage_iter_damage_not_visible
[17:23:15] ================ [PASSED] drm_damage_helper ================
[17:23:15] ==================== drm_dp_mst_helper  ====================
[17:23:15] ============== drm_test_dp_mst_calc_pbn_mode  ==============
[17:23:15] [PASSED] Clock 154000 BPP 30 DSC disabled
[17:23:15] [PASSED] Clock 234000 BPP 30 DSC disabled
[17:23:15] [PASSED] Clock 297000 BPP 24 DSC disabled
[17:23:15] [PASSED] Clock 332880 BPP 24 DSC enabled
[17:23:15] [PASSED] Clock 324540 BPP 24 DSC enabled
[17:23:15] ========== [PASSED] drm_test_dp_mst_calc_pbn_mode ==========
[17:23:15] ========= drm_test_dp_mst_sideband_msg_req_decode  =========
[17:23:15] [PASSED] DP_ENUM_PATH_RESOURCES with port number
[17:23:15] [PASSED] DP_POWER_UP_PHY with port number
[17:23:15] [PASSED] DP_POWER_DOWN_PHY with port number
[17:23:15] [PASSED] DP_ALLOCATE_PAYLOAD with SDP stream sinks
[17:23:15] [PASSED] DP_ALLOCATE_PAYLOAD with port number
[17:23:15] [PASSED] DP_ALLOCATE_PAYLOAD with VCPI
[17:23:15] [PASSED] DP_ALLOCATE_PAYLOAD with PBN
[17:23:15] [PASSED] DP_QUERY_PAYLOAD with port number
[17:23:15] [PASSED] DP_QUERY_PAYLOAD with VCPI
[17:23:15] [PASSED] DP_REMOTE_DPCD_READ with port number
[17:23:15] [PASSED] DP_REMOTE_DPCD_READ with DPCD address
[17:23:15] [PASSED] DP_REMOTE_DPCD_READ with max number of bytes
[17:23:15] [PASSED] DP_REMOTE_DPCD_WRITE with port number
[17:23:15] [PASSED] DP_REMOTE_DPCD_WRITE with DPCD address
[17:23:15] [PASSED] DP_REMOTE_DPCD_WRITE with data array
[17:23:15] [PASSED] DP_REMOTE_I2C_READ with port number
[17:23:15] [PASSED] DP_REMOTE_I2C_READ with I2C device ID
[17:23:15] [PASSED] DP_REMOTE_I2C_READ with transactions array
[17:23:15] [PASSED] DP_REMOTE_I2C_WRITE with port number
[17:23:15] [PASSED] DP_REMOTE_I2C_WRITE with I2C device ID
[17:23:15] [PASSED] DP_REMOTE_I2C_WRITE with data array
[17:23:15] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream ID
[17:23:15] [PASSED] DP_QUERY_STREAM_ENC_STATUS with client ID
[17:23:15] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream event
[17:23:15] [PASSED] DP_QUERY_STREAM_ENC_STATUS with valid stream event
[17:23:15] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream behavior
[17:23:15] [PASSED] DP_QUERY_STREAM_ENC_STATUS with a valid stream behavior
[17:23:15] ===== [PASSED] drm_test_dp_mst_sideband_msg_req_decode =====
[17:23:15] ================ [PASSED] drm_dp_mst_helper ================
[17:23:15] ================= drm_format_helper_test  ==================
[17:23:15] ============== drm_test_fb_xrgb8888_to_gray8  ==============
[17:23:15] [PASSED] single_pixel_source_buffer
[17:23:15] [PASSED] single_pixel_clip_rectangle
[17:23:15] [PASSED] well_known_colors
[17:23:15] [PASSED] destination_pitch
[17:23:15] ========== [PASSED] drm_test_fb_xrgb8888_to_gray8 ==========
[17:23:15] ============= drm_test_fb_xrgb8888_to_rgb332  ==============
[17:23:15] [PASSED] single_pixel_source_buffer
[17:23:15] [PASSED] single_pixel_clip_rectangle
[17:23:15] [PASSED] well_known_colors
[17:23:15] [PASSED] destination_pitch
[17:23:15] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb332 ==========
[17:23:15] ============= drm_test_fb_xrgb8888_to_rgb565  ==============
[17:23:15] [PASSED] single_pixel_source_buffer
[17:23:15] [PASSED] single_pixel_clip_rectangle
[17:23:15] [PASSED] well_known_colors
[17:23:15] [PASSED] destination_pitch
[17:23:15] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb565 ==========
[17:23:15] ============ drm_test_fb_xrgb8888_to_xrgb1555  =============
[17:23:15] [PASSED] single_pixel_source_buffer
[17:23:15] [PASSED] single_pixel_clip_rectangle
[17:23:15] [PASSED] well_known_colors
[17:23:15] [PASSED] destination_pitch
[17:23:15] ======== [PASSED] drm_test_fb_xrgb8888_to_xrgb1555 =========
[17:23:15] ============ drm_test_fb_xrgb8888_to_argb1555  =============
[17:23:15] [PASSED] single_pixel_source_buffer
[17:23:15] [PASSED] single_pixel_clip_rectangle
[17:23:15] [PASSED] well_known_colors
[17:23:15] [PASSED] destination_pitch
[17:23:15] ======== [PASSED] drm_test_fb_xrgb8888_to_argb1555 =========
[17:23:15] ============ drm_test_fb_xrgb8888_to_rgba5551  =============
[17:23:15] [PASSED] single_pixel_source_buffer
[17:23:15] [PASSED] single_pixel_clip_rectangle
[17:23:15] [PASSED] well_known_colors
[17:23:15] [PASSED] destination_pitch
[17:23:15] ======== [PASSED] drm_test_fb_xrgb8888_to_rgba5551 =========
[17:23:15] ============= drm_test_fb_xrgb8888_to_rgb888  ==============
[17:23:15] [PASSED] single_pixel_source_buffer
[17:23:15] [PASSED] single_pixel_clip_rectangle
[17:23:15] [PASSED] well_known_colors
[17:23:15] [PASSED] destination_pitch
[17:23:15] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb888 ==========
[17:23:15] ============ drm_test_fb_xrgb8888_to_argb8888  =============
[17:23:15] [PASSED] single_pixel_source_buffer
[17:23:15] [PASSED] single_pixel_clip_rectangle
[17:23:15] [PASSED] well_known_colors
[17:23:15] [PASSED] destination_pitch
[17:23:15] ======== [PASSED] drm_test_fb_xrgb8888_to_argb8888 =========
[17:23:15] =========== drm_test_fb_xrgb8888_to_xrgb2101010  ===========
[17:23:15] [PASSED] single_pixel_source_buffer
[17:23:15] [PASSED] single_pixel_clip_rectangle
[17:23:15] [PASSED] well_known_colors
[17:23:15] [PASSED] destination_pitch
[17:23:15] ======= [PASSED] drm_test_fb_xrgb8888_to_xrgb2101010 =======
[17:23:15] =========== drm_test_fb_xrgb8888_to_argb2101010  ===========
[17:23:15] [PASSED] single_pixel_source_buffer
[17:23:15] [PASSED] single_pixel_clip_rectangle
[17:23:15] [PASSED] well_known_colors
[17:23:15] [PASSED] destination_pitch
[17:23:15] ======= [PASSED] drm_test_fb_xrgb8888_to_argb2101010 =======
[17:23:15] ============== drm_test_fb_xrgb8888_to_mono  ===============
[17:23:15] [PASSED] single_pixel_source_buffer
[17:23:15] [PASSED] single_pixel_clip_rectangle
[17:23:15] [PASSED] well_known_colors
[17:23:15] [PASSED] destination_pitch
[17:23:15] ========== [PASSED] drm_test_fb_xrgb8888_to_mono ===========
[17:23:15] ==================== drm_test_fb_swab  =====================
[17:23:15] [PASSED] single_pixel_source_buffer
[17:23:15] [PASSED] single_pixel_clip_rectangle
[17:23:15] [PASSED] well_known_colors
[17:23:15] [PASSED] destination_pitch
[17:23:15] ================ [PASSED] drm_test_fb_swab =================
[17:23:15] ================= drm_test_fb_clip_offset  =================
[17:23:15] [PASSED] pass through
[17:23:15] [PASSED] horizontal offset
[17:23:15] [PASSED] vertical offset
[17:23:15] [PASSED] horizontal and vertical offset
[17:23:15] [PASSED] horizontal offset (custom pitch)
[17:23:15] [PASSED] vertical offset (custom pitch)
[17:23:15] [PASSED] horizontal and vertical offset (custom pitch)
[17:23:15] ============= [PASSED] drm_test_fb_clip_offset =============
[17:23:15] ============== drm_test_fb_build_fourcc_list  ==============
[17:23:15] [PASSED] no native formats
[17:23:15] [PASSED] XRGB8888 as native format
[17:23:15] [PASSED] remove duplicates
[17:23:15] [PASSED] convert alpha formats
[17:23:15] [PASSED] random formats
[17:23:15] ========== [PASSED] drm_test_fb_build_fourcc_list ==========
[17:23:15] =================== drm_test_fb_memcpy  ====================
[17:23:15] [PASSED] single_pixel_source_buffer: XR24 little-endian (0x34325258)
[17:23:15] [PASSED] single_pixel_source_buffer: XRA8 little-endian (0x38415258)
[17:23:15] [PASSED] single_pixel_source_buffer: YU24 little-endian (0x34325559)
[17:23:15] [PASSED] single_pixel_clip_rectangle: XB24 little-endian (0x34324258)
[17:23:15] [PASSED] single_pixel_clip_rectangle: XRA8 little-endian (0x38415258)
[17:23:15] [PASSED] single_pixel_clip_rectangle: YU24 little-endian (0x34325559)
[17:23:15] [PASSED] well_known_colors: XB24 little-endian (0x34324258)
[17:23:15] [PASSED] well_known_colors: XRA8 little-endian (0x38415258)
[17:23:15] [PASSED] well_known_colors: YU24 little-endian (0x34325559)
[17:23:15] [PASSED] destination_pitch: XB24 little-endian (0x34324258)
[17:23:15] [PASSED] destination_pitch: XRA8 little-endian (0x38415258)
[17:23:15] [PASSED] destination_pitch: YU24 little-endian (0x34325559)
[17:23:15] =============== [PASSED] drm_test_fb_memcpy ================
[17:23:15] ============= [PASSED] drm_format_helper_test ==============
[17:23:15] ======================= drm_format  ========================
[17:23:15] [PASSED] drm_test_format_block_width_invalid
[17:23:15] [PASSED] drm_test_format_block_width_one_plane
[17:23:15] [PASSED] drm_test_format_block_width_two_plane
[17:23:15] [PASSED] drm_test_format_block_width_three_plane
[17:23:15] [PASSED] drm_test_format_block_width_tiled
[17:23:15] [PASSED] drm_test_format_block_height_invalid
[17:23:15] [PASSED] drm_test_format_block_height_one_plane
[17:23:15] [PASSED] drm_test_format_block_height_two_plane
[17:23:15] [PASSED] drm_test_format_block_height_three_plane
[17:23:15] [PASSED] drm_test_format_block_height_tiled
[17:23:15] [PASSED] drm_test_format_min_pitch_invalid
[17:23:15] [PASSED] drm_test_format_min_pitch_one_plane_8bpp
[17:23:15] [PASSED] drm_test_format_min_pitch_one_plane_16bpp
[17:23:15] [PASSED] drm_test_format_min_pitch_one_plane_24bpp
[17:23:15] [PASSED] drm_test_format_min_pitch_one_plane_32bpp
[17:23:15] [PASSED] drm_test_format_min_pitch_two_plane
[17:23:15] [PASSED] drm_test_format_min_pitch_three_plane_8bpp
[17:23:15] [PASSED] drm_test_format_min_pitch_tiled
[17:23:15] =================== [PASSED] drm_format ====================
[17:23:15] ===================== drm_framebuffer  =====================
[17:23:15] =============== drm_test_framebuffer_create  ===============
[17:23:15] [PASSED] ABGR8888 normal sizes
[17:23:15] [PASSED] ABGR8888 max sizes
[17:23:15] [PASSED] ABGR8888 pitch greater than min required
[17:23:15] [PASSED] ABGR8888 pitch less than min required
[17:23:15] [PASSED] ABGR8888 Invalid width
[17:23:15] [PASSED] ABGR8888 Invalid buffer handle
[17:23:15] [PASSED] No pixel format
[17:23:15] [PASSED] ABGR8888 Width 0
[17:23:15] [PASSED] ABGR8888 Height 0
[17:23:15] [PASSED] ABGR8888 Out of bound height * pitch combination
[17:23:15] [PASSED] ABGR8888 Large buffer offset
[17:23:15] [PASSED] ABGR8888 Set DRM_MODE_FB_MODIFIERS without modifiers
[17:23:15] [PASSED] ABGR8888 Valid buffer modifier
[17:23:15] [PASSED] ABGR8888 Invalid buffer modifier(DRM_FORMAT_MOD_SAMSUNG_64_32_TILE)
[17:23:15] [PASSED] ABGR8888 Extra pitches without DRM_MODE_FB_MODIFIERS
[17:23:15] [PASSED] ABGR8888 Extra pitches with DRM_MODE_FB_MODIFIERS
[17:23:15] [PASSED] NV12 Normal sizes
[17:23:15] [PASSED] NV12 Max sizes
[17:23:15] [PASSED] NV12 Invalid pitch
[17:23:15] [PASSED] NV12 Invalid modifier/missing DRM_MODE_FB_MODIFIERS flag
[17:23:15] [PASSED] NV12 different  modifier per-plane
[17:23:15] [PASSED] NV12 with DRM_FORMAT_MOD_SAMSUNG_64_32_TILE
[17:23:15] [PASSED] NV12 Valid modifiers without DRM_MODE_FB_MODIFIERS
[17:23:15] [PASSED] NV12 Modifier for inexistent plane
[17:23:15] [PASSED] NV12 Handle for inexistent plane
[17:23:15] [PASSED] NV12 Handle for inexistent plane without DRM_MODE_FB_MODIFIERS
[17:23:15] [PASSED] YVU420 DRM_MODE_FB_MODIFIERS set without modifier
[17:23:15] [PASSED] YVU420 Normal sizes
[17:23:15] [PASSED] YVU420 Max sizes
[17:23:15] [PASSED] YVU420 Invalid pitch
[17:23:15] [PASSED] YVU420 Different pitches
[17:23:15] [PASSED] YVU420 Different buffer offsets/pitches
[17:23:15] [PASSED] YVU420 Modifier set just for plane 0, without DRM_MODE_FB_MODIFIERS
[17:23:15] [PASSED] YVU420 Modifier set just for planes 0, 1, without DRM_MODE_FB_MODIFIERS
[17:23:15] [PASSED] YVU420 Modifier set just for plane 0, 1, with DRM_MODE_FB_MODIFIERS
[17:23:15] [PASSED] YVU420 Valid modifier
[17:23:15] [PASSED] YVU420 Different modifiers per plane
[17:23:15] [PASSED] YVU420 Modifier for inexistent plane
[17:23:15] [PASSED] X0L2 Normal sizes
[17:23:15] [PASSED] X0L2 Max sizes
[17:23:15] [PASSED] X0L2 Invalid pitch
[17:23:15] [PASSED] X0L2 Pitch greater than minimum required
[17:23:15] [PASSED] X0L2 Handle for inexistent plane
[17:23:15] [PASSED] X0L2 Offset for inexistent plane, without DRM_MODE_FB_MODIFIERS set
[17:23:15] [PASSED] X0L2 Modifier without DRM_MODE_FB_MODIFIERS set
[17:23:15] [PASSED] X0L2 Valid modifier
[17:23:15] [PASSED] X0L2 Modifier for inexistent plane
[17:23:15] =========== [PASSED] drm_test_framebuffer_create ===========
[17:23:15] ================= [PASSED] drm_framebuffer =================
[17:23:15] ==================== drm-test-managed  =====================
[17:23:15] [PASSED] drm_test_managed_run_action
[17:23:15] ================ [PASSED] drm-test-managed =================
[17:23:15] ========================= drm_mm  ==========================
[17:23:15] [PASSED] drm_test_mm_init
[17:23:15] [PASSED] drm_test_mm_debug
[17:23:25] [PASSED] drm_test_mm_reserve
[17:23:35] [PASSED] drm_test_mm_insert
[17:23:36] [PASSED] drm_test_mm_replace
[17:23:36] [PASSED] drm_test_mm_insert_range
[17:23:36] [PASSED] drm_test_mm_frag
[17:23:36] [PASSED] drm_test_mm_align
[17:23:36] [PASSED] drm_test_mm_align32
[17:23:36] [PASSED] drm_test_mm_align64
[17:23:36] [PASSED] drm_test_mm_evict
[17:23:36] [PASSED] drm_test_mm_evict_range
[17:23:36] [PASSED] drm_test_mm_topdown
[17:23:36] [PASSED] drm_test_mm_bottomup
[17:23:36] [PASSED] drm_test_mm_lowest
[17:23:37] [PASSED] drm_test_mm_highest
[17:23:37] [PASSED] drm_test_mm_color
[17:23:38] [PASSED] drm_test_mm_color_evict
[17:23:38] [PASSED] drm_test_mm_color_evict_range
[17:23:38] ===================== [PASSED] drm_mm ======================
[17:23:38] =================== drm_modes_analog_tv  ===================
[17:23:38] [PASSED] drm_test_modes_analog_tv_ntsc_480i
[17:23:38] [PASSED] drm_test_modes_analog_tv_ntsc_480i_inlined
[17:23:38] [PASSED] drm_test_modes_analog_tv_pal_576i
[17:23:38] [PASSED] drm_test_modes_analog_tv_pal_576i_inlined
[17:23:38] =============== [PASSED] drm_modes_analog_tv ===============
[17:23:38] ==================== drm_plane_helper  =====================
[17:23:38] =============== drm_test_check_plane_state  ================
[17:23:38] [PASSED] clipping_simple
[17:23:38] [PASSED] clipping_rotate_reflect
[17:23:38] [PASSED] positioning_simple
[17:23:38] [PASSED] upscaling
[17:23:38] [PASSED] downscaling
[17:23:38] [PASSED] rounding1
[17:23:38] [PASSED] rounding2
[17:23:38] [PASSED] rounding3
[17:23:38] [PASSED] rounding4
[17:23:38] =========== [PASSED] drm_test_check_plane_state ============
[17:23:38] =========== drm_test_check_invalid_plane_state  ============
[17:23:38] [PASSED] positioning_invalid
[17:23:38] [PASSED] upscaling_invalid
[17:23:38] [PASSED] downscaling_invalid
[17:23:38] ======= [PASSED] drm_test_check_invalid_plane_state ========
[17:23:38] ================ [PASSED] drm_plane_helper =================
[17:23:38] ============ drm_connector_helper_tv_get_modes  ============
[17:23:38] ====== drm_test_connector_helper_tv_get_modes_check  =======
[17:23:38] [PASSED] None
[17:23:38] [PASSED] PAL
[17:23:38] [PASSED] NTSC
[17:23:38] [PASSED] Both, NTSC Default
[17:23:38] [PASSED] Both, PAL Default
[17:23:38] [PASSED] Both, NTSC Default, with PAL on command-line
[17:23:38] [PASSED] Both, PAL Default, with NTSC on command-line
[17:23:38] == [PASSED] drm_test_connector_helper_tv_get_modes_check ===
[17:23:38] ======== [PASSED] drm_connector_helper_tv_get_modes ========
[17:23:38] ======================== drm_rect  =========================
[17:23:38] [PASSED] drm_test_rect_clip_scaled_div_by_zero
[17:23:38] [PASSED] drm_test_rect_clip_scaled_not_clipped
[17:23:38] [PASSED] drm_test_rect_clip_scaled_clipped
[17:23:38] [PASSED] drm_test_rect_clip_scaled_signed_vs_unsigned
[17:23:38] ================= drm_test_rect_intersect  =================
[17:23:38] [PASSED] top-left x bottom-right: 2x2+1+1 x 2x2+0+0
[17:23:38] [PASSED] top-right x bottom-left: 2x2+0+0 x 2x2+1-1
[17:23:38] [PASSED] bottom-left x top-right: 2x2+1-1 x 2x2+0+0
[17:23:38] [PASSED] bottom-right x top-left: 2x2+0+0 x 2x2+1+1
[17:23:38] [PASSED] right x left: 2x1+0+0 x 3x1+1+0
[17:23:38] [PASSED] left x right: 3x1+1+0 x 2x1+0+0
[17:23:38] [PASSED] up x bottom: 1x2+0+0 x 1x3+0-1
[17:23:38] [PASSED] bottom x up: 1x3+0-1 x 1x2+0+0
[17:23:38] [PASSED] touching corner: 1x1+0+0 x 2x2+1+1
[17:23:38] [PASSED] touching side: 1x1+0+0 x 1x1+1+0
[17:23:38] [PASSED] equal rects: 2x2+0+0 x 2x2+0+0
[17:23:38] [PASSED] inside another: 2x2+0+0 x 1x1+1+1
[17:23:38] [PASSED] far away: 1x1+0+0 x 1x1+3+6
[17:23:38] [PASSED] points intersecting: 0x0+5+10 x 0x0+5+10
[17:23:38] [PASSED] points not intersecting: 0x0+0+0 x 0x0+5+10
[17:23:38] ============= [PASSED] drm_test_rect_intersect =============
[17:23:38] ================ drm_test_rect_calc_hscale  ================
[17:23:38] [PASSED] normal use
[17:23:38] [PASSED] out of max range
[17:23:38] [PASSED] out of min range
[17:23:38] [PASSED] zero dst
[17:23:38] [PASSED] negative src
[17:23:38] [PASSED] negative dst
[17:23:38] ============ [PASSED] drm_test_rect_calc_hscale ============
[17:23:38] ================ drm_test_rect_calc_vscale  ================
[17:23:38] [PASSED] normal use
[17:23:38] [PASSED] out of max range
[17:23:38] [PASSED] out of min range
[17:23:38] [PASSED] zero dst
[17:23:38] [PASSED] negative src
[17:23:38] [PASSED] negative dst
[17:23:38] ============ [PASSED] drm_test_rect_calc_vscale ============
[17:23:38] ================== drm_test_rect_rotate  ===================
[17:23:38] [PASSED] reflect-x
[17:23:38] [PASSED] reflect-y
[17:23:38] [PASSED] rotate-0
[17:23:38] [PASSED] rotate-90
[17:23:38] [PASSED] rotate-180
[17:23:38] [PASSED] rotate-270
[17:23:38] ============== [PASSED] drm_test_rect_rotate ===============
[17:23:38] ================ drm_test_rect_rotate_inv  =================
[17:23:38] [PASSED] reflect-x
[17:23:38] [PASSED] reflect-y
[17:23:38] [PASSED] rotate-0
[17:23:38] [PASSED] rotate-90
[17:23:38] [PASSED] rotate-180
[17:23:38] [PASSED] rotate-270
[17:23:38] ============ [PASSED] drm_test_rect_rotate_inv =============
stty: 'standard input': Inappropriate ioctl for device
[17:23:38] ==================== [PASSED] drm_rect =====================
[17:23:38] ======================== drm_exec  =========================
[17:23:38] [PASSED] sanitycheck
[17:23:38] [PASSED] test_lock
[17:23:38] [PASSED] test_lock_unlock
[17:23:38] [PASSED] test_duplicates
[17:23:38] [PASSED] test_prepare
[17:23:38] [PASSED] test_prepare_array
[17:23:38] [PASSED] test_multiple_loops
[17:23:38] ==================== [PASSED] drm_exec =====================
[17:23:38] ============================================================
[17:23:38] Testing complete. Ran 368 tests: passed: 368
[17:23:38] Elapsed time: 44.289s total, 1.678s configuring, 19.379s building, 23.230s running

+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Intel-xe] [PATCH v2] drm/xe: implement driver initiated function-reset
  2023-10-11 13:31 [Intel-xe] [PATCH v2] drm/xe: implement driver initiated function-reset Andrzej Hajda
                   ` (2 preceding siblings ...)
  2023-10-11 17:23 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
@ 2023-10-13 20:31 ` Rodrigo Vivi
  3 siblings, 0 replies; 5+ messages in thread
From: Rodrigo Vivi @ 2023-10-13 20:31 UTC (permalink / raw)
  To: Andrzej Hajda; +Cc: intel-xe

On Wed, Oct 11, 2023 at 03:31:18PM +0200, Andrzej Hajda wrote:
> Driver initiated function-reset (FLR) is the highest level of reset
> that we can trigger from within the driver. In contrast to PCI FLR it
> doesn't require re-enumeration of PCI BAR. It can be useful in case
> GT fails to reset. It is also the only way to trigger GSC reset from
> the driver and can be used in future addition of GSC support.
> 
> v2:
>   - use regs from xe_regs.h
>   - move the flag to xe.mmio
>   - call flr only on root gt
>   - use BIOS protection check
>   - copy/paste comments from i915
> 
> Signed-off-by: Andrzej Hajda <andrzej.hajda@intel.com>
> ---
> Hi all,
> 
> This is initial attempt to implement Driver-FLR in xe. Implementation
> is copied from i915. I've skipped comments, but I can re-add them if
> requested.
> In i915 Driver-FLR is performed on driver unload if GSC was used.
> In xe GSC is not yet supported, but I have added trigger to perform FLR
> in case GT fails to reset, I guess this could be proper use-case and
> of course this is prerequisite to GSC support.
> 
> Regards
> Andrzej
> ---
>  drivers/gpu/drm/xe/regs/xe_regs.h    |  7 +++
>  drivers/gpu/drm/xe/xe_device_types.h |  2 +
>  drivers/gpu/drm/xe/xe_gt.c           |  2 +
>  drivers/gpu/drm/xe/xe_mmio.c         | 82 ++++++++++++++++++++++++++++

The placement is still strange. Why mmio component should be responsible
or need this?

It is actually the other way around, this is an user of the xe_mmio to
trigger the FLR.

It should probably be in xe_device?

And then installed to drmm action reset or fini like recommended by Ofir.

>  4 files changed, 93 insertions(+)
> 
> diff --git a/drivers/gpu/drm/xe/regs/xe_regs.h b/drivers/gpu/drm/xe/regs/xe_regs.h
> index dbb0ea1a585eda..ac5fa25877766e 100644
> --- a/drivers/gpu/drm/xe/regs/xe_regs.h
> +++ b/drivers/gpu/drm/xe/regs/xe_regs.h
> @@ -53,8 +53,15 @@
>  
>  #define SOFTWARE_FLAGS_SPR33			XE_REG(0x4f084)
>  
> +#define GU_CNTL_PROTECTED			XE_REG(0x10100C)
> +#define   DRIVERINT_FLR_DIS			REG_BIT(31)
> +
>  #define GU_CNTL					XE_REG(0x101010)
>  #define   LMEM_INIT				REG_BIT(7)
> +#define   DRIVERFLR				REG_BIT(31)
> +
> +#define GU_DEBUG				XE_REG(0x101018)
> +#define   DRIVERFLR_STATUS			REG_BIT(31)
>  
>  #define XEHP_CLOCK_GATE_DIS			XE_REG(0x101014)
>  #define   SGSI_SIDECLK_DIS			REG_BIT(17)
> diff --git a/drivers/gpu/drm/xe/xe_device_types.h b/drivers/gpu/drm/xe/xe_device_types.h
> index 0efa7a1d2188e9..886d1c769c27fd 100644
> --- a/drivers/gpu/drm/xe/xe_device_types.h
> +++ b/drivers/gpu/drm/xe/xe_device_types.h
> @@ -285,6 +285,8 @@ struct xe_device {
>  		size_t size;
>  		/** @regs: pointer to MMIO space for device */
>  		void *regs;
> +		/** @needs_flr_on_fini: requests function-reset on fini */
> +		bool needs_flr_on_fini;
>  	} mmio;
>  
>  	/** @mem: memory info for device */
> diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
> index c63e2e4750b1ea..37e9576b92b5da 100644
> --- a/drivers/gpu/drm/xe/xe_gt.c
> +++ b/drivers/gpu/drm/xe/xe_gt.c
> @@ -616,6 +616,8 @@ static int gt_reset(struct xe_gt *gt)
>  	xe_uevent_gt_reset_failure(to_pci_dev(gt_to_xe(gt)->drm.dev),
>  				   gt_to_tile(gt)->id, gt->info.id);
>  
> +	gt_to_xe(gt)->mmio.needs_flr_on_fini = true;
> +
>  	return err;
>  }
>  
> diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c
> index e4cf9bfec422e6..27a0ebe2324daa 100644
> --- a/drivers/gpu/drm/xe/xe_mmio.c
> +++ b/drivers/gpu/drm/xe/xe_mmio.c
> @@ -4,6 +4,7 @@
>   */
>  
>  #include <linux/minmax.h>
> +#include <linux/units.h>
>  
>  #include "xe_mmio.h"
>  
> @@ -372,6 +373,83 @@ static void xe_mmio_probe_tiles(struct xe_device *xe)
>  	}
>  }
>  
> +/*
> + * The driver-initiated FLR is the highest level of reset that we can trigger
> + * from within the driver. It is different from the PCI FLR in that it doesn't
> + * fully reset the SGUnit and doesn't modify the PCI config space and therefore
> + * it doesn't require a re-enumeration of the PCI BARs. However, the
> + * driver-initiated FLR does still cause a reset of both GT and display and a
> + * memory wipe of local and stolen memory, so recovery would require a full HW
> + * re-init and saving/restoring (or re-populating) the wiped memory. Since we
> + * perform the FLR as the very last action before releasing access to the HW
> + * during the driver release flow, we don't attempt recovery at all, because
> + * if/when a new instance of i915 is bound to the device it will do a full
> + * re-init anyway.
> + */
> +static void driver_flr(struct xe_device *xe)
> +{
> +	const unsigned int flr_timeout = 3 * MICRO; /* specs recommend a 3s wait */
> +	struct xe_gt *gt = xe_root_mmio_gt(xe);
> +	int ret;
> +
> +	if (xe_mmio_read32(gt, GU_CNTL_PROTECTED) & DRIVERINT_FLR_DIS) {
> +		drm_info_once(&xe->drm, "BIOS Disabled Driver-FLR\n");
> +		return;
> +	}
> +
> +	drm_dbg(&xe->drm, "Triggering Driver-FLR\n");
> +
> +	/*
> +	 * Make sure any pending FLR requests have cleared by waiting for the
> +	 * FLR trigger bit to go to zero. Also clear GU_DEBUG's DRIVERFLR_STATUS
> +	 * to make sure it's not still set from a prior attempt (it's a write to
> +	 * clear bit).
> +	 * Note that we should never be in a situation where a previous attempt
> +	 * is still pending (unless the HW is totally dead), but better to be
> +	 * safe in case something unexpected happens
> +	 */
> +	ret = xe_mmio_wait32(gt, GU_CNTL, DRIVERFLR, 0, flr_timeout, NULL, false);
> +	if (ret) {
> +		drm_err(&xe->drm, "Driver-FLR-prepare wait for ready failed! %d\n", ret);
> +		return;
> +	}
> +	xe_mmio_write32(gt, GU_DEBUG, DRIVERFLR_STATUS);
> +
> +	/* Trigger the actual Driver-FLR */
> +	xe_mmio_rmw32(gt, GU_CNTL, 0, DRIVERFLR);
> +
> +	/* Wait for hardware teardown to complete */
> +	ret = xe_mmio_wait32(gt, GU_CNTL, DRIVERFLR, 0, flr_timeout, NULL, false);
> +	if (ret) {
> +		drm_err(&xe->drm, "Driver-FLR-teardown wait completion failed! %d\n", ret);
> +		return;
> +	}
> +
> +	/* Wait for hardware/firmware re-init to complete */
> +	ret = xe_mmio_wait32(gt, GU_DEBUG, DRIVERFLR_STATUS, DRIVERFLR_STATUS,
> +			     flr_timeout, NULL, false);
> +	if (ret) {
> +		drm_err(&xe->drm, "Driver-FLR-reinit wait completion failed! %d\n", ret);
> +		return;
> +	}
> +
> +	/* Clear sticky completion status */
> +	xe_mmio_write32(gt, GU_DEBUG, DRIVERFLR_STATUS);
> +}
> +
> +static void driver_flr_fini(struct drm_device *drm, void *arg)
> +{
> +	struct xe_device *xe = arg;
> +
> +	if (xe->mmio.needs_flr_on_fini)
> +		driver_flr(xe);
> +}
> +
> +static int driver_flr_init(struct xe_device *xe)
> +{
> +	return drmm_add_action_or_reset(&xe->drm, driver_flr_fini, xe);
> +}
> +
>  static void mmio_fini(struct drm_device *drm, void *arg)
>  {
>  	struct xe_device *xe = arg;
> @@ -405,6 +483,10 @@ int xe_mmio_init(struct xe_device *xe)
>  	if (err)
>  		return err;
>  
> +	err = driver_flr_init(xe);
> +	if (err)
> +		return err;
> +
>  	/* Setup first tile; other tiles (if present) will be setup later. */
>  	root_tile->mmio.size = xe->mmio.size;
>  	root_tile->mmio.regs = xe->mmio.regs;
> -- 
> 2.34.1
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-10-13 20:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-11 13:31 [Intel-xe] [PATCH v2] drm/xe: implement driver initiated function-reset Andrzej Hajda
2023-10-11 17:22 ` [Intel-xe] ✓ CI.Patch_applied: success for " Patchwork
2023-10-11 17:22 ` [Intel-xe] ✓ CI.checkpatch: " Patchwork
2023-10-11 17:23 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-10-13 20:31 ` [Intel-xe] [PATCH v2] " Rodrigo Vivi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.