mirror of
https://github.com/gnif/vendor-reset.git
synced 2025-12-29 23:19:28 +01:00
Compare commits
No commits in common. "084881c6e9e11bdadaf05798e669568848e698a3" and "4b466e92a2d9f76ce1082cde982c7be0be91e248" have entirely different histories.
084881c6e9
...
4b466e92a2
@ -60,7 +60,6 @@ updating your initrd.
|
|||||||
|AMD|Polaris 12| RX 540, 550
|
|AMD|Polaris 12| RX 540, 550
|
||||||
|AMD|Vega 10| Vega 56/64/FE |
|
|AMD|Vega 10| Vega 56/64/FE |
|
||||||
|AMD|Vega 20| Radeon VII |
|
|AMD|Vega 20| Radeon VII |
|
||||||
|AMD|Vega 20| Instinct MI100 |
|
|
||||||
|AMD|Navi 10| 5600XT, 5700, 5700XT
|
|AMD|Navi 10| 5600XT, 5700, 5700XT
|
||||||
|AMD|Navi 12| Pro 5600M |
|
|AMD|Navi 12| Pro 5600M |
|
||||||
|AMD|Navi 14| Pro 5300, RX 5300, 5500XT
|
|AMD|Navi 14| Pro 5300, RX 5300, 5500XT
|
||||||
|
|||||||
@ -28,7 +28,6 @@
|
|||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/version.h>
|
|
||||||
#include <asm/unaligned.h>
|
#include <asm/unaligned.h>
|
||||||
|
|
||||||
//#include <drm/drm_util.h>
|
//#include <drm/drm_util.h>
|
||||||
@ -40,10 +39,6 @@
|
|||||||
#include "atom-names.h"
|
#include "atom-names.h"
|
||||||
#include "atom-bits.h"
|
#include "atom-bits.h"
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0)
|
|
||||||
#define strscpy strlcpy
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define ATOM_COND_ABOVE 0
|
#define ATOM_COND_ABOVE 0
|
||||||
#define ATOM_COND_ABOVEOREQUAL 1
|
#define ATOM_COND_ABOVEOREQUAL 1
|
||||||
#define ATOM_COND_ALWAYS 2
|
#define ATOM_COND_ALWAYS 2
|
||||||
@ -1429,7 +1424,7 @@ struct atom_context *amdgpu_atom_parse(struct card_info *card, void *bios)
|
|||||||
if (*str != '\0')
|
if (*str != '\0')
|
||||||
{
|
{
|
||||||
pr_info("ATOM BIOS: %s\n", str);
|
pr_info("ATOM BIOS: %s\n", str);
|
||||||
strscpy(ctx->vbios_version, str, sizeof(ctx->vbios_version));
|
strlcpy(ctx->vbios_version, str, sizeof(ctx->vbios_version));
|
||||||
}
|
}
|
||||||
|
|
||||||
return ctx;
|
return ctx;
|
||||||
|
|||||||
@ -102,9 +102,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
{PCI_VENDOR_ID_ATI, 0x7360, op, DEVICE_INFO(AMD_NAVI12)}, \
|
{PCI_VENDOR_ID_ATI, 0x7360, op, DEVICE_INFO(AMD_NAVI12)}, \
|
||||||
{PCI_VENDOR_ID_ATI, 0x7362, op, DEVICE_INFO(AMD_NAVI12)}
|
{PCI_VENDOR_ID_ATI, 0x7362, op, DEVICE_INFO(AMD_NAVI12)}
|
||||||
|
|
||||||
#define _AMD_ARCTURUS(op) \
|
|
||||||
{PCI_VENDOR_ID_ATI, 0x738c, op, DEVICE_INFO(AMD_VEGA20)} //Instinct MI100
|
|
||||||
|
|
||||||
static const struct vendor_reset_cfg vendor_reset_devices[] = {
|
static const struct vendor_reset_cfg vendor_reset_devices[] = {
|
||||||
_AMD_POLARIS10(&amd_polaris10_ops),
|
_AMD_POLARIS10(&amd_polaris10_ops),
|
||||||
_AMD_POLARIS11(&amd_polaris10_ops),
|
_AMD_POLARIS11(&amd_polaris10_ops),
|
||||||
@ -114,7 +111,6 @@ static const struct vendor_reset_cfg vendor_reset_devices[] = {
|
|||||||
_AMD_NAVI10(&amd_navi10_ops),
|
_AMD_NAVI10(&amd_navi10_ops),
|
||||||
_AMD_NAVI14(&amd_navi10_ops),
|
_AMD_NAVI14(&amd_navi10_ops),
|
||||||
_AMD_NAVI12(&amd_navi10_ops),
|
_AMD_NAVI12(&amd_navi10_ops),
|
||||||
_AMD_ARCTURUS(&amd_vega20_ops),
|
|
||||||
|
|
||||||
/* end of array guard */
|
/* end of array guard */
|
||||||
{.vendor = 0}
|
{.vendor = 0}
|
||||||
|
|||||||
@ -30,11 +30,7 @@ static bool hook_installed = false;
|
|||||||
static int (*orig_pci_dev_specific_reset)(struct pci_dev *dev, int probe);
|
static int (*orig_pci_dev_specific_reset)(struct pci_dev *dev, int probe);
|
||||||
|
|
||||||
/* TCO breaks the hook, we must disable it for this function */
|
/* TCO breaks the hook, we must disable it for this function */
|
||||||
#if defined(__GNUC__) && !defined(__llvm__)
|
|
||||||
__attribute__((optimize("-fno-optimize-sibling-calls")))
|
__attribute__((optimize("-fno-optimize-sibling-calls")))
|
||||||
#elif defined(__clang__)
|
|
||||||
__attribute__((disable_tail_calls))
|
|
||||||
#endif
|
|
||||||
static int hooked_pci_dev_specific_reset(struct pci_dev *dev, int probe)
|
static int hooked_pci_dev_specific_reset(struct pci_dev *dev, int probe)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|||||||
@ -131,5 +131,3 @@ ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x1002", ATTR{device}=="0x734F",
|
|||||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x1002", ATTR{device}=="0x7360", RUN+="/bin/sh -c '/sbin/modprobe vendor-reset; echo device_specific > /sys$env{DEVPATH}/reset_method'"
|
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x1002", ATTR{device}=="0x7360", RUN+="/bin/sh -c '/sbin/modprobe vendor-reset; echo device_specific > /sys$env{DEVPATH}/reset_method'"
|
||||||
|
|
||||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x1002", ATTR{device}=="0x7362", RUN+="/bin/sh -c '/sbin/modprobe vendor-reset; echo device_specific > /sys$env{DEVPATH}/reset_method'"
|
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x1002", ATTR{device}=="0x7362", RUN+="/bin/sh -c '/sbin/modprobe vendor-reset; echo device_specific > /sys$env{DEVPATH}/reset_method'"
|
||||||
|
|
||||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x1002", ATTR{device}=="0x738c", RUN+="/bin/sh -c '/sbin/modprobe vendor-reset; echo device_specific > /sys$env{DEVPATH}/reset_method'"
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user