aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600
diff options
context:
space:
mode:
authorChristian König <[email protected]>2013-09-09 10:49:55 +0200
committerChristian König <[email protected]>2013-09-12 15:16:30 +0200
commit2487324591c1629492288a814e1d8a3046d37b15 (patch)
treebb43571548f04c376f4cd804014c140bbff147c4 /src/gallium/drivers/r600
parent56be937d42b2f18fff072854122dbe5e0a95dd16 (diff)
radeon/uvd: move more logic into the common files
Move the code back into the common UVD files since we now have base structures for R600 and radeonsi. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r--src/gallium/drivers/r600/r600_pipe.c2
-rw-r--r--src/gallium/drivers/r600/r600_pipe.h5
-rw-r--r--src/gallium/drivers/r600/r600_uvd.c30
3 files changed, 2 insertions, 35 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
index aa5cadf93e9..f60252ad315 100644
--- a/src/gallium/drivers/r600/r600_pipe.c
+++ b/src/gallium/drivers/r600/r600_pipe.c
@@ -1293,7 +1293,7 @@ struct pipe_screen *r600_screen_create(struct radeon_winsys *ws)
rscreen->b.b.get_driver_query_info = r600_get_driver_query_info;
if (rscreen->b.info.has_uvd) {
- rscreen->b.b.get_video_param = r600_uvd_get_video_param;
+ rscreen->b.b.get_video_param = ruvd_get_video_param;
rscreen->b.b.is_video_format_supported = ruvd_is_format_supported;
} else {
rscreen->b.b.get_video_param = r600_get_video_param;
diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h
index 2ba0251dccf..14919754610 100644
--- a/src/gallium/drivers/r600/r600_pipe.h
+++ b/src/gallium/drivers/r600/r600_pipe.h
@@ -816,11 +816,6 @@ struct pipe_video_codec *r600_uvd_create_decoder(struct pipe_context *context,
struct pipe_video_buffer *r600_video_buffer_create(struct pipe_context *pipe,
const struct pipe_video_buffer *tmpl);
-int r600_uvd_get_video_param(struct pipe_screen *screen,
- enum pipe_video_profile profile,
- enum pipe_video_entrypoint entrypoint,
- enum pipe_video_cap param);
-
/*
* Helpers for building command buffers
*/
diff --git a/src/gallium/drivers/r600/r600_uvd.c b/src/gallium/drivers/r600/r600_uvd.c
index eeac76f3e23..00669fd3171 100644
--- a/src/gallium/drivers/r600/r600_uvd.c
+++ b/src/gallium/drivers/r600/r600_uvd.c
@@ -167,33 +167,5 @@ static struct radeon_winsys_cs_handle* r600_uvd_set_dtb(struct ruvd_msg *msg, st
struct pipe_video_codec *r600_uvd_create_decoder(struct pipe_context *context,
const struct pipe_video_codec *templat)
{
- struct r600_context *ctx = (struct r600_context *)context;
-
- return ruvd_create_decoder(context, templat, ctx->b.ws, r600_uvd_set_dtb);
-}
-
-int r600_uvd_get_video_param(struct pipe_screen *screen,
- enum pipe_video_profile profile,
- enum pipe_video_entrypoint entrypoint,
- enum pipe_video_cap param)
-{
- struct r600_screen *rscreen = (struct r600_screen *)screen;
-
- /* UVD 2.x limits */
- if (rscreen->b.family < CHIP_PALM) {
- enum pipe_video_format codec = u_reduce_video_profile(profile);
- switch (param) {
- case PIPE_VIDEO_CAP_SUPPORTED:
- /* no support for MPEG4 */
- return codec != PIPE_VIDEO_FORMAT_MPEG4;
- case PIPE_VIDEO_CAP_PREFERS_INTERLACED:
- case PIPE_VIDEO_CAP_SUPPORTS_INTERLACED:
- /* and MPEG2 only with shaders */
- return codec != PIPE_VIDEO_FORMAT_MPEG12;
- default:
- break;
- }
- }
-
- return ruvd_get_video_param(screen, profile, entrypoint, param);
+ return ruvd_create_decoder(context, templat, r600_uvd_set_dtb);
}