Skip to content

Commit cfbfec3

Browse files
committed
drm/i915: Restore default setting for enable_guc again [FreeBSD]
Some recent GPUs require this to work (see #418). If we need to disable GuC for some GPUs, we can add them in `uc_expand_default_options()` in `drivers/gpu/drm/i915/gt/uc/intel_uc.c`. It will be better than disabling it for everyone, requiring some user to mess with an obscure setting in `/boot/loader.conf`. Sponsored by: The FreeBSD Foundation
1 parent b99c80e commit cfbfec3

2 files changed

Lines changed: 12 additions & 15 deletions

File tree

drivers/gpu/drm/i915/gt/uc/intel_uc.c

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,25 @@ static void uc_expand_default_options(struct intel_uc *uc)
4242
return;
4343
}
4444

45-
#ifndef __FreeBSD__
46-
/* FreeBSD FIXME */
47-
/* GuC is known to be broken so disable it for GEN12 for now */
48-
4945
/* Intermediate platforms are HuC authentication only */
5046
if (IS_ALDERLAKE_S(i915) && !IS_RAPTORLAKE_S(i915)) {
5147
i915->params.enable_guc = ENABLE_GUC_LOAD_HUC;
5248
return;
5349
}
5450

51+
#ifdef __linux__
5552
/* Default: enable HuC authentication and GuC submission */
5653
i915->params.enable_guc = ENABLE_GUC_LOAD_HUC | ENABLE_GUC_SUBMISSION;
54+
#elif defined(__FreeBSD__)
55+
/*
56+
* FIXME:
57+
* On FreeBSD, when GUC submission is enabled, there is a great chance
58+
* that the computer refuses to power off when asked to do so. Like
59+
* after a `shutdown -p now`, the kernel stops everything, the display
60+
* is turned off, but the power LED is still on and the fans are
61+
* running. The computer is obviously unreachable.
62+
*/
63+
i915->params.enable_guc = ENABLE_GUC_LOAD_HUC;
5764
#endif
5865
}
5966

drivers/gpu/drm/i915/i915_params.h

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,9 @@ struct drm_printer;
4949
* mode: debugfs file permissions, one of {0400, 0600, 0}, use 0 to not create
5050
* debugfs file
5151
*/
52-
#ifdef __FreeBSD__
53-
/* Changes in default values in I915_PARAMS_FOR_EACH below:
54-
*
55-
* enable_guc: -1 -> 0
56-
* When the GuC is used, there is a great chance that the computer freezes
57-
* when it reboots or is powered off. The symptom is that the scree is
58-
* powered off at the time of reboot/shutdown, but the computer remains
59-
* powered on.
60-
*/
61-
#endif
6252
#define I915_PARAMS_FOR_EACH(param) \
6353
param(int, modeset, -1, 0400) \
64-
param(int, enable_guc, 0, 0400) \
54+
param(int, enable_guc, -1, 0400) \
6555
param(int, guc_log_level, -1, 0400) \
6656
param(char *, guc_firmware_path, NULL, 0400) \
6757
param(char *, huc_firmware_path, NULL, 0400) \

0 commit comments

Comments
 (0)