From 8f2ce0773839dbd29021d7cb094c479f963494c6 Mon Sep 17 00:00:00 2001 From: kanlihu Date: Mon, 20 May 2024 15:25:09 +0800 Subject: [PATCH] using i915_ag for dgpu device disable dgpu devices for pkt i915 hack driver name i915_ag to i915 mei_gsc support load the huc for dgpu Tracked-On: OAM-118821 Signed-off-by: Kanli.Hu --- drivers/gpu/drm/drm_fb_helper.c | 10 +++++++--- drivers/gpu/drm/drm_ioctl.c | 10 ++++++++-- drivers/gpu/drm/i915/i915_pci.c | 4 ++++ drivers/misc/mei/gsc-me.c | 9 +++++++++ drivers/misc/mei/hdcp/mei_hdcp.c | 2 +- drivers/misc/mei/pxp/mei_pxp.c | 2 +- 6 files changed, 30 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 61a5d450cc20..fea8332ac405 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -1758,9 +1758,13 @@ void drm_fb_helper_fill_info(struct fb_info *info, * "simpledrmdrmfb" in /proc/fb. Unfortunately, it's an uAPI and can't * be changed due user-space tools (e.g: pm-utils) matching against it. */ - snprintf(info->fix.id, sizeof(info->fix.id), "%sdrmfb", - fb_helper->dev->driver->name); - + if (strncmp(fb_helper->dev->driver->name, "i915", 4) == 0) { + snprintf(info->fix.id, sizeof(info->fix.id), "%sdrmfb", + "i915"); + } else { + snprintf(info->fix.id, sizeof(info->fix.id), "%sdrmfb", + fb_helper->dev->driver->name); + } } EXPORT_SYMBOL(drm_fb_helper_fill_info); diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c index 17d7978600b7..0e2580b8de68 100644 --- a/drivers/gpu/drm/drm_ioctl.c +++ b/drivers/gpu/drm/drm_ioctl.c @@ -526,8 +526,14 @@ int drm_version(struct drm_device *dev, void *data, version->version_major = dev->driver->major; version->version_minor = dev->driver->minor; version->version_patchlevel = dev->driver->patchlevel; - err = drm_copy_field(version->name, &version->name_len, - dev->driver->name); + + if (strncmp(dev->driver->name, "i915", 4) == 0) + err = drm_copy_field(version->name, &version->name_len, + "i915"); + else + err = drm_copy_field(version->name, &version->name_len, + dev->driver->name); + if (!err) err = drm_copy_field(version->date, &version->date_len, dev->driver->date); diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c index d7bfff01dc50..23f3eed0a9f3 100644 --- a/drivers/gpu/drm/i915/i915_pci.c +++ b/drivers/gpu/drm/i915/i915_pci.c @@ -925,11 +925,15 @@ static const struct pci_device_id pciidlist[] = { INTEL_ADLS_IDS(&adl_s_info), INTEL_ADLP_IDS(&adl_p_info), INTEL_ADLN_IDS(&adl_p_info), +#if 0 INTEL_DG1_IDS(&dg1_info), +#endif INTEL_RPLS_IDS(&adl_s_info), INTEL_RPLP_IDS(&adl_p_info), +#if 0 INTEL_DG2_IDS(&dg2_info), INTEL_ATS_M_IDS(&ats_m_info), +#endif INTEL_MTL_IDS(&mtl_info), {0, 0, 0} }; diff --git a/drivers/misc/mei/gsc-me.c b/drivers/misc/mei/gsc-me.c index e63cabd0818d..846e1314b574 100644 --- a/drivers/misc/mei/gsc-me.c +++ b/drivers/misc/mei/gsc-me.c @@ -292,6 +292,15 @@ static const struct auxiliary_device_id mei_gsc_id_table[] = { .name = "i915.mei-gscfi", .driver_data = MEI_ME_GSCFI_CFG, }, + { + .name = "i915_ag.mei-gsc", + .driver_data = MEI_ME_GSC_CFG, + + }, + { + .name = "i915_ag.mei-gscfi", + .driver_data = MEI_ME_GSCFI_CFG, + }, { /* sentinel */ } diff --git a/drivers/misc/mei/hdcp/mei_hdcp.c b/drivers/misc/mei/hdcp/mei_hdcp.c index 8c3195b96543..760c341cffd7 100644 --- a/drivers/misc/mei/hdcp/mei_hdcp.c +++ b/drivers/misc/mei/hdcp/mei_hdcp.c @@ -782,7 +782,7 @@ static int mei_hdcp_component_match(struct device *dev, int subcomponent, { struct device *base = data; - if (!dev->driver || strcmp(dev->driver->name, "i915") || + if (!dev->driver || strncmp(dev->driver->name, "i915", 4) || subcomponent != I915_COMPONENT_HDCP) return 0; diff --git a/drivers/misc/mei/pxp/mei_pxp.c b/drivers/misc/mei/pxp/mei_pxp.c index 7ee1fa7b1cb3..2f927dc27a38 100644 --- a/drivers/misc/mei/pxp/mei_pxp.c +++ b/drivers/misc/mei/pxp/mei_pxp.c @@ -159,7 +159,7 @@ static int mei_pxp_component_match(struct device *dev, int subcomponent, if (!dev) return 0; - if (!dev->driver || strcmp(dev->driver->name, "i915") || + if (!dev->driver || strncmp(dev->driver->name, "i915", 4) || subcomponent != I915_COMPONENT_PXP) return 0;