drm/i915: Add missing ring_mask to Pineview
authorChris Wilson <[email protected]>
Thu, 28 Jul 2016 23:45:35 +0000 (00:45 +0100)
committerChris Wilson <[email protected]>
Fri, 29 Jul 2016 15:22:42 +0000 (16:22 +0100)
commit6ce213575cf37c50667850b4372272b4f1660b51
tree5bc7dc6afc7b247d9b944ad1321c84e0a79d396a
parent5b249600c1483976b0a7501ba25a8ba8b86672e1
drm/i915: Add missing ring_mask to Pineview

It appears that we never told Pineview it has a RENDER_RING. This was
all fine until we started using the ring_mask for determining all the
available rings to initialise for legacy ringbuffer submission in commit
88d2ba2e95c8 ("drm/i915: Unify engine init loop"). Though really it is a
latent bug since the ring_mask inception in commit 73ae478cdf6a
("drm/i915: Replace has_bsd/blt/vebox with a mask").

To prevent similar mishaps in future, add a WARN_ON() if we find
ourselves with a device without any rings.

Fixes: 73ae478cdf6a ("drm/i915: Replace has_bsd/blt/vebox with a mask")
Fixes: 88d2ba2e95c8 ("drm/i915: Unify engine init loop")
Signed-off-by: Chris Wilson <[email protected]>
Cc: Tvrtko Ursulin <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Ben Widawsky <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Joonas Lahtinen <[email protected]>
Cc: [email protected]
drivers/gpu/drm/i915/i915_pci.c
drivers/gpu/drm/i915/intel_engine_cs.c