diff options
author | José Roberto de Souza <jose.souza@intel.com> | 2018-11-30 15:20:47 -0800 |
---|---|---|
committer | José Roberto de Souza <jose.souza@intel.com> | 2018-12-03 14:55:39 -0800 |
commit | e1bf094b3c7514934168dcb69f18b65aacb5a953 (patch) | |
tree | fd8e655c0df5570871894783fd805f4bb1e6e8f6 /drivers/gpu/drm/i915/intel_device_info.c | |
parent | ae9e7ced4f7b0e9d1646844b4713d6b60e9b3f65 (diff) | |
download | linux-e1bf094b3c7514934168dcb69f18b65aacb5a953.tar.gz linux-e1bf094b3c7514934168dcb69f18b65aacb5a953.tar.bz2 linux-e1bf094b3c7514934168dcb69f18b65aacb5a953.zip |
drm/i915: Add HAS_DISPLAY() and use it
Right now it is decided if GEN has display by checking the num_pipes,
so lets make it explicit and use a macro.
Cc: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181130232048.14216-1-jose.souza@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_device_info.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_device_info.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c index ceecb5bd5226..677002a9e893 100644 --- a/drivers/gpu/drm/i915/intel_device_info.c +++ b/drivers/gpu/drm/i915/intel_device_info.c @@ -782,7 +782,7 @@ void intel_device_info_runtime_init(struct intel_device_info *info) if (i915_modparams.disable_display) { DRM_INFO("Display disabled (module parameter)\n"); info->num_pipes = 0; - } else if (info->num_pipes > 0 && + } else if (HAS_DISPLAY(dev_priv) && (IS_GEN7(dev_priv) || IS_GEN8(dev_priv)) && HAS_PCH_SPLIT(dev_priv)) { u32 fuse_strap = I915_READ(FUSE_STRAP); @@ -807,7 +807,7 @@ void intel_device_info_runtime_init(struct intel_device_info *info) DRM_INFO("PipeC fused off\n"); info->num_pipes -= 1; } - } else if (info->num_pipes > 0 && IS_GEN9(dev_priv)) { + } else if (HAS_DISPLAY(dev_priv) && IS_GEN9(dev_priv)) { u32 dfsm = I915_READ(SKL_DFSM); u8 disabled_mask = 0; bool invalid; |