diff mbox

[10/10,v2] drm/i915: Add a pipeless ivybridge configuration

Message ID 1363371475-855-10-git-send-email-ben@bwidawsk.net (mailing list archive)
State New, archived
Headers show

Commit Message

Ben Widawsky March 15, 2013, 6:17 p.m. UTC
FIXME: This is based on some HW being used for a demo. We should
probably wait until we have confirmation on the IDs before upstreaming
this patch.

v2: Use GEN7_FEATURES (Chris)

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
 drivers/gpu/drm/i915/i915_drv.c | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

Comments

Daniel Vetter March 17, 2013, 9:42 p.m. UTC | #1
On Fri, Mar 15, 2013 at 11:17:55AM -0700, Ben Widawsky wrote:
> FIXME: This is based on some HW being used for a demo. We should
> probably wait until we have confirmation on the IDs before upstreaming
> this patch.

I don't mind too much if we need to fixup the device after the fact, but
checking whether this is the shipping configuration shouldn't hurt.

More important is probably whether there's any quanta platform with the
same sdev/svendor ids without a fused pch. In that case I guess we need to
check for something else (maybe some fuse flags in the pch?).

Anyway, I've done a pretty careful review of everything, mostly looking to
reduce the impact of this feature on our code. So if you respin and
quickly test this on an real ivb (just for paranoia) and the special box
I'll merge it right away. Imo the maintenance burned is really small, so
I'm not against merging this in the demo stage.

Cheers, Daniel
> 
> v2: Use GEN7_FEATURES (Chris)
> 
> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
> ---
>  drivers/gpu/drm/i915/i915_drv.c | 19 ++++++++++++++++++-
>  1 file changed, 18 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index a67e8c7..bd8dfa6 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -135,6 +135,16 @@ extern int intel_agp_enabled;
>  	.subdevice = PCI_ANY_ID,		\
>  	.driver_data = (unsigned long) info }
>  
> +#define INTEL_QUANTA_VGA_DEVICE(info) {		\
> +	.class = PCI_BASE_CLASS_DISPLAY << 16,	\
> +	.class_mask = 0xff0000,			\
> +	.vendor = 0x8086,			\
> +	.device = 0x16a,			\
> +	.subvendor = 0x152d,			\
> +	.subdevice = 0x8990,			\
> +	.driver_data = (unsigned long) info }
> +
> +
>  static const struct intel_device_info intel_i830_info = {
>  	.gen = 2, .is_mobile = 1, .cursor_needs_physical = 1, .num_pipes = 2,
>  	.has_overlay = 1, .overlay_needs_physical = 1,
> @@ -267,6 +277,12 @@ static const struct intel_device_info intel_ivybridge_m_info = {
>  	.is_mobile = 1,
>  };
>  
> +static const struct intel_device_info intel_ivybridge_q_info = {
> +	GEN7_FEATURES,
> +	.is_ivybridge = 1,
> +	.num_pipes = 0, /* legal, last one wins */
> +};
> +
>  static const struct intel_device_info intel_valleyview_m_info = {
>  	GEN7_FEATURES,
>  	.is_mobile = 1,
> @@ -337,6 +353,7 @@ static const struct pci_device_id pciidlist[] = {		/* aka */
>  	INTEL_VGA_DEVICE(0x0152, &intel_ivybridge_d_info), /* GT1 desktop */
>  	INTEL_VGA_DEVICE(0x0162, &intel_ivybridge_d_info), /* GT2 desktop */
>  	INTEL_VGA_DEVICE(0x015a, &intel_ivybridge_d_info), /* GT1 server */
> +	INTEL_QUANTA_VGA_DEVICE(&intel_ivybridge_q_info), /* Quanta transcode */
>  	INTEL_VGA_DEVICE(0x016a, &intel_ivybridge_d_info), /* GT2 server */
>  	INTEL_VGA_DEVICE(0x0402, &intel_haswell_d_info), /* GT1 desktop */
>  	INTEL_VGA_DEVICE(0x0412, &intel_haswell_d_info), /* GT2 desktop */
> @@ -386,7 +403,7 @@ MODULE_DEVICE_TABLE(pci, pciidlist);
>  
>  static bool intel_pch_displayless(struct drm_device *dev)
>  {
> -	return false;
> +	return INTEL_INFO(dev) == &intel_ivybridge_q_info;
>  }
>  
>  void intel_detect_pch(struct drm_device *dev)
> -- 
> 1.8.1.5
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Ben Widawsky March 19, 2013, 6:49 p.m. UTC | #2
On Sun, Mar 17, 2013 at 10:42:33PM +0100, Daniel Vetter wrote:
> On Fri, Mar 15, 2013 at 11:17:55AM -0700, Ben Widawsky wrote:
> > FIXME: This is based on some HW being used for a demo. We should
> > probably wait until we have confirmation on the IDs before upstreaming
> > this patch.
> 
> I don't mind too much if we need to fixup the device after the fact, but
> checking whether this is the shipping configuration shouldn't hurt.
> 
> More important is probably whether there's any quanta platform with the
> same sdev/svendor ids without a fused pch. In that case I guess we need to
> check for something else (maybe some fuse flags in the pch?).

I highly doubt it, but I don't know how to prove it. From what I gather
on the internet and parsing through the limited uses in the kernel
today, the subvendor/subdevice is unique.

> 
> Anyway, I've done a pretty careful review of everything, mostly looking to
> reduce the impact of this feature on our code. So if you respin and
> quickly test this on an real ivb (just for paranoia) and the special box
> I'll merge it right away. Imo the maintenance burned is really small, so
> I'm not against merging this in the demo stage.

I've rebased on nightly and tried to apply all the requests (assuming I
didn't miss any). Because I am at home today, and testing displayless at
home is sort of a pain, this is untested on both regular IVB (the rebase
did have a conflict), and the Quanta server.

I can test it on regular IVB tomorrow, and I'll begin trying to get it
tested on the Quanta thing ASAP, but it could be a few days. Meanwhile,
I've pushed the respun patches here:
http://cgit.freedesktop.org/~bwidawsk/drm-intel/log/?h=pch_displayless

> 
> Cheers, Daniel

Thanks for the review.
[snip]

> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Jesse Barnes March 19, 2013, 7:48 p.m. UTC | #3
On Tue, 19 Mar 2013 11:49:49 -0700
Ben Widawsky <ben@bwidawsk.net> wrote:

> On Sun, Mar 17, 2013 at 10:42:33PM +0100, Daniel Vetter wrote:
> > On Fri, Mar 15, 2013 at 11:17:55AM -0700, Ben Widawsky wrote:
> > > FIXME: This is based on some HW being used for a demo. We should
> > > probably wait until we have confirmation on the IDs before upstreaming
> > > this patch.
> > 
> > I don't mind too much if we need to fixup the device after the fact, but
> > checking whether this is the shipping configuration shouldn't hurt.
> > 
> > More important is probably whether there's any quanta platform with the
> > same sdev/svendor ids without a fused pch. In that case I guess we need to
> > check for something else (maybe some fuse flags in the pch?).
> 
> I highly doubt it, but I don't know how to prove it. From what I gather
> on the internet and parsing through the limited uses in the kernel
> today, the subvendor/subdevice is unique.

I believe this is just an early board; for production I've requested a
unique PCI ID.  We'll see what happens...  If nothing else, the
existing subvendor/subdev is good for testing the new code.  We can
drop it if/when we get a better check.
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index a67e8c7..bd8dfa6 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -135,6 +135,16 @@  extern int intel_agp_enabled;
 	.subdevice = PCI_ANY_ID,		\
 	.driver_data = (unsigned long) info }
 
+#define INTEL_QUANTA_VGA_DEVICE(info) {		\
+	.class = PCI_BASE_CLASS_DISPLAY << 16,	\
+	.class_mask = 0xff0000,			\
+	.vendor = 0x8086,			\
+	.device = 0x16a,			\
+	.subvendor = 0x152d,			\
+	.subdevice = 0x8990,			\
+	.driver_data = (unsigned long) info }
+
+
 static const struct intel_device_info intel_i830_info = {
 	.gen = 2, .is_mobile = 1, .cursor_needs_physical = 1, .num_pipes = 2,
 	.has_overlay = 1, .overlay_needs_physical = 1,
@@ -267,6 +277,12 @@  static const struct intel_device_info intel_ivybridge_m_info = {
 	.is_mobile = 1,
 };
 
+static const struct intel_device_info intel_ivybridge_q_info = {
+	GEN7_FEATURES,
+	.is_ivybridge = 1,
+	.num_pipes = 0, /* legal, last one wins */
+};
+
 static const struct intel_device_info intel_valleyview_m_info = {
 	GEN7_FEATURES,
 	.is_mobile = 1,
@@ -337,6 +353,7 @@  static const struct pci_device_id pciidlist[] = {		/* aka */
 	INTEL_VGA_DEVICE(0x0152, &intel_ivybridge_d_info), /* GT1 desktop */
 	INTEL_VGA_DEVICE(0x0162, &intel_ivybridge_d_info), /* GT2 desktop */
 	INTEL_VGA_DEVICE(0x015a, &intel_ivybridge_d_info), /* GT1 server */
+	INTEL_QUANTA_VGA_DEVICE(&intel_ivybridge_q_info), /* Quanta transcode */
 	INTEL_VGA_DEVICE(0x016a, &intel_ivybridge_d_info), /* GT2 server */
 	INTEL_VGA_DEVICE(0x0402, &intel_haswell_d_info), /* GT1 desktop */
 	INTEL_VGA_DEVICE(0x0412, &intel_haswell_d_info), /* GT2 desktop */
@@ -386,7 +403,7 @@  MODULE_DEVICE_TABLE(pci, pciidlist);
 
 static bool intel_pch_displayless(struct drm_device *dev)
 {
-	return false;
+	return INTEL_INFO(dev) == &intel_ivybridge_q_info;
 }
 
 void intel_detect_pch(struct drm_device *dev)