mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 11:40:10 +01:00
radeonsi/video: Remove rvid_buffer
Not used anymore. Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37884>
This commit is contained in:
parent
9764748f91
commit
ffec70465c
2 changed files with 1 additions and 72 deletions
|
|
@ -7,13 +7,6 @@
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#include "radeon_video.h"
|
#include "radeon_video.h"
|
||||||
|
|
||||||
#include "radeon_vce.h"
|
|
||||||
#include "radeonsi/si_pipe.h"
|
|
||||||
#include "util/u_memory.h"
|
|
||||||
#include "util/u_video.h"
|
|
||||||
#include "vl/vl_defines.h"
|
|
||||||
#include "vl/vl_video_buffer.h"
|
|
||||||
#include "ac_uvd_dec.h"
|
#include "ac_uvd_dec.h"
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
@ -27,40 +20,6 @@ unsigned si_vid_alloc_stream_handle()
|
||||||
return ac_uvd_alloc_stream_handle(&stream_handle);
|
return ac_uvd_alloc_stream_handle(&stream_handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* create a buffer in the winsys */
|
|
||||||
bool si_vid_create_buffer(struct pipe_screen *screen, struct rvid_buffer *buffer, unsigned size,
|
|
||||||
unsigned usage)
|
|
||||||
{
|
|
||||||
memset(buffer, 0, sizeof(*buffer));
|
|
||||||
buffer->usage = usage;
|
|
||||||
|
|
||||||
/* Hardware buffer placement restrictions require the kernel to be
|
|
||||||
* able to move buffers around individually, so request a
|
|
||||||
* non-sub-allocated buffer.
|
|
||||||
*/
|
|
||||||
buffer->res = si_resource(pipe_buffer_create(screen, PIPE_BIND_CUSTOM, usage, size));
|
|
||||||
|
|
||||||
return buffer->res != NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* create a tmz buffer in the winsys */
|
|
||||||
bool si_vid_create_tmz_buffer(struct pipe_screen *screen, struct rvid_buffer *buffer, unsigned size,
|
|
||||||
unsigned usage)
|
|
||||||
{
|
|
||||||
memset(buffer, 0, sizeof(*buffer));
|
|
||||||
buffer->usage = usage;
|
|
||||||
buffer->res = si_resource(pipe_buffer_create(screen, PIPE_BIND_CUSTOM | PIPE_BIND_PROTECTED,
|
|
||||||
usage, size));
|
|
||||||
return buffer->res != NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* destroy a buffer */
|
|
||||||
void si_vid_destroy_buffer(struct rvid_buffer *buffer)
|
|
||||||
{
|
|
||||||
si_resource_reference(&buffer->res, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* reallocate a buffer, preserving its content */
|
/* reallocate a buffer, preserving its content */
|
||||||
bool si_vid_resize_buffer(struct pipe_context *context,
|
bool si_vid_resize_buffer(struct pipe_context *context,
|
||||||
struct si_resource **buf, unsigned new_size,
|
struct si_resource **buf, unsigned new_size,
|
||||||
|
|
@ -131,13 +90,3 @@ error:
|
||||||
si_resource_reference(&new_buf, NULL);
|
si_resource_reference(&new_buf, NULL);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* clear the buffer with zeros */
|
|
||||||
void si_vid_clear_buffer(struct pipe_context *context, struct rvid_buffer *buffer)
|
|
||||||
{
|
|
||||||
struct si_context *sctx = (struct si_context *)context;
|
|
||||||
uint32_t zero = 0;
|
|
||||||
|
|
||||||
sctx->b.clear_buffer(&sctx->b, &buffer->res->b.b, 0, buffer->res->b.b.width0, &zero, 4);
|
|
||||||
context->flush(context, NULL, 0);
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
#include "winsys/radeon_winsys.h"
|
#include "winsys/radeon_winsys.h"
|
||||||
#include "vl/vl_video_buffer.h"
|
#include "vl/vl_video_buffer.h"
|
||||||
|
#include "si_pipe.h"
|
||||||
#include "util/log.h"
|
#include "util/log.h"
|
||||||
|
|
||||||
#undef MESA_LOG_TAG
|
#undef MESA_LOG_TAG
|
||||||
|
|
@ -21,13 +22,6 @@
|
||||||
|
|
||||||
#define UVD_FW_1_66_16 ((1 << 24) | (66 << 16) | (16 << 8))
|
#define UVD_FW_1_66_16 ((1 << 24) | (66 << 16) | (16 << 8))
|
||||||
|
|
||||||
/* video buffer representation */
|
|
||||||
struct rvid_buffer {
|
|
||||||
unsigned usage;
|
|
||||||
struct si_resource *res;
|
|
||||||
void *user_data;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* video buffer offset info representation */
|
/* video buffer offset info representation */
|
||||||
struct rvid_buf_offset_info {
|
struct rvid_buf_offset_info {
|
||||||
unsigned num_units;
|
unsigned num_units;
|
||||||
|
|
@ -38,23 +32,9 @@ struct rvid_buf_offset_info {
|
||||||
/* generate an stream handle */
|
/* generate an stream handle */
|
||||||
unsigned si_vid_alloc_stream_handle(void);
|
unsigned si_vid_alloc_stream_handle(void);
|
||||||
|
|
||||||
/* create a buffer in the winsys */
|
|
||||||
bool si_vid_create_buffer(struct pipe_screen *screen, struct rvid_buffer *buffer, unsigned size,
|
|
||||||
unsigned usage);
|
|
||||||
|
|
||||||
/* create a tmz buffer in the winsys */
|
|
||||||
bool si_vid_create_tmz_buffer(struct pipe_screen *screen, struct rvid_buffer *buffer, unsigned size,
|
|
||||||
unsigned usage);
|
|
||||||
|
|
||||||
/* destroy a buffer */
|
|
||||||
void si_vid_destroy_buffer(struct rvid_buffer *buffer);
|
|
||||||
|
|
||||||
/* reallocate a buffer, preserving its content */
|
/* reallocate a buffer, preserving its content */
|
||||||
bool si_vid_resize_buffer(struct pipe_context *context,
|
bool si_vid_resize_buffer(struct pipe_context *context,
|
||||||
struct si_resource **buf, unsigned new_size,
|
struct si_resource **buf, unsigned new_size,
|
||||||
struct rvid_buf_offset_info *buf_ofst_info);
|
struct rvid_buf_offset_info *buf_ofst_info);
|
||||||
|
|
||||||
/* clear the buffer with zeros */
|
|
||||||
void si_vid_clear_buffer(struct pipe_context *context, struct rvid_buffer *buffer);
|
|
||||||
|
|
||||||
#endif // RADEON_VIDEO_H
|
#endif // RADEON_VIDEO_H
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue