projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6af5d67
)
drm/i915: Add a default case in gen7 hwsp switch-case
author
Michel Thierry
<
[email protected]
>
Wed, 30 Aug 2017 18:01:15 +0000
(11:01 -0700)
committer
Chris Wilson
<
[email protected]
>
Fri, 8 Sep 2017 19:07:06 +0000
(20:07 +0100)
Gen7 won't get any new engines, and we already added VCS2 there to just
silence gcc's not handled in switch warnings.
Use a default case instead, otherwise we will need to keep adding extra
cases if changes happen in the future.
v2: Since reaching the default case is impossible, use GEM_BUG_ON (Chris).
Cc: Chris Wilson <
[email protected]
>
Signed-off-by: Michel Thierry <
[email protected]
>
Link:
https://patchwork.freedesktop.org/patch/msgid/
[email protected]
Reviewed-by: Chris Wilson <
[email protected]
>
Signed-off-by: Chris Wilson <
[email protected]
>
drivers/gpu/drm/i915/intel_ringbuffer.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/i915/intel_ringbuffer.c
b/drivers/gpu/drm/i915/intel_ringbuffer.c
index cdf084ef5aaeaf5e575d6e607577c2af03b01ab2..268342433a8e55b48e80d8eaf13d34f29e62391c 100644
(file)
--- a/
drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/
drivers/gpu/drm/i915/intel_ringbuffer.c
@@
-402,17
+402,18
@@
static void intel_ring_setup_status_page(struct intel_engine_cs *engine)
*/
if (IS_GEN7(dev_priv)) {
switch (engine->id) {
+ /*
+ * No more rings exist on Gen7. Default case is only to shut up
+ * gcc switch check warning.
+ */
+ default:
+ GEM_BUG_ON(engine->id);
case RCS:
mmio = RENDER_HWS_PGA_GEN7;
break;
case BCS:
mmio = BLT_HWS_PGA_GEN7;
break;
- /*
- * VCS2 actually doesn't exist on Gen7. Only shut up
- * gcc switch check warning
- */
- case VCS2:
case VCS:
mmio = BSD_HWS_PGA_GEN7;
break;