Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH 1/3] drm/i915: disable all display features when no display
@ 2020-09-10  9:52 Jani Nikula
  2020-09-10  9:52 ` [Intel-gfx] [PATCH 2/3] drm/i915: move gen4 GCDGMBUS save/restore to display save/restore Jani Nikula
                   ` (8 more replies)
  0 siblings, 9 replies; 13+ messages in thread
From: Jani Nikula @ 2020-09-10  9:52 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

Disable all display feature flags when there are no pipes i.e. there is
no display. This should help with not having to additionally check for
HAS_DISPLAY() when a feature flag check would suffice.

Also disable modeset and atomic driver features.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/intel_device_info.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
index e2aa5bc3a6e0..adc836f15fde 100644
--- a/drivers/gpu/drm/i915/intel_device_info.c
+++ b/drivers/gpu/drm/i915/intel_device_info.c
@@ -516,6 +516,14 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
 					    S32_MAX),
 				USEC_PER_SEC));
 	}
+
+	if (!HAS_DISPLAY(dev_priv)) {
+		dev_priv->drm.driver_features &= ~(DRIVER_MODESET |
+						   DRIVER_ATOMIC);
+		memset(&info->display, 0, sizeof(info->display));
+		memset(runtime->num_sprites, 0, sizeof(runtime->num_sprites));
+		memset(runtime->num_scalers, 0, sizeof(runtime->num_scalers));
+	}
 }
 
 void intel_driver_caps_print(const struct intel_driver_caps *caps,
-- 
2.20.1

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

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

end of thread, other threads:[~2020-09-11 11:02 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-10  9:52 [Intel-gfx] [PATCH 1/3] drm/i915: disable all display features when no display Jani Nikula
2020-09-10  9:52 ` [Intel-gfx] [PATCH 2/3] drm/i915: move gen4 GCDGMBUS save/restore to display save/restore Jani Nikula
2020-09-10 10:46   ` Ville Syrjälä
2020-09-10  9:52 ` [Intel-gfx] [PATCH 3/3] drm/i915: move gmbus restore to i915_restore_display Jani Nikula
2020-09-10 10:50   ` Ville Syrjälä
2020-09-10 10:02 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/i915: disable all display features when no display Patchwork
2020-09-10 10:28 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-09-10 10:44 ` [Intel-gfx] [PATCH 1/3] " Ville Syrjälä
2020-09-11 11:02   ` Jani Nikula
2020-09-10 11:27 ` [Intel-gfx] ✗ Fi.CI.IGT: failure for series starting with [1/3] " Patchwork
2020-09-10 14:51 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/i915: disable all display features when no display (rev2) Patchwork
2020-09-10 15:15 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-09-10 16:57 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox