[Intel-gfx] [PATCH v4] drm/i915: Try to guess PCH type even without ISA bridge

Zhenyu Wang zhenyuw at linux.intel.com
Mon Jan 18 06:04:06 UTC 2021


On 2021.01.15 13:01:49 +0200, Joonas Lahtinen wrote:
> Quoting Jani Nikula (2021-01-15 12:50:54)
> > On Thu, 14 Jan 2021, Zhenyu Wang <zhenyuw at linux.intel.com> wrote:
> > > On 2021.01.14 08:58:19 +0800, Xiong Zhang wrote:
> > >> From: Zhenyu Wang <zhenyuw at linux.intel.com>
> > >> 
> > >> Some vmm like hyperv and crosvm don't supply any ISA bridge to their guest,
> > >> when igd passthrough is equipped on these vmm, guest i915 display may
> > >> couldn't work as guest i915 detects PCH_NONE pch type.
> > >> 
> > >> When i915 runs as guest, this patch guess pch type through gpu type even
> > >> without ISA bridge.
> > >> 
> > >> v2: Fix CI warning
> > >> v3: Add HAS_DISPLAY()= true condition beforce guessing virt pch, then
> > >>     refactori.
> > >> v4: Fix CI warning
> > >> 
> > >> Signed-off-by: Zhenyu Wang <zhenyuw at linux.intel.com>
> > >> Signed-off-by: Xiong Zhang <xiong.y.zhang at intel.com>
> > >> ---
> > >>  drivers/gpu/drm/i915/i915_drv.h  |  7 +++++-
> > >>  drivers/gpu/drm/i915/intel_pch.c | 39 ++++++++++++++++++--------------
> > >>  2 files changed, 28 insertions(+), 18 deletions(-)
> > >>
> > >
> > > Good to me, thanks! I think this should change author to you. :)
> > >
> > > Reviewed-by: Zhenyu Wang <zhenyuw at linux.intel.com>
> > 
> > Pushed to drm-intel-next, thanks for the patch and review. I ended up
> > retaining Zhenyu's authorship, and added
> > 
> > Co-developed-by: Xiong Zhang <xiong.y.zhang at intel.com>
> 
> This only works for the majority of SKUs which happen to use the PCH
> that is most common. I NAKed very similar patch some years back asking
> for a reliable means to detect the PCH type instead.
> 
> Has there been any attempt to introduce such mechanism?
> 

I think the situation is that if just passing through GPU device, as
full device model depends on userspace VMM, we have no way to properly
detect PCH type from device, e.g in case of one GEN device which could
live with two or more different PCH types. It's better if either we
have properly defined way to detect through GPU device or display arch
always defines CPU/PCH display in pair.

Currently this tries to assume PCH with best effort that fixed bunch of
problems. On really mismatch case, how about adding i915 parameter to
override PCH type? As that won't add dependency on other components..
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20210118/1f74e19b/attachment.sig>


More information about the Intel-gfx mailing list