diff mbox

[8/9] drm/i915: Set PCH_NOP

Message ID 1363198868-21787-9-git-send-email-ben@bwidawsk.net (mailing list archive)
State New, archived
Headers show

Commit Message

Ben Widawsky March 13, 2013, 6:21 p.m. UTC
Set up PCH_NOP when we match a certain platform.

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

Comments

Daniel Vetter March 17, 2013, 9:36 p.m. UTC | #1
On Wed, Mar 13, 2013 at 11:21:07AM -0700, Ben Widawsky wrote:
> Set up PCH_NOP when we match a certain platform.
> 
> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
> ---
>  drivers/gpu/drm/i915/i915_drv.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 0849651..0fa55cb 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -398,11 +398,22 @@ static const struct pci_device_id pciidlist[] = {		/* aka */
>  MODULE_DEVICE_TABLE(pci, pciidlist);
>  #endif
>  
> +static bool intel_pch_displayless(struct drm_device *dev)
> +{
> +	return false;
> +}
> +
>  void intel_detect_pch(struct drm_device *dev)
>  {
>  	struct drm_i915_private *dev_priv = dev->dev_private;
>  	struct pci_dev *pch;
>  
> +	if (intel_pch_displayless(dev)) {

Just checking for num_pipes == 0 + a comment not good enough? I know, a
bit hapzardous, but I don't see how the indirection helps code clarity.
-Daniel
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 0849651..0fa55cb 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -398,11 +398,22 @@  static const struct pci_device_id pciidlist[] = {		/* aka */
 MODULE_DEVICE_TABLE(pci, pciidlist);
 #endif
 
+static bool intel_pch_displayless(struct drm_device *dev)
+{
+	return false;
+}
+
 void intel_detect_pch(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	struct pci_dev *pch;
 
+	if (intel_pch_displayless(dev)) {
+		dev_priv->pch_type = PCH_NOP;
+		dev_priv->num_pch_pll = 0;
+		return;
+	}
+
 	/*
 	 * The reason to probe ISA bridge instead of Dev31:Fun0 is to
 	 * make graphics device passthrough work easy for VMM, that only