Commit Graph

1959 Commits

Author SHA1 Message Date
Veerabadhran Gopalakrishnan 6e6b432df2 radeon/vcn: Add FW header flag to enable VP9 header parsing
set flags to enable VP9 uncompressed header parsing in FW and extract
quantization and loop filter parameters.

Signed-off-by: Veerabadhran Gopalakrishnan <veerabadhran.gopalakrishnan@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12703>
2021-09-07 13:59:50 +00:00
Leo Liu f4b61e9061 radeon/vcn: add a handling of error for incorrect reference lists
Use the first dpb buffer instead of the NULL pointer sent to hardware.

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12610>
2021-08-31 15:43:21 +00:00
Leo Liu 6a0cadd8ec radeon/vcn: reuse the dpb buffers when with the same size.
To avoid allocate/deallocate frequently.

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12610>
2021-08-31 15:43:21 +00:00
Boyuan Zhang 4081516b3e radeon/vcn: set min value for num_temporal_layers
Fixes: 51935d59

In the case where num_temporal_layers is not set (0), set it using the
minimum value 1, otherwise the rate control settings will be missing.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12463>
2021-08-19 14:25:09 +00:00
Boyuan Zhang 35c3f5f08b radeon/vcn: check frame size change for vp9 header flags
Beside show_frame and error_resilient_mode, also need to check if frame size
changes. FRAME_HDR_INFO_VP9_USE_PREV_IN_FIND_MV_REFS flag should be OFF if
frame size changes.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Acked-by: Veerabadhran Gopalakrishnan <veerabadhran.gopalakrishnan@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12368>
2021-08-18 19:13:33 +00:00
Boyuan Zhang 0b6f8588a2 radeon/vcn: track width and height of the last frame
Adding last width/height to keep tracking the size of the last frame.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Acked-by: Veerabadhran Gopalakrishnan <veerabadhran.gopalakrishnan@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12368>
2021-08-18 19:13:33 +00:00
Boyuan Zhang 912d78d4f2 radeon/vcn: initilize num_temporal_layers for hevc
Fixes: 51935d59

num_temporal_layers has not been initialized for hevc, which will cause hevc
encode failure.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12434>
2021-08-18 18:06:21 +00:00
Leo Liu ef0bfe2459 radeon/vcn: Enable the AV1 decode p010 mode
It will still support 8 bits dithering mode decode.

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12307>
2021-08-13 09:24:01 -04:00
Thong Thai 687bbe2270 radeon/vcn/enc: change to per-temporal layer rate control
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11850>
2021-07-26 15:06:13 -04:00
Thong Thai 65ad80f1d8 radeon/vce: change rate ctrl struct to array
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11850>
2021-07-26 15:06:09 -04:00
Thong Thai 51935d594e radeon/vcn/enc: H.264 SVC encode
Implement H.264 temporal, Scalable Video Coding (SVC) for VCN devices by
sending the required parameters to the firmware, and creating H.264 NALU
prefix and SEI scalability_info headers.

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11850>
2021-07-26 15:05:43 -04:00
SureshGuttula 52602452ab radeon/vcn: calc_dpb_size should be based on dpb_type
This patch will fix the dpb size calculated for each dpb_type.
Current implementaion always calculating based on DPB_MAX_RES.To fix
this dpb_type should be decided before calc_dpb_size.

Signed-off-by: SureshGuttula <suresh.guttula@amd.corp-partner.google.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11633>
2021-06-30 14:22:37 +00:00
Thong Thai d977e7fbe1 radeon/vcn/enc: Add missing line to HEVC SPS header code
Add previously missing line in HEVC SPS header generation on VCN 1.0
devices, for when an image does not need to be cropped.

Fixes: e62c7e7c6c ("radeon: Add cropping to encoded H.265 when padding is used")
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11535>
2021-06-22 23:36:29 +00:00
Boyuan Zhang c6da3827d0 radeon/vcn: use st_rps_bits only when it's set
Fixes: c9baccb5

For certain player which doesn't implement st_rps_bits, or when st_rps_bits
is set to 0 (e.g. it doesn't have rps explicitly defined in slice header),
we don't set st_rps_bits and the related flag, since we don't skip parsing
the rps structure in these cases.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11432>
2021-06-22 17:42:08 +00:00
Boyuan Zhang e1af22d9dd radeon/vcn: allocate non-tmz context buffer for VCN2+
By design, context buffer should be allocated as TMZ buffer for secure playback
for VCN 1 only. For VCN 2&2+, context buffer should be moved out of TMZ.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11388>
2021-06-18 14:35:44 +00:00
Boyuan Zhang 796358e2f5 radeon/vcn: move calc_dpb_size into create_decoder
Dpb buffer size calculation should based on the values provided in player's
decoder creation call. db_alignmet should be decided in decoder creation
call as well. Therefore, move db_alignment and dpb buffer size calculation
from rvcn_dec_message_decode to radeon_create_decoder function.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11378>
2021-06-18 14:23:24 +00:00
Leo Liu 43c04ab2b4 radeonsi: separate video hw info based on HW engine individually
This removes previous "has_hw_decode" and "uvd_enc_supported" and
makes information more accuate for cases where HW decode, HW encode,
and HW JPEG decode might partially available.

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11201>
2021-06-08 09:32:48 -04:00
Leo Liu 56714238ba radeon/vcn/enc: use surface swizzle mode instead of linear
It will be capable to have encoder tiling supported via modifier

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11165>
2021-06-04 12:46:03 +00:00
Boyuan Zhang c9baccb516 radeon/vcn: enable parsing support for st_rps_bits
Set st_rps_bits in hevc message buffer and set corresponding flag to indicate
that st_rps_bits will be used for parsing the short_term_ref_pic_set structure.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10889>
2021-05-29 20:40:08 +00:00
Marek Olšák 80f0726e4c amd: add Beige Goby support
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10878>
2021-05-24 17:41:34 +00:00
Aaron Liu c54bb135aa amd: add Yellow Carp support
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10878>
2021-05-24 17:41:34 +00:00
Bas Nieuwenhuizen c05e48308b radeon/vcn: Use the correct pitch for chroma surface.
The pitch of the chroma plane isn't necessarily half that of the
luma plane, as tiling (and presumably even linear) swizzle modes
apply some alignment.

Fixes: 35e25ea1d0 ("ac/surface: allow non-DCC modifiers for YUV on GFX9+")
Reviewed-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10638>
2021-05-05 11:05:19 +00:00
Simon Ser b26a546b2f radeon/vcn: handle tiled buffers when decoding
Set the swizzle mode when decoding.

Add a safe-guard to make sure the provided surface isn't DCC, because
we don't handle this situation.

Signed-off-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10134>
2021-04-15 09:43:17 +00:00
Pierre-Eric Pelloux-Prayer 8fd912b9ae amdgpu,radeon: add full_reset_only param to ctx_query_reset_status
Using this boolean the caller tells if it wants to ignore resets
fixed by a soft recovery.

When true, amdgpu can skip the call to libdrm if no cs has been
rejected (since only full gpu reset cause cs rejections).

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10179>
2021-04-14 07:00:00 +00:00
Pierre-Eric Pelloux-Prayer bc71f689f1 amdgpu,radeon: add needs_reset param to ctx_query_reset_status
The kernel can do different types of recovery (soft recovery, GPU reset).

Since they both increase gpu_reset_counter, this will cause all contexts
to report AMDGPU_CTX_QUERY2_FLAGS_RESET, which is a bit misleading: if
a single context was soft-recovered, the others are fine and we don't need
special processing.

This commit uses the AMDGPU_CTX_QUERY2_FLAGS_VRAMLOST to distinguish
between the 2 kind of reset and later commits will use this information.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10179>
2021-04-14 07:00:00 +00:00
Thong Thai e62c7e7c6c radeon: Add cropping to encoded H.265 when padding is used
Because the VCN encoder needs the surface to be memory aligned, the
resolution of the image passed to the encoder might be larger and have
extra padding added - this change crops the resulting output to
compensate for the extra padding that might have been added.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4559
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10137>
2021-04-12 22:42:53 +00:00
Marek Olšák 48dbdc62bf ac/surface: change legacy_surf_level::offset to 32-bit offset_256B shifted by 8
Images are always aligned to 256B (enforced by register and descriptor
fields) and limited to 40-bit addresses. This saves some space.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10083>
2021-04-12 20:53:45 +00:00
Marek Olšák 65495e6caa radeon_winsys.h: add a winsys parameter to most winsys buffer functions
This will allow removing the winsys pointer from buffers.

The amdgpu winsys adds dummy_ws to get radeon_winsys because there can be
no radeon_winsys around (e.g. while amdgpu_winsys is being destroyed), but
we still need some way to call buffer functions.

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9809>
2021-04-06 22:31:15 +00:00
Marek Olšák aed8af5456 radeon_winsys.h: add a new function radeon_bo_reference that takes a winsys
This will allow removing the winsys pointer from buffers.

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9809>
2021-04-06 22:31:15 +00:00
Ruijing Dong eaf197605e radeon/vcn: release si buffer for encoding at the end.
Signed-off-by: Ruijing Dong <Ruijing.Dong@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9882>
2021-03-30 15:41:12 +00:00
James Zhu 381d3a5a38 amd: add Aldebaran chip enum
Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9389>
2021-03-10 18:02:27 +00:00
Pierre-Eric Pelloux-Prayer bddc0e023c radeonsi: fix read from compute / write from draw sync
A compute dispatch should see the result of a previous draw command.
radeonsi was missing this implicit sync, causing rendering artifacts:
the compute shader was reading from a texture still being written to
by the previous draw.

Framebuffer BOs are marked with RADEON_USAGE_NEEDS_IMPLICIT_SYNC,
so compute jobs will sync.

v2: use RADEON_USAGE_NEEDS_IMPLICIT_SYNC
v3: unconditionally make CB coherent after a flush

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com> (v3)
Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v3)
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4032
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2878
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1336
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8869>
2021-02-17 09:11:46 +00:00
Leo Liu e4decf6f39 radeon/vcn: enable dynamic dpb Tier2 support
On VCN3 with codec AV1 and VP9

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8916>
2021-02-09 08:39:42 -05:00
Leo Liu c7a481872e radeon/vcn: implement dynamic dpb Tier2 support
Fill up the t2 message buffers based on reference lists, so to
avoid unnecessary allocation of the buffers.

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8916>
2021-02-09 08:39:42 -05:00
Leo Liu 905c103209 radeon/vcn: add dynamic dpb Tier2 message buffer interface
Tier2 will dynamically manange the dpb buffers, so that can
save even more VRAMs

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8916>
2021-02-09 08:39:42 -05:00
Leo Liu 57cb2fc88e radeon/vcn: enable dynamic dpb Tier1 support
For Raven and Navixx family i.e. VCN1 and VCN2 with VP9 codec

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8851>
2021-02-05 09:22:52 -05:00
Leo Liu b460c9b5d1 radeon/vcn: add dynamic dpb buffer Tier1 support
Also add its buffer index and fill up messages for the buffer.

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8851>
2021-02-05 09:22:52 -05:00
Leo Liu 6b4326346b radeon/vcn: add dynamic dpb interface
The new message buffer will save the dpb buffers from previous
allocation based on the max resolution.

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8851>
2021-02-05 09:22:52 -05:00
Leo Liu 480d1436fe radeon/vcn: clean the message buffers and their indexes logic
So the new buffer and index can be added sequentially.

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8851>
2021-02-05 09:22:52 -05:00
Marek Olšák 965c6445ad winsys/amdgpu,radeonsi: add HUD counters for how much memory is wasted by slabs
Slabs always allocate the next power of two size from their pools. This
wastes memory if the size is not a power of two.

bo->base.size is overwritten because the default is the allocated power of
two size, but we need the real size to compute the wasted size in
amdgpu_bo_slab_destroy. entry_size is added to the hole in pb_slab_entry
to hold the real entry size.

Like other memory stats, no atomics are used.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8683>
2021-02-03 21:53:33 +00:00
Marek Olšák b60dfa2c09 radeon: decrease the size of radeon_cmdbuf by switching prev fields to uint16
This also removes the 32-bit hole in radeon_cmdbuf.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8434>
2021-02-02 05:42:32 +00:00
Marek Olšák e93b42c214 ac,radeonsi: track memory usage in KB to reduce types from uint64 to uint32
Decreasing the time spent in radeon_cs_memory_below_limit is the motivation.

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8794>
2021-01-30 15:38:15 -05:00
Pierre-Eric Pelloux-Prayer 094ab8bc12 radeonsi: fix redundant initializations
See https://gitlab.freedesktop.org/mesa/mesa/-/issues/3966

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7846>
2021-01-05 11:29:11 +00:00
Pierre-Eric Pelloux-Prayer b1c7a65815 gallium/vl: merge identical h264/h265 enums
Use h2645 notations for shared enums to reduce duplication and
fix a clang warning.

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7846>
2021-01-05 11:29:11 +00:00
Marek Olšák 31240a875c radeonsi: add driconf options to enable/disable Smart Access Memory
so that anybody can test it if they have Above 4G Decoding and compare
performance.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8225>
2021-01-05 02:43:55 +00:00
Ruijing Dong 69487c754c radeon/vcn: fix hevc 10bit profile error
hevc main10 profile error fix

CC: mesa-stable
Signed-off-by: Ruijing Dong <Ruijing.Dong@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8038>
2020-12-23 18:04:31 -05:00
Marek Olšák 1f31a21664 radeonsi: remove SDMA support
There are many issues with SDMA across many generations of hardware.
A recent example is that gfx10.3 suffers from random GPU hangs if
userspace uses SDMA.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7908>
2020-12-09 00:52:26 +00:00
Marek Olšák 3bd9db5be3 r300,r600,radeonsi: inline struct radeon_cmdbuf to remove dereferences
It's straightforward except that the amdgpu winsys had to be cleaned up
to allow this.

radeon_cmdbuf is inlined and optionally the winsys can save the pointer
to it. radeon_cmdbuf::priv points to the winsys cs structure.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7907>
2020-12-05 10:52:17 -05:00
Ruijing Dong ba42de95da radeon/vcn: support hevc SAO enc for VCN2+
Add support of sample adaptive offset (SAO) in HEVC encode for VCN2 and above.

Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6942>
2020-12-03 19:49:30 -05:00
Boyuan Zhang c56a1898d7 radeon/vcn: use cdw to calculate slice header index
Use DWORD count to calculate the number of DWORD filled in slice header template.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6942>
2020-12-03 19:49:27 -05:00