From: Tianrui Zhao zhaotianrui@loongson.cn
LoongArch inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IB8U6Q CVE: NA
--------------------------------
LS7A2000 no longer use loongson drm driver, but instead use dkms software package.
Signed-off-by: Tianrui Zhao zhaotianrui@loongson.cn --- arch/loongarch/configs/loongson3_defconfig | 2 +- drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/loongson/lsdc_drv.c | 9 +++++++++ 3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/arch/loongarch/configs/loongson3_defconfig b/arch/loongarch/configs/loongson3_defconfig index 5602d9fe182b..87f95a997e83 100644 --- a/arch/loongarch/configs/loongson3_defconfig +++ b/arch/loongarch/configs/loongson3_defconfig @@ -1473,7 +1473,7 @@ CONFIG_DRM_AST_LOONGSON=y CONFIG_DRM_MGAG200=m CONFIG_DRM_QXL=m CONFIG_DRM_VIRTIO_GPU=m -CONFIG_DRM_LOONGSON=y +CONFIG_DRM_LOONGSON=m CONFIG_DRM_BOCHS=m CONFIG_DRM_CIRRUS_QEMU=m CONFIG_FB=y diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index 83153ec4c006..e3863fae6f31 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -197,7 +197,7 @@ obj-y += gud/ obj-$(CONFIG_DRM_HYPERV) += hyperv/ obj-y += solomon/ obj-$(CONFIG_DRM_SPRD) += sprd/ -obj-$(CONFIG_DRM_LOONGSON) += loongson/ +obj-y += loongson/ obj-$(CONFIG_DRM_PHYTIUM) += phytium/ obj-$(CONFIG_HYDCU_FIXUP_HEADER) += hygon/hydcu-fixup-header/ obj-$(CONFIG_DRM_HEL) += hel/ diff --git a/drivers/gpu/drm/loongson/lsdc_drv.c b/drivers/gpu/drm/loongson/lsdc_drv.c index 188ec82afcfb..75329eb31e79 100644 --- a/drivers/gpu/drm/loongson/lsdc_drv.c +++ b/drivers/gpu/drm/loongson/lsdc_drv.c @@ -30,6 +30,10 @@ #define DRIVER_MINOR 0 #define DRIVER_PATCHLEVEL 0
+int loongson_lg100_support; +MODULE_PARM_DESC(LG100_support, "LG100 support (1 = enabled, 0 = disabled)"); +module_param_named(LG100_support, loongson_lg100_support, int, 0444); + DEFINE_DRM_GEM_FOPS(lsdc_gem_fops);
static const struct drm_driver lsdc_drm_driver = { @@ -264,6 +268,11 @@ static int lsdc_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) struct lsdc_device *ldev; int ret;
+ /* loongson drm driver will not be used on 7A2000 */ + if ((enum loongson_chip_id)ent->driver_data == CHIP_LS7A2000 && + !loongson_lg100_support) + return -ENODEV; + descp = lsdc_device_probe(pdev, ent->driver_data); if (IS_ERR_OR_NULL(descp)) return -ENODEV;
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,转换为PR失败! 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/P... 失败原因:应用补丁/补丁集失败,Patch failed at 0001 drm/loongson: disable loongson drm driver by default for LS7A2000 建议解决方法:请查看失败原因, 确认补丁是否可以应用在当前期望分支的最新代码上
FeedBack: The patch(es) which you have sent to kernel@openeuler.org has been converted to PR failed! Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/P... Failed Reason: apply patch(es) failed, Patch failed at 0001 drm/loongson: disable loongson drm driver by default for LS7A2000 Suggest Solution: please checkout if the failed patch(es) can work on the newest codes in expected branch