summaryrefslogtreecommitdiff
path: root/src/r600_textured_videofuncs.c
AgeCommit message (Collapse)Author
2018-07-09Add struct radeon_bufferMichel Dänzer
Inspired by amdgpu, preparation for the following change. For now, this is mostly a wrapper around struct radeon_bo, no functional change intended. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2013-01-03video: add option to include disabled CRTCs in best CRTC searchIlija Hadzic
This patch adds an option called consider_disabled to radeon_pick_best_crtc function. If this option is set and searching for best-fit CRTC yields nothing, the search will be widened to include CRTCs in DPMS "off" state. The new option is not used yet; it will be in the patches to follow. v2: Do not look at the CRTC mode, we only care about its box. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2012-12-11Remove dead code flagged by gcc -Wunused-but-set-variable.Michel Dänzer
Reviewed-by: Alex Deucher <aleander.deucher@amd.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2012-06-15radeon: drop offset member of r600 accel objectDave Airlie
This is always 0 now. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-06-15radeon: drop all UMS/DRI1/XAA/overlay support.Dave Airlie
This overhauls the radeon driver and removes all the old UMS-only code, it drops all the UMS, DRI1, XAA, overlay Xv, video capture, tv tuners There are probably a lot more cleanups that will fall out of this afterwards. So far this is compile/build tested. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-11radeon: use GB_GR and BG_RG formats for packed yuv video for r600+Roland Scheidegger
Those formats were invented for exactly that purpose so use them. This saves some code and also some hw resources (only need one sampler instead of two for packed yuv). Only tested on EG.
2012-02-20radeon: avoid rounding errors in texture coords for textured xvRoland Scheidegger
make sure the division is done with floats, otherwise the coordinate can be wrong up to 1 texel. Particularly visible with clipping and small source scaled up (since one texel can be a shift of several pixels) but could be seen even unscaled. Should provide more accurate coords without clipping too depending on the scale factor probably. Changed for r100-r600, though only tested on r300.
2012-02-08Fix UMS build failure.Michel Dänzer
And some UMS specific warnings. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2012-02-07radeon: fix tiling for weird resolutionJerome Glisse
Should also fix xv for some case. Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2012-02-06r600-evergreen: use common surface allocator for tiling v11Jerome Glisse
Use libdrm common surface code so mesa,ddx have same idea about tiling surface and what their pitch should be and the alignment constraint. v2 fix remaining issue add new option to conditionaly enable v3 fix fbcon copy and r600 exa copy path v4 fix non tiled path 2D tiling on GPU >= R600, set it to false as default v5 adapt to pixel/element size split of libdrm/radeon v6 update to properly handle falling back to 1d tiled v6 final fix to tile split value on evergreen and newer v7 fix default array mode on r6xx, fix height alignment issue on evergreen v8 fix tile split value v9 add stencil tile split support, simplify dri2 for stencil with evergreen v10 Try to fix xv path regarding tiling. Adapt to libdrm API change. Try to fix case where there is no surface which means non tiled bo. v11 check for proper libdrm Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2011-04-20EXA/Xv: used cached bo tiling flags for accel setup on 6xx+Alex Deucher
This avoids calling into the kernel for each bo in the accel code. This is a follow on to: cc7d1fa39da40a532fcdbe6c7924ca47a879e66a Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-02-11kms: 6xx/7xx big endian accel supportCédric Cano
agd5f: minor cleanups Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-02-11Xv: fix textured video alignment harderAlex Deucher
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-02-106xx+: switch to linear aligned rather than linear generalAlex Deucher
linear aligned is supposedly more performant, but more importantly, linear general only works on the CB without slices. The texture blocks technically don't support linear general although, I think linear general gets upgraded to linear aligned in the hw which is why it currently works. Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-02-106xx/7xx: consolidate spi setupAlex Deucher
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-02-106xx/7xx: consolidate remaining CB stateAlex Deucher
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-01-20r6xx/7xx: fix Xv artifactsMarton Balint
bad textures size for cache flushes. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=22007
2010-08-23radeon: move vbo data to a separate structAlex Deucher
this way we can share the vbo code with const buffers
2010-08-20Add initial EXA and Xv support for evergreenAlex Deucher
Based on the r6xx/r7xx code updated for evergreen. Still causes GPU hangs in some cases. We haven't tracked down why yet. Might be related to constant buffer persistence. Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2010-08-02r6xx/r7xx: move syrface sync emit to the functions that emit surface infoAlex Deucher
reduces code duplication.
2010-08-01radeon/r600: restructure exa + vbo to provide more sharingDave Airlie
This is a precursor for r300/500 vbo support. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-07-21r6xx/r7xx: group op variable stateAlex Deucher
Group the op variable state into one emit block, re-order to reduce dwords emitted.
2010-04-01r600/exa: further cleanup, use the object struct in the accel state.Dave Airlie
This cleans up the accel state objects as well. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-01r600: reduce function call overhead.Dave Airlie
Create a small accel object that can be used to reduce the amount of parameters passed to SetAccelState. This can be cleaned up a lot more. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-03-23r6xx+ EXA/Xv: add a R600SetAccelState functionAlex Deucher
This moves CS bo checking and alignment checks into a central location. It also cleans up the code.
2010-03-22r6xx EXA/Xv: track src/dst domainsAlex Deucher
Much of the code is shared, so track the src/dst domains so we make sure the uses consistent domains for each bo.
2010-03-15r6xx/r7xx: fix domain handling in accel codeAlex Deucher
Noticed by Pauli and Michel on IRC. Improves GetImage performace by a factor of ~10.
2010-02-26Use RADEON_ALIGN instead of open coding it.Matt Turner
Also fix some RADEON_ALIGN(x, 63), which would return incorrect results for odd x. Though this shouldn't happen, it's still not right. You wouldn't ever write (x + 62) & ~62 which is clearly wrong (and what it expands to). CC: Jerome Glisse <jglisse@redhat.com> CC: Alex Deucher <alexdeucher@gmail.com> CC: Dave Airlie <airlied@redhat.com> Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-02-12radeon: consolidate crtc selector for vline waitAlex Deucher
Use the Xv version as it takes into account the area covered by the op rather than just picking the largest crtc area.
2009-12-01r600: fix multi-operation in single batch support.Dave Airlie
This ports the mesa DMA buffer handling with the 3 lists, Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-27r600/accel: cleanup and merge a lot of the accel functionsDave Airlie
All of the drawing ops were the exact same modulo the vtx size, this along with the vertex buffer wrapping code could all be consolidated into a smaller set of functions. This also adds 2 VBO which we switch between, and merges a #define to enable the multiple operations in one CS under KMS mode. Multi-operation still isn't working though. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-25r600/xv: drop inited 3d false in xv codeDave Airlie
2009-11-25r600: fixup problems with EXA operation reset for multiple opsDave Airlie
To put multiple ops into one CS, you can't just discard the whole IB. This add supports for reset the CS cdw to the correct place after an op discards. Still doesn't enable the final accel bits.
2009-11-25radeon: fix check for no work in operationDave Airlie
2009-11-25r600: refactor code to help future acceleration speedups.Dave Airlie
This changes the vertex buffer index to be an offset, and records the start of the vb for each operation and uses that to set the operations up. This still flushes after each operation to make sure we have no regressions in non-kms/kms cases. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-13radeon: add XV_CRTC attribute for textured videoAlex Deucher
This attribute allows the user to override which crtc is synced with when XV_VSYNC is enabled. This is useful for clone modes where the user can might want to override the default.
2009-10-09r600 EXA: fix up mask reg mixupAlex Deucher
2009-10-03KMS: Double-buffer textured video source image upload.Michel Dänzer
In order to avoid stalling on previous frame. OTOH without KMS we can't do this but have to wait for the previous frame to finish rendering.
2009-09-25radeon: fix vline handling for kmsAlex Deucher
drm crtc ids do not correspond to actual hw crtcs, as such the vline stuff was never enabled for Xv. Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2009-09-26r600: fix buildDave Airlie
2009-09-26r600/xv: fix dst bo write domainDave Airlie
2009-09-25r600: fix bo accounting for XvAlex Deucher
fixes Xv after changes in: 8f80e37eed3ec028718b4e71bbb9b598847fd94e Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2009-08-26r6xx/r7xx: more WIPAlex Deucher
2009-08-25r6xx/r7xx: fix some define problems in Xv codeAlex Deucher
2009-08-25R6xx/r7xx: unmap vb bo when doneAlex Deucher
2009-08-25r6xx/r7xx: more cs exa wipAlex Deucher
2009-08-25r6xx/r7xx: first pass at kms accel supportAlex Deucher
Adapted from various patches from Dave and Jerome.
2009-08-25R6xx/r7xx: add begin/end batch macrosAlex Deucher
2009-08-25r6xx/r7xx: move more common state to default state setupAlex Deucher
2009-08-11radeon/r600: abstract vertex buffer for r600 & r700 hardwareJerome Glisse
Abstract vertex buffer, preliminary work before others change to bring cs support along IB support.