[core] revert commits that are not quite ready yet

This reverts commit 30ffca808b.
This reverts commit 623fa20705.
This commit is contained in:
Geoffrey McRae 2021-01-13 14:06:40 +11:00
parent 30ffca808b
commit 6875092f2f
3 changed files with 40 additions and 60 deletions

View File

@ -1,5 +1,5 @@
PACKAGE_NAME="vendor-reset"
PACKAGE_VERSION="0.0.19"
PACKAGE_VERSION="0.0.18"
BUILT_MODULE_NAME[0]="${PACKAGE_NAME}"
MAKE[0]="make KDIR=${kernel_source_dir}"
CLEAN="make KDIR=${kernel_source_dir} clean"

View File

@ -84,15 +84,6 @@ int amd_common_pre_reset(struct vendor_reset_dev *dev)
pci_read_config_word(pdev, PCI_COMMAND, &priv->cfg);
pci_write_config_word(pdev, PCI_COMMAND, priv->cfg | PCI_COMMAND_MEMORY | PCI_COMMAND_INTX_DISABLE);
priv->audio_pdev = pci_get_domain_bus_and_slot(pci_domain_nr(pdev->bus),
pdev->bus->number, 1);
if (priv->audio_pdev)
{
pci_set_power_state(priv->audio_pdev, PCI_D0);
pci_clear_master(priv->audio_pdev);
pci_save_state(priv->audio_pdev);
}
return 0;
err_free:
@ -105,8 +96,7 @@ int amd_common_post_reset(struct vendor_reset_dev *dev)
struct amd_vendor_private *priv = amd_private(dev);
struct pci_dev *pdev = dev->pdev;
if (priv->mmio)
{
if (priv->mmio) {
iounmap(priv->mmio);
priv->mmio = NULL;
}
@ -124,14 +114,6 @@ int amd_common_post_reset(struct vendor_reset_dev *dev)
}
pci_write_config_word(pdev, PCI_COMMAND, priv->cfg);
if (priv->audio_pdev)
{
pci_restore_state(priv->audio_pdev);
pci_set_power_state(priv->audio_pdev, PCI_D3hot);
pci_dev_put(priv->audio_pdev);
priv->audio_pdev = NULL;
}
/* don't try to go to low power if reset failed */
if (!dev->reset_ret)
pci_set_power_state(pdev, PCI_D3hot);

View File

@ -38,11 +38,11 @@ static inline bool drm_can_sleep(void)
#define RREG32(reg) \
({ \
u32 __out; \
if (((reg)*4) < adev_to_amd_private(adev)->mmio_size) \
if (((reg) * 4) < adev_to_amd_private(adev)->mmio_size) \
__out = readl(adev_to_amd_private(adev)->mmio + (reg)); \
else \
{ \
writel(((reg)*4), adev_to_amd_private(adev)->mmio + mmMM_INDEX); \
writel(((reg) * 4), adev_to_amd_private(adev)->mmio + mmMM_INDEX); \
__out = readl(adev_to_amd_private(adev)->mmio + mmMM_DATA); \
} \
__out; \
@ -51,11 +51,11 @@ static inline bool drm_can_sleep(void)
#define WREG32(reg, v) \
do \
{ \
if (((reg)*4) < adev_to_amd_private(adev)->mmio_size) \
if (((reg) * 4) < adev_to_amd_private(adev)->mmio_size) \
writel(v, adev_to_amd_private(adev)->mmio + (reg)); \
else \
{ \
writel(((reg)*4), adev_to_amd_private(adev)->mmio + mmMM_INDEX); \
writel(((reg) * 4), adev_to_amd_private(adev)->mmio + mmMM_INDEX); \
writel(v, adev_to_amd_private(adev)->mmio + mmMM_DATA); \
} \
} while (0)
@ -117,8 +117,6 @@ struct amd_vendor_private
{
u16 cfg;
struct pci_dev *audio_pdev;
struct vendor_reset_dev *vdev;
struct pci_saved_state *saved_state;
struct amd_fake_dev adev;