summaryrefslogtreecommitdiff
path: root/lib/rendercopy_gen7.c
AgeCommit message (Collapse)Author
2019-04-29lib/rendercopy: Configure MOCS more consistentlyVille Syrjälä
Unify the MOCS to be more consistently across the platforms. Currently gen8+ are specifyig UC whereas earlier platforms generally use PTE. Let's make everyone more or less specify L3+PTE. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-04-29lib/rendercopy: Add fp16 support for gen4+Ville Syrjälä
Allow copying between fp16 surfaces. We'll use the FLOAT surface format since that's all the display supports currently. Hopefully the hardware gives us a 1:1 copy, at least if the input doesn't contain crazy infs/nans etc. We could choose UNORM instead but that won't work for eventually exposing fp16+ccs. Although we do need to replace the simple bpp value with a more specific format type to get 10bpc+ccs working as well. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-04-04lib/rendercopy: Assert that buffer dimensions/stride are acceptableVille Syrjälä
Sprinkle some asserts into rendercopy to make sure we don't try to exceed the render engine surface size/stride limitations. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-11-20lib/rendercopy: Implement support for 8/16 bppMaarten Lankhorst
To handle drawing 16 bpp formats correctly with odd x/w, we need to use the correct bpp to rendercopy. Now that everything sets bpp in igt_buf, fix the rendercopy support to use it and set the correct format. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> [mlankhorst: Add assert(src->bpp == dst->bpp)]
2018-07-18lib/rendercopy: Use gen4 definitions if applicableLukasz Kalamarz
Instead of using definitions duplicated in gen7_render header, we should use the oldest definition that is working with chosen gen. This patch reuse gen6 definitons if registers/fields/shifts that were introduced in other genX_render headers. v3: Rebase and checkpatch Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
2018-07-05lib: Constify igt_bufVille Syrjälä
No one generally needs to modify the igt_bufs we pass around, so make them const. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-07-03lib/rendercopy: Simplify reloc offsetsVille Syrjälä
Remove the hardcoded dword offsets for the relocs and instead rely fully on intel_batchbuffer_subdata_offset(). Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-06-14lib/rendercopy: Use gen6 definitions if applicableLukasz Kalamarz
Instead of using definitions duplicated in gen7_render header, we should use the oldest definition that is working with chosen gen. This patch reuses gen6 definitons if registers/fields/shifts that were reintroduced in other genX_render headers. v2: Fixed commit message v3: fixed typos in commit msg Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Ewelina Musial <ewelina.musial@intel.com> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
2018-06-05lib: Rename all surfaceformat calls in libsLukasz Kalamarz
This patch is renaming all surfaceformat registers to use names introduced in surfaceformat.h instead of using per gen definitions v2: Drop GEN_ from register names. Applied that to other libs. Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
2018-04-24lib/intel_batchbuffer: Move batch functions from media/render/gpgpu libsKalamarz, Lukasz
Batch functions were copy/pasted across several libs. With moving it into intel_batchbuffer lib test can now be easly maintained without worrying that we forgot to modify older version of lib. v2: Added documentation into lib and rebased patch v3: Fixed typos and rebased patch v4: Fixed documentation issues v5: Rename, clean up of leftovers from previous version and documentation polishing v6: Fixing assert Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
2018-04-24lib/rendercopy_gen7: Cosmetic changes in codeKalamarz, Lukasz
This patch apply coding standard into rendercopy_gen7 library. No functional changes were made. v5: Fixed wrong indent Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
2018-04-24lib/rendercopy_gen7: Reorganizing batch allocationsKalamarz, Lukasz
This lib was written in a different manner than all other libs, which was causing some issues during refactoring. Previous implementation was using two pointers (ptr and state) to access two parts of batchbuffer in the same time. Current implementation is reusing ptr with a downside of needing to ensure the state/command ordering is proper. v3: Modified commit message and added batch boundary check v5: Rebase Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
2014-08-26lib/rendercopy*: Use igt_assertDaniel Vetter
2014-07-23tests: remove unused getopt header includesThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-04-24tests: Extract ALIGN macro into a common headerTvrtko Ursulin
Makes for a little bit less code duplication, especially since it will be used from more callers in the future. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Brad Volkin <bradley.d.volkin@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-04-02lib/rendercopy: fix alloc len for gen7_bind_bufMika Kuoppala
Fortunately saved by the alignment. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2014-03-22lib: rename intel_gpu_tools.h to intel_io.hDaniel Vetter
With the header cleanup we can now give this header a suitable name, since it now really only contains register access and other I/O functions and assorted definitions. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: unnecessary header removal for drmtest.h, part 1Daniel Vetter
Brought a few missing headers to light in ioctl_wrappers.h, too. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: remove uncessary #includes from headersDaniel Vetter
Only include what the header itself needs. The big fish here is intel-gpu-tools.h. More will follow. One ugly thing removed here is the duplicated GEN6_TD_CTL #define, one of which was broken. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib/intel_batchbuffer: igt_ namespace for the buffer structureDaniel Vetter
Step one to properly namespace the rendercpy/mediafill functions. Als give the buf_height/width helpers a proper igt_ prefix. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: make rendercopy.h an internal headerDaniel Vetter
And move the public interfaces into intel_batchbuffer.[hc]. A bit messy since we are fairly inconsistent with our header #include handling. Also exclude rendercopy.h from the documentation. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-27rendercopy: Pass context to rendercopy functionsVille Syrjälä
rendercopy does the batch buffer flush internally, so if we want to use it with multiple contexts, we need to pass the context in from caller. v2: Modify rendercopy_gen8 as well Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2012-12-06Implement a working gen7 rendercopyChris Wilson
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57825 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-06-30rendercopy_gen7: add support for haswellBen Widawsky
Only compile tested. Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-06-28lib: add a gen7 rendercopyBen Widawsky
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>