How to apply a ".patch" file?

Patching this way can be fairly risky unless you are sure on what you are doing. For a few reasons, but if you accept this…

.patch files are just output from diff (often with some extra metadata, as in this case). You install one off file patches by:

patch drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c < 0001-drm-amdgpu-swsmu-extend-state-reprogram-on-init.patch
2 Likes