Skip to content

Commit

Permalink
using i915_ag for dgpu device
Browse files Browse the repository at this point in the history
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 <kanli.hu@intel.com>
  • Loading branch information
kanlihu committed Jul 4, 2024
1 parent f562c95 commit 8f2ce07
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 7 deletions.
10 changes: 7 additions & 3 deletions drivers/gpu/drm/drm_fb_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
10 changes: 8 additions & 2 deletions drivers/gpu/drm/drm_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 4 additions & 0 deletions drivers/gpu/drm/i915/i915_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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}
};
Expand Down
9 changes: 9 additions & 0 deletions drivers/misc/mei/gsc-me.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/misc/mei/hdcp/mei_hdcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion drivers/misc/mei/pxp/mei_pxp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 8f2ce07

Please sign in to comment.