diff --git a/Documentation/gpu/hydcu-fixup-header.rst b/Documentation/gpu/hydcu-fixup-header.rst deleted file mode 100644 index 5dca3ff3a137d4d19d193736de954ecfd3053f04..0000000000000000000000000000000000000000 --- a/Documentation/gpu/hydcu-fixup-header.rst +++ /dev/null @@ -1,13 +0,0 @@ -.. SPDX-License-Identifier: GPL-2.0-only - -========================= - drm/hygon/hydcu-fixup-header hydcu-fixup-header driver -========================= - -The drm/hygon/hydcu-fixup-header driver supports all HYGON DCUs. - -General description -====================== - -The drm/hygon/hydcu-fixup-header driver adds flags NO_BUS_RESET to hydcu -device to disable vfio pci reset, as dcu is not support now. diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 7e4b3882969d8ca9aa3ef7bce07953848d815339..820b6689eaf3d296a8eae114304405762dd2fb8e 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -438,9 +438,3 @@ config DRM_LIB_RANDOM config DRM_PRIVACY_SCREEN bool default n - -config HYDCU_FIXUP_HEADER - bool "Enable fixup header support for HYDCU" - help - Choose this option if you want to use pci passthrough with HYDCU - HYDCU cannot support pci reset, so enable this module to disable pci reset diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index 45ade029d4a39bb12a6cef8a55937766741cebaa..cb155bcb843f69e9f1fff2c14a84383d775182c7 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -199,4 +199,3 @@ obj-y += solomon/ obj-$(CONFIG_DRM_SPRD) += sprd/ obj-y += loongson/ obj-$(CONFIG_DRM_PHYTIUM) += phytium/ -obj-$(CONFIG_HYDCU_FIXUP_HEADER) += hygon/hydcu-fixup-header/ diff --git a/drivers/gpu/drm/hygon/hydcu-fixup-header/Makefile b/drivers/gpu/drm/hygon/hydcu-fixup-header/Makefile deleted file mode 100644 index 2dc816df42398c8988a3599f76c323055ab1839a..0000000000000000000000000000000000000000 --- a/drivers/gpu/drm/hygon/hydcu-fixup-header/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -obj-$(CONFIG_HYDCU_FIXUP_HEADER) += hydcu_pci_fixup_header.o \ No newline at end of file diff --git a/drivers/gpu/drm/hygon/hydcu-fixup-header/hydcu_pci_fixup_header.c b/drivers/gpu/drm/hygon/hydcu-fixup-header/hydcu_pci_fixup_header.c deleted file mode 100644 index 962f0d74f703d2530b27c3d2ae94d29bafbc4435..0000000000000000000000000000000000000000 --- a/drivers/gpu/drm/hygon/hydcu-fixup-header/hydcu_pci_fixup_header.c +++ /dev/null @@ -1,93 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* - * HYGON DCU fixup driver - * - * Copyright (C) 2024 Hygon Info Technologies Ltd. - * - * Author: Baoshun Fang - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -#include -#include -#include -#include -#include - -#define PCI_VENDOR_ID_HYGON 0x1d94 - -#define DEVICE_Z100SM 0x51b7 -#define DEVICE_C878182 0x52b7 -#define DEVICE_C878186 0x53b7 -#define DEVICE_Z100 0x54b7 -#define DEVICE_Z100L 0x55b7 -#define DEVICE_C878181 0x56b7 -#define DEVICE_C878185 0x57b7 -#define DEVICE_C878188 0x58b7 -#define DEVICE_C878174 0x59b7 -#define DEVICE_KONGMING 0x61b7 -#define DEVICE_KONGMING_E 0x6210 - -#define DRIVER_VERSION "0.2" -#define DRIVER_AUTHOR "huangjun " -#define DRIVER_DESC "fix dcu header" - -static int hydcu_pci_fixup_header_probe(struct pci_dev *pdev, const struct pci_device_id *id) -{ - dev_info(&pdev->dev, "add flags NO_BUS_RESET\n"); - pdev->dev_flags |= PCI_DEV_FLAGS_NO_BUS_RESET; - pdev->pm_cap = 0; - dev_info(&pdev->dev, "will abort probe\n"); - - return -EINVAL; -} - -static void hydcu_pci_fixup_header_remove(struct pci_dev *pdev) -{ -} - -static const struct pci_device_id hydcu_pci_fixup_header_ids[] = { - { PCI_VDEVICE(HYGON, DEVICE_Z100SM), }, - { PCI_VDEVICE(HYGON, DEVICE_C878182), }, - { PCI_VDEVICE(HYGON, DEVICE_C878186), }, - { PCI_VDEVICE(HYGON, DEVICE_Z100), }, - { PCI_VDEVICE(HYGON, DEVICE_Z100L), }, - { PCI_VDEVICE(HYGON, DEVICE_C878181), }, - { PCI_VDEVICE(HYGON, DEVICE_C878185), }, - { PCI_VDEVICE(HYGON, DEVICE_C878188), }, - { PCI_VDEVICE(HYGON, DEVICE_C878174), }, - { PCI_VDEVICE(HYGON, DEVICE_KONGMING), }, - { PCI_VDEVICE(HYGON, DEVICE_KONGMING_E), }, - {}, -}; - -static struct pci_driver hydcu_pci_fixup_header_driver = { - .name = "hydcu-fixup-header", - .id_table = hydcu_pci_fixup_header_ids, - .probe = hydcu_pci_fixup_header_probe, - .remove = hydcu_pci_fixup_header_remove, -}; - -static int __init hydcu_pci_fixup_header_init(void) -{ - /* Register and scan for devices */ - return pci_register_driver(&hydcu_pci_fixup_header_driver); -} - -static void __exit hydcu_pci_fixup_header_cleanup(void) -{ - pci_unregister_driver(&hydcu_pci_fixup_header_driver); -} - -module_init(hydcu_pci_fixup_header_init); -module_exit(hydcu_pci_fixup_header_cleanup); - -MODULE_VERSION(DRIVER_VERSION); -MODULE_LICENSE("GPL"); -MODULE_AUTHOR(DRIVER_AUTHOR); -MODULE_DESCRIPTION(DRIVER_DESC);