All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Restore the preliminary HW check.
@ 2013-08-23 23:00 Ben Widawsky
  2013-08-23 23:33 ` Jesse Barnes
  0 siblings, 1 reply; 4+ messages in thread
From: Ben Widawsky @ 2013-08-23 23:00 UTC (permalink / raw)
  To: intel-gfx; +Cc: Ben Widawsky, Ben Widawsky

We still maintain code internally that cares about preliminary support.
Leaving the check here doesn't hurt anyone, and should keep things more
in line.

This time around, stick the info in the intel_info structure, and also
change the error from DRM_ERROR->DRM_INFO.

This is a partial revert of:
commit 590e4df8c82e6c2707ae12ba6672ab6fb9cd4b89
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date:   Wed May 8 10:45:15 2013 -0700

    drm/i915: VLV support is no longer preliminary

Daniel, I'll provide the fix ups for internal too if/when you merge
this (if you want).

Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
 drivers/gpu/drm/i915/i915_drv.c | 6 ++++++
 drivers/gpu/drm/i915/i915_drv.h | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 735dd56..ef7425c 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -895,6 +895,12 @@ static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	struct intel_device_info *intel_info =
 		(struct intel_device_info *) ent->driver_data;
 
+	if (IS_PRELIMINARY_HW(intel_info) && !i915_preliminary_hw_support) {
+		DRM_INFO("This hardware requires preliminary hardware support.\n"
+			 "See CONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT, and/or modparam preliminary_hw_support\n");
+		return -ENODEV;
+	}
+
 	/* Only bind to function 0 of the device. Early generations
 	 * used function 1 as a placeholder for multi-head. This causes
 	 * us confusion instead, especially on the systems where both
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 8ee15b4..78cd6f9 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -419,6 +419,7 @@ struct intel_uncore {
 	func(is_ivybridge) sep \
 	func(is_valleyview) sep \
 	func(is_haswell) sep \
+	func(is_preliminary) sep \
 	func(has_force_wake) sep \
 	func(has_fbc) sep \
 	func(has_pipe_cxsr) sep \
@@ -1592,6 +1593,7 @@ struct drm_i915_file_private {
 				 ((dev)->pci_device & 0xFF00) == 0x0C00)
 #define IS_ULT(dev)		(IS_HASWELL(dev) && \
 				 ((dev)->pci_device & 0xFF00) == 0x0A00)
+#define IS_PRELIMINARY_HW(intel_info) ((intel_info)->is_preliminary)
 
 /*
  * The genX designation typically refers to the render engine, so render
-- 
1.8.3.4

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

* Re: [PATCH] drm/i915: Restore the preliminary HW check.
  2013-08-23 23:00 [PATCH] drm/i915: Restore the preliminary HW check Ben Widawsky
@ 2013-08-23 23:33 ` Jesse Barnes
  2013-08-29 16:35   ` Ben Widawsky
  0 siblings, 1 reply; 4+ messages in thread
From: Jesse Barnes @ 2013-08-23 23:33 UTC (permalink / raw)
  To: Ben Widawsky; +Cc: intel-gfx, Ben Widawsky

On Fri, 23 Aug 2013 16:00:07 -0700
Ben Widawsky <benjamin.widawsky@intel.com> wrote:

> We still maintain code internally that cares about preliminary support.
> Leaving the check here doesn't hurt anyone, and should keep things more
> in line.
> 
> This time around, stick the info in the intel_info structure, and also
> change the error from DRM_ERROR->DRM_INFO.

I hate this param.

But this looks like a better way to do it than the ID list we had in
pci_probe before.

Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>

-- 
Jesse Barnes, Intel Open Source Technology Center

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

* Re: [PATCH] drm/i915: Restore the preliminary HW check.
  2013-08-23 23:33 ` Jesse Barnes
@ 2013-08-29 16:35   ` Ben Widawsky
  2013-08-29 19:13     ` Daniel Vetter
  0 siblings, 1 reply; 4+ messages in thread
From: Ben Widawsky @ 2013-08-29 16:35 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx, Ben Widawsky

On Fri, Aug 23, 2013 at 04:33:58PM -0700, Jesse Barnes wrote:
> On Fri, 23 Aug 2013 16:00:07 -0700
> Ben Widawsky <benjamin.widawsky@intel.com> wrote:
> 
> > We still maintain code internally that cares about preliminary support.
> > Leaving the check here doesn't hurt anyone, and should keep things more
> > in line.
> > 
> > This time around, stick the info in the intel_info structure, and also
> > change the error from DRM_ERROR->DRM_INFO.
> 
> I hate this param.
> 
> But this looks like a better way to do it than the ID list we had in
> pci_probe before.
> 
> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> 

Daniel, ping. One of my goals is to allow people to easily look at
source and determine which HW is preliminary, and which isn't.

-- 
Ben Widawsky, Intel Open Source Technology Center

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

* Re: [PATCH] drm/i915: Restore the preliminary HW check.
  2013-08-29 16:35   ` Ben Widawsky
@ 2013-08-29 19:13     ` Daniel Vetter
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2013-08-29 19:13 UTC (permalink / raw)
  To: Ben Widawsky; +Cc: intel-gfx, Ben Widawsky

On Thu, Aug 29, 2013 at 09:35:14AM -0700, Ben Widawsky wrote:
> On Fri, Aug 23, 2013 at 04:33:58PM -0700, Jesse Barnes wrote:
> > On Fri, 23 Aug 2013 16:00:07 -0700
> > Ben Widawsky <benjamin.widawsky@intel.com> wrote:
> > 
> > > We still maintain code internally that cares about preliminary support.
> > > Leaving the check here doesn't hurt anyone, and should keep things more
> > > in line.
> > > 
> > > This time around, stick the info in the intel_info structure, and also
> > > change the error from DRM_ERROR->DRM_INFO.
> > 
> > I hate this param.
> > 
> > But this looks like a better way to do it than the ID list we had in
> > pci_probe before.

We've never had a table of pci ids, but a simple check for IS_HASWELL ...

> > 
> > Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> > 
> 
> Daniel, ping. One of my goals is to allow people to easily look at
> source and determine which HW is preliminary, and which isn't.

Queued for -next, thanks for the patch.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

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

end of thread, other threads:[~2013-08-29 19:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-23 23:00 [PATCH] drm/i915: Restore the preliminary HW check Ben Widawsky
2013-08-23 23:33 ` Jesse Barnes
2013-08-29 16:35   ` Ben Widawsky
2013-08-29 19:13     ` Daniel Vetter

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.