All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Make sure the base lives at offset 0 of all kms objects
@ 2016-10-12 11:33 ville.syrjala
  2016-10-12 13:27 ` ✗ Fi.CI.BAT: failure for " Patchwork
  2016-10-12 13:55 ` [PATCH] " Chris Wilson
  0 siblings, 2 replies; 3+ messages in thread
From: ville.syrjala @ 2016-10-12 11:33 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

We occasionally depend on eg. to_intel_crtc(NULL) being NULL as
well. Sprinkle in some BUILD_BUG_ON()s to make sure we don't
accidentally change things in a way that would violate this
assumption.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index e4bdd3a6a6e3..724a982bbb05 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -16331,6 +16331,15 @@ void intel_modeset_init(struct drm_device *dev)
 	enum pipe pipe;
 	struct intel_crtc *crtc;
 
+	BUILD_BUG_ON(to_intel_plane(NULL) != NULL);
+	BUILD_BUG_ON(to_intel_crtc(NULL) != NULL);
+	BUILD_BUG_ON(to_intel_encoder(NULL) != NULL);
+	BUILD_BUG_ON(to_intel_connector(NULL) != NULL);
+
+	BUILD_BUG_ON(to_intel_plane_state(NULL) != NULL);
+	BUILD_BUG_ON(to_intel_crtc_state(NULL) != NULL);
+	BUILD_BUG_ON(to_intel_atomic_state(NULL) != NULL);
+
 	drm_mode_config_init(dev);
 
 	dev->mode_config.min_width = 0;
-- 
2.7.4

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

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

* ✗ Fi.CI.BAT: failure for drm/i915: Make sure the base lives at offset 0 of all kms objects
  2016-10-12 11:33 [PATCH] drm/i915: Make sure the base lives at offset 0 of all kms objects ville.syrjala
@ 2016-10-12 13:27 ` Patchwork
  2016-10-12 13:55 ` [PATCH] " Chris Wilson
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2016-10-12 13:27 UTC (permalink / raw)
  To: ville.syrjala; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Make sure the base lives at offset 0 of all kms objects
URL   : https://patchwork.freedesktop.org/series/13640/
State : failure

== Summary ==

Series 13640v1 drm/i915: Make sure the base lives at offset 0 of all kms objects
https://patchwork.freedesktop.org/api/1.0/series/13640/revisions/1/mbox/

Test kms_psr_sink_crc:
        Subgroup psr_basic:
                pass       -> DMESG-WARN (fi-skl-6700hq)
Test vgem_basic:
        Subgroup unload:
                pass       -> SKIP       (fi-kbl-7200u)
                pass       -> SKIP       (fi-bdw-5557u)
Test vgem_reload_basic:
                pass       -> FAIL       (fi-bdw-5557u)

fi-bdw-5557u     total:248  pass:230  dwarn:0   dfail:0   fail:1   skip:17 
fi-bsw-n3050     total:248  pass:205  dwarn:0   dfail:0   fail:0   skip:43 
fi-bxt-t5700     total:248  pass:217  dwarn:0   dfail:0   fail:0   skip:31 
fi-byt-j1900     total:248  pass:213  dwarn:2   dfail:0   fail:1   skip:32 
fi-byt-n2820     total:248  pass:211  dwarn:0   dfail:0   fail:1   skip:36 
fi-hsw-4770      total:248  pass:224  dwarn:0   dfail:0   fail:0   skip:24 
fi-hsw-4770r     total:248  pass:225  dwarn:0   dfail:0   fail:0   skip:23 
fi-ilk-650       total:248  pass:185  dwarn:0   dfail:0   fail:2   skip:61 
fi-ivb-3520m     total:248  pass:222  dwarn:0   dfail:0   fail:0   skip:26 
fi-ivb-3770      total:248  pass:222  dwarn:0   dfail:0   fail:0   skip:26 
fi-kbl-7200u     total:248  pass:222  dwarn:0   dfail:0   fail:0   skip:26 
fi-skl-6260u     total:248  pass:233  dwarn:0   dfail:0   fail:0   skip:15 
fi-skl-6700hq    total:248  pass:224  dwarn:1   dfail:0   fail:0   skip:23 
fi-skl-6700k     total:248  pass:222  dwarn:1   dfail:0   fail:0   skip:25 
fi-skl-6770hq    total:248  pass:231  dwarn:1   dfail:0   fail:1   skip:15 
fi-snb-2520m     total:248  pass:211  dwarn:0   dfail:0   fail:0   skip:37 
fi-snb-2600      total:248  pass:210  dwarn:0   dfail:0   fail:0   skip:38 

Results at /archive/results/CI_IGT_test/Patchwork_2684/

46271d41e30090d7fc996e8f5abde6a59f51038b drm-intel-nightly: 2016y-10m-12d-11h-06m-41s UTC integration manifest
6c56c1c drm/i915: Make sure the base lives at offset 0 of all kms objects

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

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

* Re: [PATCH] drm/i915: Make sure the base lives at offset 0 of all kms objects
  2016-10-12 11:33 [PATCH] drm/i915: Make sure the base lives at offset 0 of all kms objects ville.syrjala
  2016-10-12 13:27 ` ✗ Fi.CI.BAT: failure for " Patchwork
@ 2016-10-12 13:55 ` Chris Wilson
  1 sibling, 0 replies; 3+ messages in thread
From: Chris Wilson @ 2016-10-12 13:55 UTC (permalink / raw)
  To: ville.syrjala; +Cc: intel-gfx

On Wed, Oct 12, 2016 at 02:33:11PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> We occasionally depend on eg. to_intel_crtc(NULL) being NULL as
> well. Sprinkle in some BUILD_BUG_ON()s to make sure we don't
> accidentally change things in a way that would violate this
> assumption.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

bikeshed would be to convert the macros into typechecking inlines and
place the BUILD_BUG_ON there.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2016-10-12 13:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-12 11:33 [PATCH] drm/i915: Make sure the base lives at offset 0 of all kms objects ville.syrjala
2016-10-12 13:27 ` ✗ Fi.CI.BAT: failure for " Patchwork
2016-10-12 13:55 ` [PATCH] " Chris Wilson

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.