aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index 82e6b6746511..d7d9a9d32381 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -39,7 +39,6 @@
39#include "amdgpu_gem.h" 39#include "amdgpu_gem.h"
40 40
41#include "amdgpu_amdkfd.h" 41#include "amdgpu_amdkfd.h"
42#include "kfd_priv.h"
43 42
44/* 43/*
45 * KMS wrapper. 44 * KMS wrapper.
@@ -128,16 +127,6 @@ int amdgpu_compute_multipipe = -1;
128int amdgpu_gpu_recovery = -1; /* auto */ 127int amdgpu_gpu_recovery = -1; /* auto */
129int amdgpu_emu_mode = 0; 128int amdgpu_emu_mode = 0;
130uint amdgpu_smu_memory_pool_size = 0; 129uint amdgpu_smu_memory_pool_size = 0;
131/* KFD parameters */
132int sched_policy = KFD_SCHED_POLICY_HWS;
133int hws_max_conc_proc = 8;
134int cwsr_enable = 1;
135int max_num_of_queues_per_device = KFD_MAX_NUM_OF_QUEUES_PER_DEVICE_DEFAULT;
136int send_sigterm;
137int debug_largebar;
138int ignore_crat;
139int noretry;
140int halt_if_hws_hang;
141 130
142/** 131/**
143 * DOC: vramlimit (int) 132 * DOC: vramlimit (int)
@@ -543,12 +532,14 @@ MODULE_PARM_DESC(smu_memory_pool_size,
543 "0x1 = 256Mbyte, 0x2 = 512Mbyte, 0x4 = 1 Gbyte, 0x8 = 2GByte"); 532 "0x1 = 256Mbyte, 0x2 = 512Mbyte, 0x4 = 1 Gbyte, 0x8 = 2GByte");
544module_param_named(smu_memory_pool_size, amdgpu_smu_memory_pool_size, uint, 0444); 533module_param_named(smu_memory_pool_size, amdgpu_smu_memory_pool_size, uint, 0444);
545 534
535#ifdef CONFIG_HSA_AMD
546/** 536/**
547 * DOC: sched_policy (int) 537 * DOC: sched_policy (int)
548 * Set scheduling policy. Default is HWS(hardware scheduling) with over-subscription. 538 * Set scheduling policy. Default is HWS(hardware scheduling) with over-subscription.
549 * Setting 1 disables over-subscription. Setting 2 disables HWS and statically 539 * Setting 1 disables over-subscription. Setting 2 disables HWS and statically
550 * assigns queues to HQDs. 540 * assigns queues to HQDs.
551 */ 541 */
542int sched_policy = KFD_SCHED_POLICY_HWS;
552module_param(sched_policy, int, 0444); 543module_param(sched_policy, int, 0444);
553MODULE_PARM_DESC(sched_policy, 544MODULE_PARM_DESC(sched_policy,
554 "Scheduling policy (0 = HWS (Default), 1 = HWS without over-subscription, 2 = Non-HWS (Used for debugging only)"); 545 "Scheduling policy (0 = HWS (Default), 1 = HWS without over-subscription, 2 = Non-HWS (Used for debugging only)");
@@ -558,6 +549,7 @@ MODULE_PARM_DESC(sched_policy,
558 * Maximum number of processes that HWS can schedule concurrently. The maximum is the 549 * Maximum number of processes that HWS can schedule concurrently. The maximum is the
559 * number of VMIDs assigned to the HWS, which is also the default. 550 * number of VMIDs assigned to the HWS, which is also the default.
560 */ 551 */
552int hws_max_conc_proc = 8;
561module_param(hws_max_conc_proc, int, 0444); 553module_param(hws_max_conc_proc, int, 0444);
562MODULE_PARM_DESC(hws_max_conc_proc, 554MODULE_PARM_DESC(hws_max_conc_proc,
563 "Max # processes HWS can execute concurrently when sched_policy=0 (0 = no concurrency, #VMIDs for KFD = Maximum(default))"); 555 "Max # processes HWS can execute concurrently when sched_policy=0 (0 = no concurrency, #VMIDs for KFD = Maximum(default))");
@@ -568,6 +560,7 @@ MODULE_PARM_DESC(hws_max_conc_proc,
568 * the middle of a compute wave. Default is 1 to enable this feature. Setting 0 560 * the middle of a compute wave. Default is 1 to enable this feature. Setting 0
569 * disables it. 561 * disables it.
570 */ 562 */
563int cwsr_enable = 1;
571module_param(cwsr_enable, int, 0444); 564module_param(cwsr_enable, int, 0444);
572MODULE_PARM_DESC(cwsr_enable, "CWSR enable (0 = Off, 1 = On (Default))"); 565MODULE_PARM_DESC(cwsr_enable, "CWSR enable (0 = Off, 1 = On (Default))");
573 566
@@ -576,6 +569,7 @@ MODULE_PARM_DESC(cwsr_enable, "CWSR enable (0 = Off, 1 = On (Default))");
576 * Maximum number of queues per device. Valid setting is between 1 and 4096. Default 569 * Maximum number of queues per device. Valid setting is between 1 and 4096. Default
577 * is 4096. 570 * is 4096.
578 */ 571 */
572int max_num_of_queues_per_device = KFD_MAX_NUM_OF_QUEUES_PER_DEVICE_DEFAULT;
579module_param(max_num_of_queues_per_device, int, 0444); 573module_param(max_num_of_queues_per_device, int, 0444);
580MODULE_PARM_DESC(max_num_of_queues_per_device, 574MODULE_PARM_DESC(max_num_of_queues_per_device,
581 "Maximum number of supported queues per device (1 = Minimum, 4096 = default)"); 575 "Maximum number of supported queues per device (1 = Minimum, 4096 = default)");
@@ -585,6 +579,7 @@ MODULE_PARM_DESC(max_num_of_queues_per_device,
585 * Send sigterm to HSA process on unhandled exceptions. Default is not to send sigterm 579 * Send sigterm to HSA process on unhandled exceptions. Default is not to send sigterm
586 * but just print errors on dmesg. Setting 1 enables sending sigterm. 580 * but just print errors on dmesg. Setting 1 enables sending sigterm.
587 */ 581 */
582int send_sigterm;
588module_param(send_sigterm, int, 0444); 583module_param(send_sigterm, int, 0444);
589MODULE_PARM_DESC(send_sigterm, 584MODULE_PARM_DESC(send_sigterm,
590 "Send sigterm to HSA process on unhandled exception (0 = disable, 1 = enable)"); 585 "Send sigterm to HSA process on unhandled exception (0 = disable, 1 = enable)");
@@ -596,6 +591,7 @@ MODULE_PARM_DESC(send_sigterm,
596 * size, usually 256MB. 591 * size, usually 256MB.
597 * Default value is 0, diabled. 592 * Default value is 0, diabled.
598 */ 593 */
594int debug_largebar;
599module_param(debug_largebar, int, 0444); 595module_param(debug_largebar, int, 0444);
600MODULE_PARM_DESC(debug_largebar, 596MODULE_PARM_DESC(debug_largebar,
601 "Debug large-bar flag used to simulate large-bar capability on non-large bar machine (0 = disable, 1 = enable)"); 597 "Debug large-bar flag used to simulate large-bar capability on non-large bar machine (0 = disable, 1 = enable)");
@@ -606,6 +602,7 @@ MODULE_PARM_DESC(debug_largebar,
606 * table to get information about AMD APUs. This option can serve as a workaround on 602 * table to get information about AMD APUs. This option can serve as a workaround on
607 * systems with a broken CRAT table. 603 * systems with a broken CRAT table.
608 */ 604 */
605int ignore_crat;
609module_param(ignore_crat, int, 0444); 606module_param(ignore_crat, int, 0444);
610MODULE_PARM_DESC(ignore_crat, 607MODULE_PARM_DESC(ignore_crat,
611 "Ignore CRAT table during KFD initialization (0 = use CRAT (default), 1 = ignore CRAT)"); 608 "Ignore CRAT table during KFD initialization (0 = use CRAT (default), 1 = ignore CRAT)");
@@ -616,6 +613,7 @@ MODULE_PARM_DESC(ignore_crat,
616 * Setting 1 disables retry. 613 * Setting 1 disables retry.
617 * Retry is needed for recoverable page faults. 614 * Retry is needed for recoverable page faults.
618 */ 615 */
616int noretry;
619module_param(noretry, int, 0644); 617module_param(noretry, int, 0644);
620MODULE_PARM_DESC(noretry, 618MODULE_PARM_DESC(noretry,
621 "Set sh_mem_config.retry_disable on Vega10 (0 = retry enabled (default), 1 = retry disabled)"); 619 "Set sh_mem_config.retry_disable on Vega10 (0 = retry enabled (default), 1 = retry disabled)");
@@ -625,8 +623,10 @@ MODULE_PARM_DESC(noretry,
625 * Halt if HWS hang is detected. Default value, 0, disables the halt on hang. 623 * Halt if HWS hang is detected. Default value, 0, disables the halt on hang.
626 * Setting 1 enables halt on hang. 624 * Setting 1 enables halt on hang.
627 */ 625 */
626int halt_if_hws_hang;
628module_param(halt_if_hws_hang, int, 0644); 627module_param(halt_if_hws_hang, int, 0644);
629MODULE_PARM_DESC(halt_if_hws_hang, "Halt if HWS hang is detected (0 = off (default), 1 = on)"); 628MODULE_PARM_DESC(halt_if_hws_hang, "Halt if HWS hang is detected (0 = off (default), 1 = on)");
629#endif
630 630
631static const struct pci_device_id pciidlist[] = { 631static const struct pci_device_id pciidlist[] = {
632#ifdef CONFIG_DRM_AMDGPU_SI 632#ifdef CONFIG_DRM_AMDGPU_SI