drm/i915: cleanup use of INSTR_CLIENT_MASK
Subsystems (2)
PATCH 1/1 drm/i915: cleanup use of INSTR_CLIENT_MASK
Doing cmd_header >> 29 to extract our 3-bit client value where we know cmd_header is a u32 shouldn't then also require the use of a mask. So remove the redundant operation and get rid of INSTR_CLIENT_MASK now that there are no longer any users.
--- drivers/gpu/drm/i915/i915_cmd_parser.c | 6 +++--- drivers/gpu/drm/i915/i915_reg.h | 1 - 2 files changed, 3 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/i915_cmd_parser.c +3 -3
@@ -559,7 +559,7 @@ static const struct drm_i915_reg_table hsw_blt_reg_tables[] = {static u32 gen7_render_get_cmd_length_mask (u32 cmd_header) { -u32 client = (cmd_header &INSTR_CLIENT_MASK ) >>INSTR_CLIENT_SHIFT ; +u32 client = cmd_header >>INSTR_CLIENT_SHIFT ;u32 subclient = (cmd_header &INSTR_SUBCLIENT_MASK ) >>INSTR_SUBCLIENT_SHIFT ;
@@ -578,7 +578,7 @@ static u32 gen7_render_get_cmd_length_mask(u32 cmd_header)static u32 gen7_bsd_get_cmd_length_mask (u32 cmd_header) { -u32 client = (cmd_header &INSTR_CLIENT_MASK ) >>INSTR_CLIENT_SHIFT ; +u32 client = cmd_header >>INSTR_CLIENT_SHIFT ;u32 subclient = (cmd_header &INSTR_SUBCLIENT_MASK ) >>INSTR_SUBCLIENT_SHIFT ;u32 op = (cmd_header &INSTR_26_TO_24_MASK ) >>INSTR_26_TO_24_SHIFT ;
@@ -601,7 +601,7 @@ static u32 gen7_bsd_get_cmd_length_mask(u32 cmd_header)static u32 gen7_blt_get_cmd_length_mask (u32 cmd_header) { -u32 client = (cmd_header &INSTR_CLIENT_MASK ) >>INSTR_CLIENT_SHIFT ; +u32 client = cmd_header >>INSTR_CLIENT_SHIFT ;if (client ==INSTR_MI_CLIENT )return 0x3F ;
drivers/gpu/drm/i915/i915_reg.h +0 -1
@@ -294,7 +294,6 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg)* Instruction field definitions used by the command parser */ #define INSTR_CLIENT_SHIFT 29 -#define INSTR_CLIENT_MASK 0xE0000000#define INSTR_MI_CLIENT 0x0#define INSTR_BC_CLIENT 0x2#define INSTR_RC_CLIENT 0x3
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 7 lines · Matthew Auld
Doing
cmd_header>> 29 to extract our 3-bit client value where we knowcmd_headeris a u32 shouldn't then also require the use of a mask. So remove the redundant operation and get rid ofINSTR_CLIENT_MASKnow that there are no longer any users.Cc Chris Wilson <[email protected]>Signed-off-by Matthew Auld <[email protected]>
-Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915: cleanup use of INSTR_CLIENT_MASK
In reply to Matthew Auld== Series Details ==
== Series Details ==
Series: drm/i915: cleanup use of INSTR_CLIENT_MASK
URL : https://patchwork.freedesktop.org/series/15306/
State : success
== Summary ==
Series 15306v1 drm/i915: cleanup use of INSTR_CLIENT_MASK
https://patchwork.freedesktop.org/api/1.0/series/15306/revisions/1/mbox/
fi-bdw-5557u total:244 pass:229 dwarn:0 dfail:0 fail:0 skip:15 fi-bsw-n3050 total:244 pass:204 dwarn:0 dfail:0 fail:0 skip:40 fi-bxt-t5700 total:244 pass:216 dwarn:0 dfail:0 fail:0 skip:28 fi-byt-j1900 total:244 pass:216 dwarn:0 dfail:0 fail:0 skip:28 fi-byt-n2820 total:244 pass:212 dwarn:0 dfail:0 fail:0 skip:32 fi-hsw-4770 total:244 pass:224 dwarn:0 dfail:0 fail:0 skip:20 fi-hsw-4770r total:244 pass:224 dwarn:0 dfail:0 fail:0 skip:20 fi-ilk-650 total:244 pass:191 dwarn:0 dfail:0 fail:0 skip:53 fi-ivb-3520m total:244 pass:222 dwarn:0 dfail:0 fail:0 skip:22 fi-ivb-3770 total:244 pass:222 dwarn:0 dfail:0 fail:0 skip:22 fi-kbl-7200u total:244 pass:222 dwarn:0 dfail:0 fail:0 skip:22 fi-skl-6260u total:244 pass:230 dwarn:0 dfail:0 fail:0 skip:14 fi-skl-6700hq total:244 pass:223 dwarn:0 dfail:0 fail:0 skip:21 fi-snb-2520m total:244 pass:212 dwarn:0 dfail:0 fail:0 skip:32 fi-snb-2600 total:244 pass:211 dwarn:0 dfail:0 fail:0 skip:33
2f21978cfd8984c79e4cbd77ce63d9f73fe226ef drm-intel-nightly: 2016y-11m-14d-21h-23m-10s UTC integration manifest ee0d578 drm/i915: cleanup use of INSTR_CLIENT_MASK
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_2991/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx