drm/i915: kick out cmd_parser specific structs from i915_drv.h
Subsystems (2)
PATCH 1/1 drm/i915: kick out cmd_parser specific structs from i915_drv.h
No sense in keeping the cmd_descriptor and cmd_table structs in i915_drv.h, now that they are no longer referenced externally.
--- drivers/gpu/drm/i915/i915_cmd_parser.c | 96 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_drv.h | 96 ---------------------------------- 2 files changed, 96 insertions(+), 96 deletions(-)
drivers/gpu/drm/i915/i915_cmd_parser.c +96 -0
@@ -86,6 +86,102 @@* general bitmasking mechanism. */ +/* +* A command that requires special handling by the command parser. +*/ +struct drm_i915_cmd_descriptor { +/* +* Flags describing how the command parser processes the command. +* +* CMD_DESC_FIXED: The command has a fixed length if this is set, +* a length mask if not set +* CMD_DESC_SKIP: The command is allowed but does not follow the +* standard length encoding for the opcode range in +* which it falls +* CMD_DESC_REJECT: The command is never allowed +* CMD_DESC_REGISTER: The command should be checked against the +* register whitelist for the appropriate ring +* CMD_DESC_MASTER: The command is allowed if the submitting process +* is the DRM master +*/ +u32 flags; +#define CMD_DESC_FIXED (1<<0) +#define CMD_DESC_SKIP (1<<1) +#define CMD_DESC_REJECT (1<<2) +#define CMD_DESC_REGISTER (1<<3) +#define CMD_DESC_BITMASK (1<<4) +#define CMD_DESC_MASTER (1<<5) + +/* +* The command's unique identification bits and the bitmask to get them. +* This isn't strictly the opcode field as defined in the spec and may +* also include type, subtype, and/or subop fields. +*/ +struct { +u32 value; +u32 mask; + } cmd; + +/* +* The command's length. The command is either fixed length (i.e. does +* not include a length field) or has a length field mask. The flag +* CMD_DESC_FIXED indicates a fixed length. Otherwise, the command has +* a length mask. All command entries in a command table must include +* length information. +*/ +union { +u32 fixed; +u32 mask; + } length; + +/* +* Describes where to find a register address in the command to check +* against the ring's register whitelist. Only valid if flags has the +* CMD_DESC_REGISTER bit set. +* +* A non-zero step value implies that the command may access multiple +* registers in sequence (e.g. LRI), in that case step gives the +* distance in dwords between individual offset fields. +*/ +struct { +u32 offset; +u32 mask; +u32 step; + } reg; + +#define MAX_CMD_DESC_BITMASKS 3 +/* +* Describes command checks where a particular dword is masked and +* compared against an expected value. If the command does not match +* the expected value, the parser rejects it. Only valid if flags has +* the CMD_DESC_BITMASK bit set. Only entries where mask is non-zero +* are valid. +* +* If the check specifies a non-zero condition_mask then the parser +* only performs the check when the bits specified by condition_mask +* are non-zero. +*/ +struct { +u32 offset; +u32 mask; +u32 expected; +u32 condition_offset; +u32 condition_mask; + } bits[MAX_CMD_DESC_BITMASKS ]; +}; + +/* +* A table of commands requiring special handling by the command parser. +* +* Each engine has an array of tables. Each table consists of an array of +* command descriptors, which must be sorted with command opcodes in +* ascending order. +*/ +struct drm_i915_cmd_table { +const struct drm_i915_cmd_descriptor *table; +int count; +}; +#define STD_MI_OPCODE_SHIFT (32 - 9)#define STD_3D_OPCODE_SHIFT (32 - 16)#define STD_2D_OPCODE_SHIFT (32 - 10)
drivers/gpu/drm/i915/i915_drv.h +0 -96
102 lines not on this page · raw message
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915: kick out cmd_parser specific structs from i915_drv.h
== Series Details ==
== Series Details ==
Series: drm/i915: kick out cmd_parser specific structs from i915_drv.h
URL : https://patchwork.freedesktop.org/series/15854/
State : success
== Summary ==
Series 15854v1 drm/i915: kick out cmd_parser specific structs from i915_drv.h
https://patchwork.freedesktop.org/api/1.0/series/15854/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-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-skl-6700k total:244 pass:222 dwarn:1 dfail:0 fail:0 skip:21 fi-skl-6770hq total:244 pass:230 dwarn:0 dfail:0 fail:0 skip:14 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
a08f9fc55a649334a2788a804904d920f8b2fda2 drm-intel-nightly: 2016y-11m-23d-20h-25m-10s UTC integration manifest 1e81a81 drm/i915: kick out cmd_parser specific structs from i915_drv.h
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3098/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Joonas Lahtinen
maintainerRe: ✓ Fi.CI.BAT: success for drm/i915: kick out cmd_parser specific structs from i915_drv.h
Quoted 6 lines · Patchwork
== Series Details ==
Series: drm/i915: kick out
cmd_parserspecific structs fromi915_drv.h
URL : https://patchwork.freedesktop.org/series/15854/
State : success
Reviewed and merged, thanks for the patch. Chris acked this in IRC.
Regards, Joonas
Signature · 7 lines
Joonas Lahtinen Open Source Technology Center Intel Corporation _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 5 lines · Matthew Auld
No sense in keeping the
cmd_descriptorandcmd_tablestructs ini915_drv.h, now that they are no longer referenced externally.Cc Chris Wilson <[email protected]>Signed-off-by Matthew Auld <[email protected]>
Looks good, just what i915_drv.h needs.
Regards, Joonas
Signature · 7 lines
Joonas Lahtinen Open Source Technology Center Intel Corporation _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx