aboutsummaryrefslogtreecommitdiffstats
path: root/intel/intel_decode.c
Commit message (Collapse)AuthorAgeFilesLines
* intel: annotate public functionsLucas De Marchi2018-09-191-7/+7
| | | | | | | | | | | | | | | | | | | This was done with: while read sym; do read f func line _ <<<$(cscope -d -L -1 $sym) if [ ! -z "$f" ]; then line=$((line-1)) sed -i "${line}s/^/drm_public /" $f fi done < /tmp/a.txt Then some corner cases were manually fixed. "a.txt" above contains the symbols collected from intel/intel-symbol-check. The idea here will be to switch the default visibility to hidden so we don't export symbols we shouldn't. Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
* intel: get gen once for gen >= 9Lucas De Marchi2018-09-051-6/+2
| | | | | | | | | We don't need to call IS_GEN() for each gen >= 9: we can rather use the new intel_is_genx() helper to iterate the pciids array once. Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
* intel: add support for ICL 11Paulo Zanoni2018-05-011-1/+3
| | | | | | | | | | | | | | | | | Add the PCI IDs and the basic code to enable ICL. This is the current PCI ID list in our documentation. Kernel commit: d55cb4fa2cf0 ("drm/i915/icl: Add the ICL PCI IDs") v2: Michel provided a fix to IS_9XX that was broken by rebase bot. v3: Fix double definition of PCI IDs, update IDs according to bspec and keep them in the same order and rebase (Lucas) Cc: Michel Thierry <michel.thierry@intel.com> Reviewed-by: Michel Thierry <michel.thierry@intel.com> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
* meson,configure: include config.h automaticallyEric Engestrom2018-03-201-4/+0
| | | | | | | | | This will prevent any more missing `#include "config.h"` bug, at the cost of having to recompile some files that didn't need to be when changing build options. Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* intel/gen10: Add missed gen10 stuffBen Widawsky2017-06-301-1/+3
| | | | | | | This got lost on rebase, I believe Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
* intel: avoid null pointer dereferenceThomas Hindoe Paaboel Andersen2017-02-281-1/+2
| | | | | | | Move the dereference after the null check. Fixes: 028715ee707469189505 ("intel: Avoid the need for most overflow checks by using a scratch page.") Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
* intel: Fix spelling mistakesEric Engestrom2016-04-071-1/+1
| | | | | Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* configure.ac: disable annoying warning -Wmissing-field-initializersMarek Olšák2016-01-201-2/+0
| | | | | | | It warns for all "{}" initializers. Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* intel: ignore missing-field-initializers warningsEmil Velikov2015-09-041-0/+3
| | | | | | | We're about to remove the -Wno flag from configure.ac which will lead to a lot of unnecessary spam. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* intel: resolve shadowing warningsEmil Velikov2015-09-041-5/+2
| | | | | | | | v2: keep the bo_gem declaration in exec2() within the loop (Chris) Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by Chris Wilson <chris@chris-wilson.co.uk>
* drm: remove drm_public macroEmil Velikov2015-04-281-7/+7
| | | | | | | | | | | | | | | Some compilers (like the Oracle Studio), require that the function declaration must be annotated with the same visibility attribute as the definition. As annotating functions with drm_public is no longer required just remove the macro. Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Damien Lespiau <damien.lespiau@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Michel Dänzer <michel.daenzer@amd.com> Cc: Rob Clark <robdclark@gmail.com> Cc: Thierry Reding <treding@nvidia.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* drm: rename libdrm{,_macros}.hEmil Velikov2015-04-281-1/+1
| | | | | | Provide a more meaningful name, considering what it does. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* intel/skl: add gen9 to the CS decoding initDamien Lespiau2014-09-301-1/+3
| | | | | | Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
* intel: Use symbol visibility.Maarten Lankhorst2014-08-041-7/+12
| | | | | | | No exports changed for this driver. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* Mark functions printf-like where possibleThierry Reding2014-04-171-5/+2
| | | | | | | | | | These functions all take a format string and either a list of variable arguments or a va_list. Use the new DRM_PRINTFLIKE macro to tell the compiler about it so that the arguments can be checked against the format string. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Thierry Reding <treding@nvidia.com>
* intel/bdw: Add gen8 to the decode initDamien Lespiau2013-11-071-1/+3
| | | | | | | Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
* intel: Add MI_LOAD_REGISTER_MEM to intel_decode.c.Kenneth Graunke2013-10-291-0/+1
| | | | | Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ben Widawsky <benjamin.widawsky@intel.com>
* intel: Add the Gen6+ version of MI_REPORT_PERF_COUNT to intel_decode.c.Kenneth Graunke2013-10-291-0/+1
| | | | | Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ben Widawsky <benjamin.widawsky@intel.com>
* intel-decode: Fix gen6 HIER_DEPTH_BUFFER decodingDaniel Vetter2013-04-041-1/+1
| | | | | | | | | It accidentally used the cmd id for the gen7 command and had an outdated lenght field. Spotted while trying to make sense of an ivb error_state from mesa 7.11 ... Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* intel: fix length mask for Gen5/Gen6 3DSTATE_CLEAR_PARAMSChris Forbes2013-02-061-1/+1
| | | | | | | | On Gen6, bit 15 is now `Depth Clear Value Valid`. This was being treated as part of the length, and failing the rest of the batchbuffer decode. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
* intel: Correct the word decoding for gen2 3DSTATE_LOAD_STATE_IMMEDIATE_1Chris Wilson2012-10-071-1/+1
| | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* intel/decode: fix the reference file forBen Widawsky2012-06-271-2/+2
| | | | | | | | | | | | | | | | | | I mistakenly "fixed" a bad decode with commit 7d0a1d5ebbe2c6aecd96eef94b0af038858a0178 Author: Ben Widawsky <ben@bwidawsk.net> Date: Sun Jun 24 20:35:57 2012 -0700 intel/decode: VERTEX_ELEMENT_STATE, 1 means valid However the actual fix is just to update the reference file, and include GEN7 in the decode. Props to Eric Anholt for putting the test in distcheck, or else I wouldn't have caught this. Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
* Revert "intel/decode: VERTEX_ELEMENT_STATE, 1 means valid"Ben Widawsky2012-06-271-1/+1
| | | | | | This reverts commit 7d0a1d5ebbe2c6aecd96eef94b0af038858a0178. The actual fix
* intel: add decoding of MI_SET_CONTEXTBen Widawsky2012-06-271-1/+17
| | | | | Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* intel/decode: VERTEX_ELEMENT_STATE, 1 means validBen Widawsky2012-06-271-1/+1
| | | | | | The logic seemed to be inverse to me. Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
* intel/decode: add sampler state pointers for [HD]SBen Widawsky2012-06-271-0/+2
| | | | Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
* intel: Add IVB PUSH_CONSTANT decodesBen Widawsky2012-06-241-0/+3
| | | | Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
* intel/decode: decode MI_WAIT_FOR_EVENTDaniel Vetter2012-04-021-2/+75
| | | | | | | ... and add support to decode MI instructions with functions. Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* intel: Add per-dword decode of gen7 3DPRIMITIVE.Eric Anholt2012-03-101-5/+24
|
* intel: Move the gen4-6 3DPRIMITIVE handling out of the switch statement.Eric Anholt2012-03-101-15/+17
|
* intel: Add decode for gen7 HIER_DEPTH_BUFFER.Eric Anholt2012-02-221-1/+13
| | | | | | | | Note that the regression test complains here: The batch that was captured included a bug in its packet output, which was later fixed in Mesa. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* intel: Add decode for gen7 3DSTATE_WM.Eric Anholt2012-02-221-42/+136
| | | | | | | | | This requires pulling the gen6 3DSTATE_WM out to a function so it doesn't override gen7's handler. v2: Fix pasteo in interpreting ZW interpolation (thanks danvet!). Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* intel: Fix a typo in decode error message.Eric Anholt2012-02-221-1/+1
| | | | Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* intel: Add minimal decode for remaining gen7 packets in use.Eric Anholt2012-01-271-1/+36
| | | | | | This just gets packet name and length in place, with the remainder unfinished. I've long since finished the work that got me started fixing up the decode.
* intel: Add decode for gen7 constant buffer packets.Eric Anholt2012-01-271-3/+59
|
* intel: Add decode for gen7 state pointers.Eric Anholt2012-01-271-9/+71
| | | | | | Since CC_STATE_POINTERS for gen6 and 7 are quite different but use the same opcode, move gen6 out to a helper function too, so we can use a helper function for gen7.
* intel: Add support for parsing gen7 URB packets.Eric Anholt2012-01-271-0/+44
|
* intel: Make most of the logic for 965 3d packet length checks table-driven.Eric Anholt2012-01-271-46/+9
| | | | | | | | | This puts the error message in a consistent location relative to the packet, and while I'm here I made the error message a bit more informative. Now, most static length packets need to just declare their length in the table and not worry.
* intel: Move the logic for getting 965 3d packet length to the packet table.Eric Anholt2012-01-271-83/+73
| | | | While I'm touching every line of the table, sort it by opcode.
* intel: Add support for parsing 965 3d packets using helper functions.Eric Anholt2012-01-271-1/+7
| | | | | I want to add packets, without contributing to the switch statement of doom.
* intel: Parse the correct length for gen7 3DSTATE_MULTISAMPLE.Eric Anholt2012-01-271-1/+2
|
* intel: Put the "gen" shorthand chipset identifier in the context.Eric Anholt2012-01-271-0/+28
| | | | | It's a lot nicer than using IS_WHATEVER(devid) all over the place, and we have this in our other projects too.
* intel: Avoid the need for most overflow checks by using a scratch page.Eric Anholt2012-01-271-141/+24
| | | | | | | | | | | | | The overflow checks were all thoroughly untested, and a bunch of the ones I'm deleting were pretty broken. Now, in the case of overflow, you just decode data of 0xd0d0d0d0, and instr_out prints the warning message instead. Note that this still has the same issue of being under-tested, but at least it's one place instead of per-packet. A couple of BUFFER_FAIL uses are left where the length to be decoded could be (significantly) larger than a page, and the decode didn't just call instr_out (which doesn't dereference data itself unless it's safe).
* intel: Make instr_out take the decode context.Eric Anholt2012-01-271-390/+377
| | | | This reduces some of the extra derefs of the pointers.
* intel: Use the context to simplify BR01 decode.Eric Anholt2012-01-271-12/+14
| | | | Similar to BR00, count was always 1 and was always an index, not a count.
* intel: Use the context to simplify BR00 decode.Eric Anholt2012-01-271-12/+11
| | | | The count (actually index) was always 0, because BR00 is dword 0.
* intel: Plumb the context through the decode callchain.Eric Anholt2012-01-271-26/+44
| | | | | We still deref the context at the start of every call, but that will change next.
* intel: Drop the code for counting parsing failures.Eric Anholt2012-01-271-50/+24
| | | | | Nothing was consuming it. If something wants this in the future, would be done using the decode context anyway.
* intel: Track the current packet location in the decode context.Eric Anholt2012-01-271-26/+43
| | | | | This is the start of plumbing the context through the decode callchain instead of the current 4 arguments.
* intel: Add an interface for setting the output file for decode.Eric Anholt2012-01-041-2/+12
| | | | | | | Consumers often want to choose stdout vs stderr, and for testing I want to output to an open_memstream file. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>