hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/drivers/gpu/arm/bifrost/csf/mali_kbase_csf_firmware.h
....@@ -1,7 +1,7 @@
11 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
22 /*
33 *
4
- * (C) COPYRIGHT 2018-2021 ARM Limited. All rights reserved.
4
+ * (C) COPYRIGHT 2018-2022 ARM Limited. All rights reserved.
55 *
66 * This program is free software and is provided to you under the terms of the
77 * GNU General Public License version 2 as published by the Free Software
....@@ -23,7 +23,7 @@
2323 #define _KBASE_CSF_FIRMWARE_H_
2424
2525 #include "device/mali_kbase_device.h"
26
-#include <uapi/gpu/arm/bifrost/csf/mali_gpu_csf_registers.h>
26
+#include <csf/mali_kbase_csf_registers.h>
2727
2828 /*
2929 * PAGE_KERNEL_RO was only defined on 32bit ARM in 4.19 in:
....@@ -75,11 +75,8 @@
7575 #define MAX_SUPPORTED_CSGS 31
7676 /* GROUP_STREAM_NUM: At least 8 CSs per CSG, but no more than 32 */
7777 #define MIN_SUPPORTED_STREAMS_PER_GROUP 8
78
-/* Maximum CSs per csg. */
78
+/* MAX_SUPPORTED_STREAMS_PER_GROUP: Maximum CSs per csg. */
7979 #define MAX_SUPPORTED_STREAMS_PER_GROUP 32
80
-
81
-/* Waiting timeout for status change acknowledgment, in milliseconds */
82
-#define CSF_FIRMWARE_TIMEOUT_MS (3000) /* Relaxed to 3000ms from 800ms due to Android */
8380
8481 struct kbase_device;
8582
....@@ -327,36 +324,25 @@
327324 u32 kbase_csf_firmware_global_output(
328325 const struct kbase_csf_global_iface *iface, u32 offset);
329326
330
-/* Calculate the offset to the Hw doorbell page corresponding to the
331
- * doorbell number.
327
+/**
328
+ * kbase_csf_ring_doorbell() - Ring the doorbell
329
+ *
330
+ * @kbdev: An instance of the GPU platform device
331
+ * @doorbell_nr: Index of the HW doorbell page
332332 */
333
-static u32 csf_doorbell_offset(int doorbell_nr)
334
-{
335
- WARN_ON(doorbell_nr >= CSF_NUM_DOORBELL);
336
-
337
- return CSF_HW_DOORBELL_PAGE_OFFSET +
338
- (doorbell_nr * CSF_HW_DOORBELL_PAGE_SIZE);
339
-}
340
-
341
-static inline void kbase_csf_ring_doorbell(struct kbase_device *kbdev,
342
- int doorbell_nr)
343
-{
344
- WARN_ON(doorbell_nr >= CSF_NUM_DOORBELL);
345
-
346
- kbase_reg_write(kbdev, csf_doorbell_offset(doorbell_nr), (u32)1);
347
-}
333
+void kbase_csf_ring_doorbell(struct kbase_device *kbdev, int doorbell_nr);
348334
349335 /**
350336 * kbase_csf_read_firmware_memory - Read a value in a GPU address
337
+ *
338
+ * @kbdev: Device pointer
339
+ * @gpu_addr: GPU address to read
340
+ * @value: output pointer to which the read value will be written.
351341 *
352342 * This function read a value in a GPU address that belongs to
353343 * a private firmware memory region. The function assumes that the location
354344 * is not permanently mapped on the CPU address space, therefore it maps it
355345 * and then unmaps it to access it independently.
356
- *
357
- * @kbdev: Device pointer
358
- * @gpu_addr: GPU address to read
359
- * @value: output pointer to which the read value will be written.
360346 */
361347 void kbase_csf_read_firmware_memory(struct kbase_device *kbdev,
362348 u32 gpu_addr, u32 *value);
....@@ -364,20 +350,58 @@
364350 /**
365351 * kbase_csf_update_firmware_memory - Write a value in a GPU address
366352 *
353
+ * @kbdev: Device pointer
354
+ * @gpu_addr: GPU address to write
355
+ * @value: Value to write
356
+ *
367357 * This function writes a given value in a GPU address that belongs to
368358 * a private firmware memory region. The function assumes that the destination
369359 * is not permanently mapped on the CPU address space, therefore it maps it
370360 * and then unmaps it to access it independently.
371
- *
372
- * @kbdev: Device pointer
373
- * @gpu_addr: GPU address to write
374
- * @value: Value to write
375361 */
376362 void kbase_csf_update_firmware_memory(struct kbase_device *kbdev,
377363 u32 gpu_addr, u32 value);
378364
379365 /**
380
- * kbase_csf_firmware_early_init() - Early initializatin for the firmware.
366
+ * kbase_csf_read_firmware_memory_exe - Read a value in a GPU address in the
367
+ * region of its final execution location.
368
+ *
369
+ * @kbdev: Device pointer
370
+ * @gpu_addr: GPU address to read
371
+ * @value: Output pointer to which the read value will be written
372
+ *
373
+ * This function read a value in a GPU address that belongs to a private loaded
374
+ * firmware memory region based on its final execution location. The function
375
+ * assumes that the location is not permanently mapped on the CPU address space,
376
+ * therefore it maps it and then unmaps it to access it independently. This function
377
+ * needs to be used when accessing firmware memory regions which will be moved to
378
+ * their final execution location during firmware boot using an address based on the
379
+ * final execution location.
380
+ */
381
+void kbase_csf_read_firmware_memory_exe(struct kbase_device *kbdev,
382
+ u32 gpu_addr, u32 *value);
383
+
384
+/**
385
+ * kbase_csf_update_firmware_memory_exe - Write a value in a GPU address in the
386
+ * region of its final execution location.
387
+ *
388
+ * @kbdev: Device pointer
389
+ * @gpu_addr: GPU address to write
390
+ * @value: Value to write
391
+ *
392
+ * This function writes a value in a GPU address that belongs to a private loaded
393
+ * firmware memory region based on its final execution location. The function
394
+ * assumes that the location is not permanently mapped on the CPU address space,
395
+ * therefore it maps it and then unmaps it to access it independently. This function
396
+ * needs to be used when accessing firmware memory regions which will be moved to
397
+ * their final execution location during firmware boot using an address based on the
398
+ * final execution location.
399
+ */
400
+void kbase_csf_update_firmware_memory_exe(struct kbase_device *kbdev,
401
+ u32 gpu_addr, u32 value);
402
+
403
+/**
404
+ * kbase_csf_firmware_early_init() - Early initialization for the firmware.
381405 * @kbdev: Kbase device
382406 *
383407 * Initialize resources related to the firmware. Must be called at kbase probe.
....@@ -387,43 +411,109 @@
387411 int kbase_csf_firmware_early_init(struct kbase_device *kbdev);
388412
389413 /**
390
- * kbase_csf_firmware_init() - Load the firmware for the CSF MCU
414
+ * kbase_csf_firmware_early_term() - Terminate resources related to the firmware
415
+ * after the firmware unload has been done.
416
+ *
417
+ * @kbdev: Device pointer
418
+ *
419
+ * This should be called only when kbase probe fails or gets rmmoded.
420
+ */
421
+void kbase_csf_firmware_early_term(struct kbase_device *kbdev);
422
+
423
+/**
424
+ * kbase_csf_firmware_late_init() - Late initialization for the firmware.
425
+ * @kbdev: Kbase device
426
+ *
427
+ * Initialize resources related to the firmware. But must be called after
428
+ * backend late init is done. Must be used at probe time only.
429
+ *
430
+ * Return: 0 if successful, negative error code on failure
431
+ */
432
+int kbase_csf_firmware_late_init(struct kbase_device *kbdev);
433
+
434
+/**
435
+ * kbase_csf_firmware_load_init() - Load the firmware for the CSF MCU
391436 * @kbdev: Kbase device
392437 *
393438 * Request the firmware from user space and load it into memory.
394439 *
395440 * Return: 0 if successful, negative error code on failure
396441 */
397
-int kbase_csf_firmware_init(struct kbase_device *kbdev);
442
+int kbase_csf_firmware_load_init(struct kbase_device *kbdev);
398443
399444 /**
400
- * kbase_csf_firmware_term() - Unload the firmware
445
+ * kbase_csf_firmware_unload_term() - Unload the firmware
401446 * @kbdev: Kbase device
402447 *
403
- * Frees the memory allocated by kbase_csf_firmware_init()
448
+ * Frees the memory allocated by kbase_csf_firmware_load_init()
404449 */
405
-void kbase_csf_firmware_term(struct kbase_device *kbdev);
450
+void kbase_csf_firmware_unload_term(struct kbase_device *kbdev);
451
+
452
+#if IS_ENABLED(CONFIG_MALI_CORESIGHT)
453
+/**
454
+ * kbase_csf_firmware_mcu_register_write - Write to MCU register
455
+ *
456
+ * @kbdev: Instance of a gpu platform device that implements a csf interface.
457
+ * @reg_addr: Register address to write into
458
+ * @reg_val: Value to be written
459
+ *
460
+ * Write a desired value to a register in MCU address space.
461
+ *
462
+ * return: 0 on success, or negative on failure.
463
+ */
464
+int kbase_csf_firmware_mcu_register_write(struct kbase_device *const kbdev, u32 const reg_addr,
465
+ u32 const reg_val);
466
+/**
467
+ * kbase_csf_firmware_mcu_register_read - Read from MCU register
468
+ *
469
+ * @kbdev: Instance of a gpu platform device that implements a csf interface.
470
+ * @reg_addr: Register address to read from
471
+ * @reg_val: Value as present in reg_addr register
472
+ *
473
+ * Read a value from MCU address space.
474
+ *
475
+ * return: 0 on success, or negative on failure.
476
+ */
477
+int kbase_csf_firmware_mcu_register_read(struct kbase_device *const kbdev, u32 const reg_addr,
478
+ u32 *reg_val);
479
+
480
+/**
481
+ * kbase_csf_firmware_mcu_register_poll - Poll MCU register
482
+ *
483
+ * @kbdev: Instance of a gpu platform device that implements a csf interface.
484
+ * @reg_addr: Register address to read from
485
+ * @val_mask: Value to mask the read value for comparison
486
+ * @reg_val: Value to be compared against
487
+ *
488
+ * Continue to read a value from MCU address space until it matches given mask and value.
489
+ *
490
+ * return: 0 on success, or negative on failure.
491
+ */
492
+int kbase_csf_firmware_mcu_register_poll(struct kbase_device *const kbdev, u32 const reg_addr,
493
+ u32 const val_mask, u32 const reg_val);
494
+#endif /* IS_ENABLED(CONFIG_MALI_CORESIGHT) */
406495
407496 /**
408497 * kbase_csf_firmware_ping - Send the ping request to firmware.
409498 *
410
- * The function sends the ping request to firmware.
411
- *
412499 * @kbdev: Instance of a GPU platform device that implements a CSF interface.
500
+ *
501
+ * The function sends the ping request to firmware.
413502 */
414503 void kbase_csf_firmware_ping(struct kbase_device *kbdev);
415504
416505 /**
417506 * kbase_csf_firmware_ping_wait - Send the ping request to firmware and waits.
418507 *
508
+ * @kbdev: Instance of a GPU platform device that implements a CSF interface.
509
+ * @wait_timeout_ms: Timeout to get the acknowledgment for PING request from FW.
510
+ *
419511 * The function sends the ping request to firmware and waits to confirm it is
420512 * alive.
421513 *
422
- * @kbdev: Instance of a GPU platform device that implements a CSF interface.
423
- *
424514 * Return: 0 on success, or negative on failure.
425515 */
426
-int kbase_csf_firmware_ping_wait(struct kbase_device *kbdev);
516
+int kbase_csf_firmware_ping_wait(struct kbase_device *kbdev, unsigned int wait_timeout_ms);
427517
428518 /**
429519 * kbase_csf_firmware_set_timeout - Set a hardware endpoint progress timeout.
....@@ -442,17 +532,37 @@
442532
443533 /**
444534 * kbase_csf_enter_protected_mode - Send the Global request to firmware to
445
- * enter protected mode and wait for its
446
- * completion.
535
+ * enter protected mode.
447536 *
448537 * @kbdev: Instance of a GPU platform device that implements a CSF interface.
538
+ *
539
+ * The function must be called with kbdev->csf.scheduler.interrupt_lock held
540
+ * and it does not wait for the protected mode entry to complete.
449541 */
450542 void kbase_csf_enter_protected_mode(struct kbase_device *kbdev);
451543
544
+/**
545
+ * kbase_csf_wait_protected_mode_enter - Wait for the completion of PROTM_ENTER
546
+ * Global request sent to firmware.
547
+ *
548
+ * @kbdev: Instance of a GPU platform device that implements a CSF interface.
549
+ *
550
+ * This function needs to be called after kbase_csf_enter_protected_mode() to
551
+ * wait for the GPU to actually enter protected mode. GPU reset is triggered if
552
+ * the wait is unsuccessful.
553
+ *
554
+ * Return: 0 on success, or negative on failure.
555
+ */
556
+int kbase_csf_wait_protected_mode_enter(struct kbase_device *kbdev);
557
+
452558 static inline bool kbase_csf_firmware_mcu_halted(struct kbase_device *kbdev)
453559 {
560
+#if IS_ENABLED(CONFIG_MALI_BIFROST_NO_MALI)
561
+ return true;
562
+#else
454563 return (kbase_reg_read(kbdev, GPU_CONTROL_REG(MCU_STATUS)) ==
455564 MCU_STATUS_HALTED);
565
+#endif /* CONFIG_MALI_BIFROST_NO_MALI */
456566 }
457567
458568 /**
....@@ -470,24 +580,14 @@
470580 *
471581 * @kbdev: Instance of a GPU platform device that implements a CSF interface.
472582 */
473
-static inline void kbase_csf_firmware_enable_mcu(struct kbase_device *kbdev)
474
-{
475
- /* Trigger the boot of MCU firmware, Use the AUTO mode as
476
- * otherwise on fast reset, to exit protected mode, MCU will
477
- * not reboot by itself to enter normal mode.
478
- */
479
- kbase_reg_write(kbdev, GPU_CONTROL_REG(MCU_CONTROL), MCU_CNTRL_AUTO);
480
-}
583
+void kbase_csf_firmware_enable_mcu(struct kbase_device *kbdev);
481584
482585 /**
483586 * kbase_csf_firmware_disable_mcu - Send the command to disable MCU
484587 *
485588 * @kbdev: Instance of a GPU platform device that implements a CSF interface.
486589 */
487
-static inline void kbase_csf_firmware_disable_mcu(struct kbase_device *kbdev)
488
-{
489
- kbase_reg_write(kbdev, GPU_CONTROL_REG(MCU_CONTROL), MCU_CNTRL_DISABLE);
490
-}
590
+void kbase_csf_firmware_disable_mcu(struct kbase_device *kbdev);
491591
492592 /**
493593 * kbase_csf_firmware_disable_mcu_wait - Wait for the MCU to reach disabled
....@@ -497,10 +597,30 @@
497597 */
498598 void kbase_csf_firmware_disable_mcu_wait(struct kbase_device *kbdev);
499599
600
+#ifdef KBASE_PM_RUNTIME
500601 /**
501
- * kbase_trigger_firmware_reload - Trigger the reboot of MCU firmware, for the
502
- * cold boot case firmware image would be
503
- * reloaded from filesystem into memory.
602
+ * kbase_csf_firmware_trigger_mcu_sleep - Send the command to put MCU in sleep
603
+ * state.
604
+ *
605
+ * @kbdev: Instance of a GPU platform device that implements a CSF interface.
606
+ */
607
+void kbase_csf_firmware_trigger_mcu_sleep(struct kbase_device *kbdev);
608
+
609
+/**
610
+ * kbase_csf_firmware_is_mcu_in_sleep - Check if sleep request has completed
611
+ * and MCU has halted.
612
+ *
613
+ * @kbdev: Instance of a GPU platform device that implements a CSF interface.
614
+ *
615
+ * Return: true if sleep request has completed, otherwise false.
616
+ */
617
+bool kbase_csf_firmware_is_mcu_in_sleep(struct kbase_device *kbdev);
618
+#endif
619
+
620
+/**
621
+ * kbase_csf_firmware_trigger_reload() - Trigger the reboot of MCU firmware, for
622
+ * the cold boot case firmware image would
623
+ * be reloaded from filesystem into memory.
504624 *
505625 * @kbdev: Instance of a GPU platform device that implements a CSF interface.
506626 */
....@@ -529,9 +649,9 @@
529649 * requests, sent after the reboot of MCU firmware, have
530650 * completed or not.
531651 *
532
- * Return: true if the Global configuration requests completed otherwise false.
533
- *
534652 * @kbdev: Instance of a GPU platform device that implements a CSF interface.
653
+ *
654
+ * Return: true if the Global configuration requests completed otherwise false.
535655 */
536656 bool kbase_csf_firmware_global_reinit_complete(struct kbase_device *kbdev);
537657
....@@ -556,17 +676,16 @@
556676 * request has completed or not, that was sent to update
557677 * the core attributes.
558678 *
679
+ * @kbdev: Instance of a GPU platform device that implements a CSF interface.
680
+ *
559681 * Return: true if the Global configuration request to update the core
560682 * attributes has completed, otherwise false.
561
- *
562
- * @kbdev: Instance of a GPU platform device that implements a CSF interface.
563683 */
564684 bool kbase_csf_firmware_core_attr_updated(struct kbase_device *kbdev);
565685
566686 /**
567
- * Request the global control block of CSF interface capabilities
568
- *
569
- * Return: Total number of CSs, summed across all groups.
687
+ * kbase_csf_firmware_get_glb_iface - Request the global control block of CSF
688
+ * interface capabilities
570689 *
571690 * @kbdev: Kbase device.
572691 * @group_data: Pointer where to store all the group data
....@@ -589,6 +708,8 @@
589708 * @instr_features: Instrumentation features. Bits 7:4 hold the max size
590709 * of events. Bits 3:0 hold the offset update rate.
591710 * (csf >= 1,1,0)
711
+ *
712
+ * Return: Total number of CSs, summed across all groups.
592713 */
593714 u32 kbase_csf_firmware_get_glb_iface(
594715 struct kbase_device *kbdev, struct basep_cs_group_control *group_data,
....@@ -597,20 +718,26 @@
597718 u32 *group_num, u32 *prfcnt_size, u32 *instr_features);
598719
599720 /**
600
- * Get CSF firmware header timeline metadata content
601
- *
602
- * Return: The firmware timeline metadata content which match @p name.
721
+ * kbase_csf_firmware_get_timeline_metadata - Get CSF firmware header timeline
722
+ * metadata content
603723 *
604724 * @kbdev: Kbase device.
605725 * @name: Name of the metadata which metadata content to be returned.
606726 * @size: Metadata size if specified metadata found.
727
+ *
728
+ * Return: The firmware timeline metadata content which match @p name.
607729 */
608730 const char *kbase_csf_firmware_get_timeline_metadata(struct kbase_device *kbdev,
609731 const char *name, size_t *size);
610732
611733 /**
612
- * kbase_csf_firmware_mcu_shared_mapping_init -
613
- * Allocate and map MCU shared memory.
734
+ * kbase_csf_firmware_mcu_shared_mapping_init - Allocate and map MCU shared memory.
735
+ *
736
+ * @kbdev: Kbase device the memory mapping shall belong to.
737
+ * @num_pages: Number of memory pages to map.
738
+ * @cpu_map_properties: Either PROT_READ or PROT_WRITE.
739
+ * @gpu_map_properties: Either KBASE_REG_GPU_RD or KBASE_REG_GPU_WR.
740
+ * @csf_mapping: Object where to write metadata for the memory mapping.
614741 *
615742 * This helper function allocates memory and maps it on both the CPU
616743 * and the GPU address spaces. Most of the properties of the mapping
....@@ -622,12 +749,6 @@
622749 * will be ignored by the function.
623750 *
624751 * Return: 0 if success, or an error code on failure.
625
- *
626
- * @kbdev: Kbase device the memory mapping shall belong to.
627
- * @num_pages: Number of memory pages to map.
628
- * @cpu_map_properties: Either PROT_READ or PROT_WRITE.
629
- * @gpu_map_properties: Either KBASE_REG_GPU_RD or KBASE_REG_GPU_WR.
630
- * @csf_mapping: Object where to write metadata for the memory mapping.
631752 */
632753 int kbase_csf_firmware_mcu_shared_mapping_init(
633754 struct kbase_device *kbdev,
....@@ -645,36 +766,7 @@
645766 void kbase_csf_firmware_mcu_shared_mapping_term(
646767 struct kbase_device *kbdev, struct kbase_csf_mapping *csf_mapping);
647768
648
-#ifndef MALI_KBASE_BUILD
649
-/**
650
- * mali_kutf_process_fw_utf_entry() - Process the "Firmware UTF tests" section
651
- *
652
- * Read "Firmware UTF tests" section from the firmware image and create
653
- * necessary kutf app+suite+tests.
654
- *
655
- * Return: 0 if successful, negative error code on failure. In both cases
656
- * caller will have to invoke mali_kutf_fw_utf_entry_cleanup for the cleanup
657
- *
658
- * @kbdev: Kbase device structure
659
- * @fw_data: Pointer to the start of firmware binary image loaded from disk
660
- * @fw_size: Size (in bytes) of the firmware image
661
- * @entry: Pointer to the start of the section
662
- */
663
-int mali_kutf_process_fw_utf_entry(struct kbase_device *kbdev,
664
- const void *fw_data, size_t fw_size, const u32 *entry);
665
-
666
-/**
667
- * mali_kutf_fw_utf_entry_cleanup() - Remove the Fw UTF tests debugfs entries
668
- *
669
- * Destroy the kutf apps+suites+tests created on parsing "Firmware UTF tests"
670
- * section from the firmware image.
671
- *
672
- * @kbdev: Kbase device structure
673
- */
674
-void mali_kutf_fw_utf_entry_cleanup(struct kbase_device *kbdev);
675
-#endif
676
-
677
-#ifdef CONFIG_MALI_BIFROST_DEBUG
769
+#ifdef CONFIG_MALI_BIFROST_DEBUG
678770 extern bool fw_debug;
679771 #endif
680772
....@@ -691,11 +783,11 @@
691783 * kbase_csf_firmware_enable_gpu_idle_timer() - Activate the idle hysteresis
692784 * monitoring operation
693785 *
786
+ * @kbdev: Kbase device structure
787
+ *
694788 * Program the firmware interface with its configured hysteresis count value
695789 * and enable the firmware to act on it. The Caller is
696790 * assumed to hold the kbdev->csf.scheduler.interrupt_lock.
697
- *
698
- * @kbdev: Kbase device structure
699791 */
700792 void kbase_csf_firmware_enable_gpu_idle_timer(struct kbase_device *kbdev);
701793
....@@ -703,10 +795,10 @@
703795 * kbase_csf_firmware_disable_gpu_idle_timer() - Disable the idle time
704796 * hysteresis monitoring operation
705797 *
798
+ * @kbdev: Kbase device structure
799
+ *
706800 * Program the firmware interface to disable the idle hysteresis timer. The
707801 * Caller is assumed to hold the kbdev->csf.scheduler.interrupt_lock.
708
- *
709
- * @kbdev: Kbase device structure
710802 */
711803 void kbase_csf_firmware_disable_gpu_idle_timer(struct kbase_device *kbdev);
712804
....@@ -741,18 +833,18 @@
741833 u32 kbase_csf_firmware_set_gpu_idle_hysteresis_time(struct kbase_device *kbdev, u32 dur);
742834
743835 /**
744
- * kbase_csf_firmware_get_mcu_core_pwroff_time - Get the MCU core power-off
836
+ * kbase_csf_firmware_get_mcu_core_pwroff_time - Get the MCU shader Core power-off
745837 * time value
746838 *
747839 * @kbdev: Instance of a GPU platform device that implements a CSF interface.
748840 *
749
- * Return: the internally recorded MCU core power-off (nominal) value. The unit
841
+ * Return: the internally recorded MCU shader Core power-off (nominal) timeout value. The unit
750842 * of the value is in micro-seconds.
751843 */
752844 u32 kbase_csf_firmware_get_mcu_core_pwroff_time(struct kbase_device *kbdev);
753845
754846 /**
755
- * kbase_csf_firmware_set_mcu_core_pwroff_time - Set the MCU core power-off
847
+ * kbase_csf_firmware_set_mcu_core_pwroff_time - Set the MCU shader Core power-off
756848 * time value
757849 *
758850 * @kbdev: Instance of a GPU platform device that implements a CSF interface.
....@@ -769,7 +861,7 @@
769861 * returned value is the source configuration flag, and it is set to '1'
770862 * when CYCLE_COUNTER alternative source is used.
771863 *
772
- * The configured MCU core power-off timer will only have effect when the host
864
+ * The configured MCU shader Core power-off timer will only have effect when the host
773865 * driver has delegated the shader cores' power management to MCU.
774866 *
775867 * Return: the actual internal core power-off timer value in register defined
....@@ -780,7 +872,7 @@
780872 /**
781873 * kbase_csf_interface_version - Helper function to build the full firmware
782874 * interface version in a format compatible with
783
- * with GLB_VERSION register
875
+ * GLB_VERSION register
784876 *
785877 * @major: major version of csf interface
786878 * @minor: minor version of csf interface
....@@ -808,4 +900,17 @@
808900 * Return: 0 if success, or negative error code on failure.
809901 */
810902 int kbase_csf_trigger_firmware_config_update(struct kbase_device *kbdev);
903
+
904
+/**
905
+ * kbase_csf_firmware_req_core_dump - Request a firmware core dump
906
+ *
907
+ * @kbdev: Instance of a GPU platform device that implements a CSF interface.
908
+ *
909
+ * Request a firmware core dump and wait for for firmware to acknowledge.
910
+ * Firmware will enter infinite loop after the firmware core dump is created.
911
+ *
912
+ * Return: 0 if success, or negative error code on failure.
913
+ */
914
+int kbase_csf_firmware_req_core_dump(struct kbase_device *const kbdev);
915
+
811916 #endif