mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 04:10:09 +01:00
radeonsi/uvd,vce: Don't try to flush cs from buffer_map
There is nothing to do on cs flush anyway. Also remove the dummy flush callback. Reviewed-by: Ruijing Dong <ruijing.dong@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34477>
This commit is contained in:
parent
d12f2c65b1
commit
996dbe0ba3
3 changed files with 9 additions and 19 deletions
|
|
@ -141,7 +141,7 @@ static void map_msg_fb_it_buf(struct ruvd_decoder *dec)
|
|||
|
||||
/* and map it for CPU access */
|
||||
ptr =
|
||||
dec->ws->buffer_map(dec->ws, buf->res->buf, &dec->cs, PIPE_MAP_WRITE | RADEON_MAP_TEMPORARY);
|
||||
dec->ws->buffer_map(dec->ws, buf->res->buf, NULL, PIPE_MAP_WRITE | RADEON_MAP_TEMPORARY);
|
||||
|
||||
/* calc buffer offsets */
|
||||
dec->msg = (struct ruvd_msg *)ptr;
|
||||
|
|
@ -993,7 +993,7 @@ static void ruvd_begin_frame(struct pipe_video_codec *decoder, struct pipe_video
|
|||
&ruvd_destroy_associated_data);
|
||||
|
||||
dec->bs_size = 0;
|
||||
dec->bs_ptr = dec->ws->buffer_map(dec->ws, dec->bs_buffers[dec->cur_buffer].res->buf, &dec->cs,
|
||||
dec->bs_ptr = dec->ws->buffer_map(dec->ws, dec->bs_buffers[dec->cur_buffer].res->buf, NULL,
|
||||
PIPE_MAP_WRITE | RADEON_MAP_TEMPORARY);
|
||||
}
|
||||
|
||||
|
|
@ -1050,7 +1050,7 @@ static void ruvd_decode_bitstream(struct pipe_video_codec *decoder,
|
|||
return;
|
||||
}
|
||||
|
||||
dec->bs_ptr = dec->ws->buffer_map(dec->ws, buf->res->buf, &dec->cs,
|
||||
dec->bs_ptr = dec->ws->buffer_map(dec->ws, buf->res->buf, NULL,
|
||||
PIPE_MAP_WRITE | RADEON_MAP_TEMPORARY);
|
||||
if (!dec->bs_ptr)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -72,11 +72,6 @@ static void radeon_uvd_enc_flush(struct pipe_video_codec *encoder)
|
|||
flush(enc, PIPE_FLUSH_ASYNC, NULL);
|
||||
}
|
||||
|
||||
static void radeon_uvd_enc_cs_flush(void *ctx, unsigned flags, struct pipe_fence_handle **fence)
|
||||
{
|
||||
// just ignored
|
||||
}
|
||||
|
||||
static uint32_t setup_dpb(struct radeon_uvd_encoder *enc, uint32_t num_reconstructed_pictures)
|
||||
{
|
||||
uint32_t i;
|
||||
|
|
@ -205,7 +200,7 @@ static void *radeon_uvd_enc_encode_headers(struct radeon_uvd_encoder *enc)
|
|||
if (!data)
|
||||
return NULL;
|
||||
|
||||
uint8_t *ptr = enc->ws->buffer_map(enc->ws, enc->bs_handle, &enc->cs,
|
||||
uint8_t *ptr = enc->ws->buffer_map(enc->ws, enc->bs_handle, NULL,
|
||||
PIPE_MAP_WRITE | RADEON_MAP_TEMPORARY);
|
||||
if (!ptr) {
|
||||
RVID_ERR("Can't map bs buffer.\n");
|
||||
|
|
@ -319,7 +314,7 @@ static void radeon_uvd_enc_get_feedback(struct pipe_video_codec *encoder, void *
|
|||
struct rvid_buffer *fb = feedback;
|
||||
|
||||
radeon_uvd_enc_feedback_t *fb_data = (radeon_uvd_enc_feedback_t *)enc->ws->buffer_map(
|
||||
enc->ws, fb->res->buf, &enc->cs, PIPE_MAP_READ_WRITE | RADEON_MAP_TEMPORARY);
|
||||
enc->ws, fb->res->buf, NULL, PIPE_MAP_READ_WRITE | RADEON_MAP_TEMPORARY);
|
||||
|
||||
if (!fb_data->status)
|
||||
*size = fb_data->bitstream_size;
|
||||
|
|
@ -406,7 +401,7 @@ struct pipe_video_codec *radeon_uvd_create_encoder(struct pipe_context *context,
|
|||
enc->screen = context->screen;
|
||||
enc->ws = ws;
|
||||
|
||||
if (!ws->cs_create(&enc->cs, sctx->ctx, AMD_IP_UVD_ENC, radeon_uvd_enc_cs_flush, enc)) {
|
||||
if (!ws->cs_create(&enc->cs, sctx->ctx, AMD_IP_UVD_ENC, NULL, NULL)) {
|
||||
RVID_ERR("Can't get command submission context.\n");
|
||||
goto error;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ static void *si_vce_encode_headers(struct rvce_encoder *enc)
|
|||
if (!data)
|
||||
return NULL;
|
||||
|
||||
uint8_t *ptr = enc->ws->buffer_map(enc->ws, enc->bs_handle, &enc->cs,
|
||||
uint8_t *ptr = enc->ws->buffer_map(enc->ws, enc->bs_handle, NULL,
|
||||
PIPE_MAP_WRITE | RADEON_MAP_TEMPORARY);
|
||||
if (!ptr) {
|
||||
RVID_ERR("Can't map bs buffer.\n");
|
||||
|
|
@ -297,7 +297,7 @@ static void rvce_get_feedback(struct pipe_video_codec *encoder, void *feedback,
|
|||
struct rvce_encoder *enc = (struct rvce_encoder *)encoder;
|
||||
struct rvid_buffer *fb = feedback;
|
||||
|
||||
uint32_t *ptr = enc->ws->buffer_map(enc->ws, fb->res->buf, &enc->cs,
|
||||
uint32_t *ptr = enc->ws->buffer_map(enc->ws, fb->res->buf, NULL,
|
||||
PIPE_MAP_READ_WRITE | RADEON_MAP_TEMPORARY);
|
||||
|
||||
if (ptr[1]) {
|
||||
|
|
@ -364,11 +364,6 @@ static void rvce_flush(struct pipe_video_codec *encoder)
|
|||
flush(enc, PIPE_FLUSH_ASYNC, NULL);
|
||||
}
|
||||
|
||||
static void rvce_cs_flush(void *ctx, unsigned flags, struct pipe_fence_handle **fence)
|
||||
{
|
||||
// just ignored
|
||||
}
|
||||
|
||||
struct pipe_video_codec *si_vce_create_encoder(struct pipe_context *context,
|
||||
const struct pipe_video_codec *templ,
|
||||
struct radeon_winsys *ws, rvce_get_buffer get_buffer)
|
||||
|
|
@ -414,7 +409,7 @@ struct pipe_video_codec *si_vce_create_encoder(struct pipe_context *context,
|
|||
enc->screen = context->screen;
|
||||
enc->ws = ws;
|
||||
|
||||
if (!ws->cs_create(&enc->cs, sctx->ctx, AMD_IP_VCE, rvce_cs_flush, enc)) {
|
||||
if (!ws->cs_create(&enc->cs, sctx->ctx, AMD_IP_VCE, NULL, NULL)) {
|
||||
RVID_ERR("Can't get command submission context.\n");
|
||||
goto error;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue