Skip to content

Commit 51e3a64

Browse files
committed
drm/i915/dg1: Add fake PCH
DG1 has the south engine display on the same PCI device. Ideally we could use HAS_PCH_SPLIT(), but that macro is misused all across the code base to rather signify a range of gens. So add a fake one for DG1 to be used where needed. Cc: Aditya Swarup <[email protected]> Signed-off-by: Lucas De Marchi <[email protected]> Reviewed-by: Anusha Srivatsa <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent f619e51 commit 51e3a64

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

drivers/gpu/drm/i915/intel_pch.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,12 @@ void intel_detect_pch(struct drm_i915_private *dev_priv)
188188
{
189189
struct pci_dev *pch = NULL;
190190

191+
/* DG1 has south engine display on the same PCI device */
192+
if (IS_DG1(dev_priv)) {
193+
dev_priv->pch_type = PCH_DG1;
194+
return;
195+
}
196+
191197
/*
192198
* The reason to probe ISA bridge instead of Dev31:Fun0 is to
193199
* make graphics device passthrough work easy for VMM, that only

drivers/gpu/drm/i915/intel_pch.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ enum intel_pch {
2626
PCH_JSP, /* Jasper Lake PCH */
2727
PCH_MCC, /* Mule Creek Canyon PCH */
2828
PCH_TGP, /* Tiger Lake PCH */
29+
30+
/* Fake PCHs, functionality handled on the same PCI dev */
31+
PCH_DG1 = 1024,
2932
};
3033

3134
#define INTEL_PCH_DEVICE_ID_MASK 0xff80
@@ -56,6 +59,7 @@ enum intel_pch {
5659

5760
#define INTEL_PCH_TYPE(dev_priv) ((dev_priv)->pch_type)
5861
#define INTEL_PCH_ID(dev_priv) ((dev_priv)->pch_id)
62+
#define HAS_PCH_DG1(dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_DG1)
5963
#define HAS_PCH_JSP(dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_JSP)
6064
#define HAS_PCH_MCC(dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_MCC)
6165
#define HAS_PCH_TGP(dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_TGP)

0 commit comments

Comments
 (0)