All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm/i915: refine qemu south bridge detection
@ 2016-01-25 11:02 ` Gerd Hoffmann
  0 siblings, 0 replies; 8+ messages in thread
From: Gerd Hoffmann @ 2016-01-25 11:02 UTC (permalink / raw)
  To: intel-gfx
  Cc: bjorn, daniel.vetter, Gerd Hoffmann, Daniel Vetter, Jani Nikula,
	David Airlie, open list:INTEL DRM DRIVERS (excluding Poulsbo,
	Moorestow...), linux-kernel@vger.kernel.org (open list)

The test for the qemu q35 south bridge added by commit
"39bfcd52 drm/i915: more virtual south bridge detection"
also matches on real hardware.  Having the check for
virtual systems last in the list is not enough to avoid
that ...

Refine the check by additionally verifying the pci
subsystem id to see whenever it *really* is qemu.

[ v2: fix subvendor tyops ]

Reported-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 drivers/gpu/drm/i915/i915_drv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 3ac616d..f357058 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -501,7 +501,9 @@ void intel_detect_pch(struct drm_device *dev)
 				WARN_ON(!IS_SKYLAKE(dev) &&
 					!IS_KABYLAKE(dev));
 			} else if ((id == INTEL_PCH_P2X_DEVICE_ID_TYPE) ||
-				   (id == INTEL_PCH_QEMU_DEVICE_ID_TYPE)) {
+				   ((id == INTEL_PCH_QEMU_DEVICE_ID_TYPE) &&
+				    pch->subsystem_vendor == 0x1af4 &&
+				    pch->subsystem_device == 0x1100)) {
 				dev_priv->pch_type = intel_virt_detect_pch(dev);
 			} else
 				continue;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2] drm/i915: refine qemu south bridge detection
@ 2016-01-25 11:02 ` Gerd Hoffmann
  0 siblings, 0 replies; 8+ messages in thread
From: Gerd Hoffmann @ 2016-01-25 11:02 UTC (permalink / raw)
  To: intel-gfx
  Cc: daniel.vetter, open list:INTEL DRM DRIVERS excluding Poulsbo,
	Moorestow...,
	linux-kernel@vger.kernel.org open list, Daniel Vetter, bjorn

The test for the qemu q35 south bridge added by commit
"39bfcd52 drm/i915: more virtual south bridge detection"
also matches on real hardware.  Having the check for
virtual systems last in the list is not enough to avoid
that ...

Refine the check by additionally verifying the pci
subsystem id to see whenever it *really* is qemu.

[ v2: fix subvendor tyops ]

Reported-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 drivers/gpu/drm/i915/i915_drv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 3ac616d..f357058 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -501,7 +501,9 @@ void intel_detect_pch(struct drm_device *dev)
 				WARN_ON(!IS_SKYLAKE(dev) &&
 					!IS_KABYLAKE(dev));
 			} else if ((id == INTEL_PCH_P2X_DEVICE_ID_TYPE) ||
-				   (id == INTEL_PCH_QEMU_DEVICE_ID_TYPE)) {
+				   ((id == INTEL_PCH_QEMU_DEVICE_ID_TYPE) &&
+				    pch->subsystem_vendor == 0x1af4 &&
+				    pch->subsystem_device == 0x1100)) {
 				dev_priv->pch_type = intel_virt_detect_pch(dev);
 			} else
 				continue;
-- 
1.8.3.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] drm/i915: refine qemu south bridge detection
  2016-01-25 11:02 ` Gerd Hoffmann
  (?)
@ 2016-01-26  8:57 ` Bruno Wolff III
  -1 siblings, 0 replies; 8+ messages in thread
From: Bruno Wolff III @ 2016-01-26  8:57 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: David Airlie, daniel.vetter, intel-gfx,
	open list:INTEL DRM DRIVERS (excluding Poulsbo, Moorestow...),
	linux-kernel@vger.kernel.org (open list),
	Daniel Vetter, bjorn

On Mon, Jan 25, 2016 at 12:02:28 +0100,
  Gerd Hoffmann <kraxel@redhat.com> wrote:
>
>Refine the check by additionally verifying the pci
>subsystem id to see whenever it *really* is qemu.
>
>[ v2: fix subvendor tyops ]

I tested this patch on my laptop that was getting a black screen part way 
through the boot process and it fixed things.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] drm/i915: refine qemu south bridge detection
  2016-01-25 11:02 ` Gerd Hoffmann
  (?)
  (?)
@ 2016-01-28 16:07 ` Bruno Wolff III
  2016-01-29  7:06   ` Jani Nikula
  -1 siblings, 1 reply; 8+ messages in thread
From: Bruno Wolff III @ 2016-01-28 16:07 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: David Airlie, daniel.vetter, intel-gfx,
	open list:INTEL DRM DRIVERS (excluding Poulsbo, Moorestow...),
	linux-kernel@vger.kernel.org (open list),
	Daniel Vetter, bjorn

On Mon, Jan 25, 2016 at 12:02:28 +0100,
  Gerd Hoffmann <kraxel@redhat.com> wrote:
>The test for the qemu q35 south bridge added by commit
>"39bfcd52 drm/i915: more virtual south bridge detection"
>also matches on real hardware.  Having the check for
>virtual systems last in the list is not enough to avoid
>that ...
>
>Refine the check by additionally verifying the pci
>subsystem id to see whenever it *really* is qemu.
>
>[ v2: fix subvendor tyops ]

I haven't seen this patch (or a revert of 39bfcd52) show up in the intel 
drm repos yet. Has anyone asked for this tpo be included? Is there some 
problem with the patch? (It works for me.)
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] drm/i915: refine qemu south bridge detection
  2016-01-28 16:07 ` Bruno Wolff III
@ 2016-01-29  7:06   ` Jani Nikula
  0 siblings, 0 replies; 8+ messages in thread
From: Jani Nikula @ 2016-01-29  7:06 UTC (permalink / raw)
  To: Bruno Wolff III, Gerd Hoffmann
  Cc: David Airlie, daniel.vetter, intel-gfx,
	open list:INTEL DRM DRIVERS (excluding Poulsbo, Moorestow...),
	linux-kernel@vger.kernel.org (open list),
	Daniel Vetter, bjorn

On Thu, 28 Jan 2016, Bruno Wolff III <bruno@wolff.to> wrote:
> On Mon, Jan 25, 2016 at 12:02:28 +0100,
>   Gerd Hoffmann <kraxel@redhat.com> wrote:
>>The test for the qemu q35 south bridge added by commit
>>"39bfcd52 drm/i915: more virtual south bridge detection"
>>also matches on real hardware.  Having the check for
>>virtual systems last in the list is not enough to avoid
>>that ...
>>
>>Refine the check by additionally verifying the pci
>>subsystem id to see whenever it *really* is qemu.
>>
>>[ v2: fix subvendor tyops ]
>
> I haven't seen this patch (or a revert of 39bfcd52) show up in the intel 
> drm repos yet. Has anyone asked for this tpo be included? Is there some 
> problem with the patch? (It works for me.)

Pushed to drm-intel-next-queued, thanks for the patch and testing.

BR,
Jani.



-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] drm/i915: refine qemu south bridge detection
  2016-01-25 11:02 ` Gerd Hoffmann
                   ` (2 preceding siblings ...)
  (?)
@ 2016-01-29  7:59 ` Jani Nikula
  2016-01-29  8:49   ` Gerd Hoffmann
  -1 siblings, 1 reply; 8+ messages in thread
From: Jani Nikula @ 2016-01-29  7:59 UTC (permalink / raw)
  To: Gerd Hoffmann, intel-gfx
  Cc: daniel.vetter, open list:INTEL DRM DRIVERS (excluding Poulsbo,
	Moorestow...), linux-kernel@vger.kernel.org (open list),
	Daniel Vetter, bjorn

On Mon, 25 Jan 2016, Gerd Hoffmann <kraxel@redhat.com> wrote:
> The test for the qemu q35 south bridge added by commit
> "39bfcd52 drm/i915: more virtual south bridge detection"
> also matches on real hardware.  Having the check for
> virtual systems last in the list is not enough to avoid
> that ...
>
> Refine the check by additionally verifying the pci
> subsystem id to see whenever it *really* is qemu.
>
> [ v2: fix subvendor tyops ]

Incidentally, I just spotted [1]. Gerd, could you review that one
please, and (once it gets merged) post a follow-up changing our magic
numbers to those constants as well?

Thanks,
Jani.


[1] http://mid.gmane.org/1453739846-3549-1-git-send-email-robbat2@gentoo.org



>
> Reported-by: Bjørn Mork <bjorn@mork.no>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 3ac616d..f357058 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -501,7 +501,9 @@ void intel_detect_pch(struct drm_device *dev)
>  				WARN_ON(!IS_SKYLAKE(dev) &&
>  					!IS_KABYLAKE(dev));
>  			} else if ((id == INTEL_PCH_P2X_DEVICE_ID_TYPE) ||
> -				   (id == INTEL_PCH_QEMU_DEVICE_ID_TYPE)) {
> +				   ((id == INTEL_PCH_QEMU_DEVICE_ID_TYPE) &&
> +				    pch->subsystem_vendor == 0x1af4 &&
> +				    pch->subsystem_device == 0x1100)) {
>  				dev_priv->pch_type = intel_virt_detect_pch(dev);
>  			} else
>  				continue;

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] drm/i915: refine qemu south bridge detection
  2016-01-29  7:59 ` Jani Nikula
@ 2016-01-29  8:49   ` Gerd Hoffmann
  2016-01-29  9:03     ` Jani Nikula
  0 siblings, 1 reply; 8+ messages in thread
From: Gerd Hoffmann @ 2016-01-29  8:49 UTC (permalink / raw)
  To: Jani Nikula
  Cc: David Airlie, daniel.vetter, intel-gfx,
	open list:INTEL DRM DRIVERS (excluding Poulsbo, Moorestow...),
	linux-kernel@vger.kernel.org (open list),
	Daniel Vetter, bjorn

On Fr, 2016-01-29 at 09:59 +0200, Jani Nikula wrote:
> On Mon, 25 Jan 2016, Gerd Hoffmann <kraxel@redhat.com> wrote:
> > The test for the qemu q35 south bridge added by commit
> > "39bfcd52 drm/i915: more virtual south bridge detection"
> > also matches on real hardware.  Having the check for
> > virtual systems last in the list is not enough to avoid
> > that ...
> >
> > Refine the check by additionally verifying the pci
> > subsystem id to see whenever it *really* is qemu.
> >
> > [ v2: fix subvendor tyops ]
> 
> Incidentally, I just spotted [1]. Gerd, could you review that one
> please,

Done.

> and (once it gets merged) post a follow-up changing our magic
> numbers to those constants as well?

Sure.

cheers,
  Gerd

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] drm/i915: refine qemu south bridge detection
  2016-01-29  8:49   ` Gerd Hoffmann
@ 2016-01-29  9:03     ` Jani Nikula
  0 siblings, 0 replies; 8+ messages in thread
From: Jani Nikula @ 2016-01-29  9:03 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: daniel.vetter, intel-gfx,
	open list:INTEL DRM DRIVERS (excluding Poulsbo, Moorestow...),
	linux-kernel@vger.kernel.org (open list),
	Daniel Vetter, bjorn

On Fri, 29 Jan 2016, Gerd Hoffmann <kraxel@redhat.com> wrote:
> On Fr, 2016-01-29 at 09:59 +0200, Jani Nikula wrote:
>> On Mon, 25 Jan 2016, Gerd Hoffmann <kraxel@redhat.com> wrote:
>> > The test for the qemu q35 south bridge added by commit
>> > "39bfcd52 drm/i915: more virtual south bridge detection"
>> > also matches on real hardware.  Having the check for
>> > virtual systems last in the list is not enough to avoid
>> > that ...
>> >
>> > Refine the check by additionally verifying the pci
>> > subsystem id to see whenever it *really* is qemu.
>> >
>> > [ v2: fix subvendor tyops ]
>> 
>> Incidentally, I just spotted [1]. Gerd, could you review that one
>> please,
>
> Done.
>
>> and (once it gets merged) post a follow-up changing our magic
>> numbers to those constants as well?
>
> Sure.

Many thanks,
Jani.


-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-01-29  9:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-25 11:02 [PATCH v2] drm/i915: refine qemu south bridge detection Gerd Hoffmann
2016-01-25 11:02 ` Gerd Hoffmann
2016-01-26  8:57 ` Bruno Wolff III
2016-01-28 16:07 ` Bruno Wolff III
2016-01-29  7:06   ` Jani Nikula
2016-01-29  7:59 ` Jani Nikula
2016-01-29  8:49   ` Gerd Hoffmann
2016-01-29  9:03     ` Jani Nikula

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.