aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_cmd_parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/i915_cmd_parser.c')
-rw-r--r--drivers/gpu/drm/i915/i915_cmd_parser.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/gpu/drm/i915/i915_cmd_parser.c b/drivers/gpu/drm/i915/i915_cmd_parser.c
index 8ba932b22f7c..b11629beeb63 100644
--- a/drivers/gpu/drm/i915/i915_cmd_parser.c
+++ b/drivers/gpu/drm/i915/i915_cmd_parser.c
@@ -798,22 +798,15 @@ struct cmd_node {
798 */ 798 */
799static inline u32 cmd_header_key(u32 x) 799static inline u32 cmd_header_key(u32 x)
800{ 800{
801 u32 shift;
802
803 switch (x >> INSTR_CLIENT_SHIFT) { 801 switch (x >> INSTR_CLIENT_SHIFT) {
804 default: 802 default:
805 case INSTR_MI_CLIENT: 803 case INSTR_MI_CLIENT:
806 shift = STD_MI_OPCODE_SHIFT; 804 return x >> STD_MI_OPCODE_SHIFT;
807 break;
808 case INSTR_RC_CLIENT: 805 case INSTR_RC_CLIENT:
809 shift = STD_3D_OPCODE_SHIFT; 806 return x >> STD_3D_OPCODE_SHIFT;
810 break;
811 case INSTR_BC_CLIENT: 807 case INSTR_BC_CLIENT:
812 shift = STD_2D_OPCODE_SHIFT; 808 return x >> STD_2D_OPCODE_SHIFT;
813 break;
814 } 809 }
815
816 return x >> shift;
817} 810}
818 811
819static int init_hash_table(struct intel_engine_cs *engine, 812static int init_hash_table(struct intel_engine_cs *engine,