mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-18 23:48:53 +07:00
b00e5334ab
So far we've got one condition when DRM drivers need to defer probing
on a dual GPU system and it's coded separately into each of the relevant
drivers. As suggested by Daniel Vetter, deduplicate that code in the
drivers and move it to a new vga_switcheroo helper. This yields better
encapsulation of concepts and lets us add further checks in a central
place. (The existing check pertains to pre-retina MacBook Pros and an
additional check is expected to be needed for retinas.)
One might be tempted to check deferred probing conditions in
vga_switcheroo_register_client(), but this is usually called fairly late
during driver load. The GPU is fully brought up and ready for switching
at that point. On boot the ->probe hook is potentially called dozens of
times until it finally succeeds, and each time we'd repeat bringup and
teardown of the GPU, lengthening boot time considerably and cluttering
logfiles. A separate helper is therefore needed which can be called
right at the beginning of the ->probe hook.
Note that amdgpu currently does not call this helper as the AMD GPUs
built into MacBook Pros are only supported by radeon so far.
v2: This helper could eventually be used by audio clients as well,
so rephrase kerneldoc to refer to "client" instead of "GPU"
and move the single existing check in an if block specific
to PCI_CLASS_DISPLAY_VGA devices. Move documentation on
that check from kerneldoc to a comment. (Daniel Vetter)
v3: Mandate in kerneldoc that registration of client shall only
happen after calling this helper. (Daniel Vetter)
v4: Rebase on
|
||
---|---|---|
.. | ||
dispnv04 | ||
include | ||
nvif | ||
nvkm | ||
Kbuild | ||
Kconfig | ||
nouveau_abi16.c | ||
nouveau_abi16.h | ||
nouveau_acpi.c | ||
nouveau_acpi.h | ||
nouveau_backlight.c | ||
nouveau_bios.c | ||
nouveau_bios.h | ||
nouveau_bo.c | ||
nouveau_bo.h | ||
nouveau_chan.c | ||
nouveau_chan.h | ||
nouveau_connector.c | ||
nouveau_connector.h | ||
nouveau_crtc.h | ||
nouveau_debugfs.c | ||
nouveau_debugfs.h | ||
nouveau_display.c | ||
nouveau_display.h | ||
nouveau_dma.c | ||
nouveau_dma.h | ||
nouveau_dp.c | ||
nouveau_drm.c | ||
nouveau_drv.h | ||
nouveau_encoder.h | ||
nouveau_fbcon.c | ||
nouveau_fbcon.h | ||
nouveau_fence.c | ||
nouveau_fence.h | ||
nouveau_gem.c | ||
nouveau_gem.h | ||
nouveau_hwmon.c | ||
nouveau_hwmon.h | ||
nouveau_ioc32.c | ||
nouveau_ioctl.h | ||
nouveau_nvif.c | ||
nouveau_platform.c | ||
nouveau_platform.h | ||
nouveau_prime.c | ||
nouveau_reg.h | ||
nouveau_sgdma.c | ||
nouveau_ttm.c | ||
nouveau_ttm.h | ||
nouveau_usif.c | ||
nouveau_usif.h | ||
nouveau_vga.c | ||
nouveau_vga.h | ||
nv04_fbcon.c | ||
nv04_fence.c | ||
nv10_fence.c | ||
nv10_fence.h | ||
nv17_fence.c | ||
nv50_display.c | ||
nv50_display.h | ||
nv50_fbcon.c | ||
nv50_fence.c | ||
nv84_fence.c | ||
nvc0_fbcon.c | ||
nvc0_fence.c |