diff options
Diffstat (limited to 'video/out/opengl')
-rw-r--r-- | video/out/opengl/context_drm_egl.c | 6 | ||||
-rw-r--r-- | video/out/opengl/hwdec_drmprime_drm.c | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/video/out/opengl/context_drm_egl.c b/video/out/opengl/context_drm_egl.c index c4cc28b762..f06494b799 100644 --- a/video/out/opengl/context_drm_egl.c +++ b/video/out/opengl/context_drm_egl.c @@ -101,7 +101,7 @@ struct priv { struct vsync_tuple vsync; struct vo_vsync_info vsync_info; - struct mpv_opengl_drm_params drm_params; + struct mpv_opengl_drm_params_v2 drm_params; struct mpv_opengl_drm_draw_surface_size draw_surface_size; }; @@ -851,7 +851,7 @@ static bool drm_egl_init(struct ra_ctx *ctx) if (rendernode_path) { MP_VERBOSE(ctx, "Opening render node \"%s\"\n", rendernode_path); p->drm_params.render_fd = open(rendernode_path, O_RDWR | O_CLOEXEC); - if (p->drm_params.render_fd < 0) { + if (p->drm_params.render_fd == -1) { MP_WARN(ctx, "Cannot open render node \"%s\": %s. VAAPI hwdec will be disabled\n", rendernode_path, mp_strerror(errno)); } @@ -868,7 +868,7 @@ static bool drm_egl_init(struct ra_ctx *ctx) if (!ra_gl_ctx_init(ctx, &p->gl, params)) return false; - ra_add_native_resource(ctx->ra, "drm_params", &p->drm_params); + ra_add_native_resource(ctx->ra, "drm_params_v2", &p->drm_params); ra_add_native_resource(ctx->ra, "drm_draw_surface_size", &p->draw_surface_size); p->vsync_info.vsync_duration = 0; diff --git a/video/out/opengl/hwdec_drmprime_drm.c b/video/out/opengl/hwdec_drmprime_drm.c index fd3d383c55..7328fbb284 100644 --- a/video/out/opengl/hwdec_drmprime_drm.c +++ b/video/out/opengl/hwdec_drmprime_drm.c @@ -146,8 +146,8 @@ static int overlay_frame(struct ra_hwdec *hw, struct mp_image *hw_image, // grab atomic request from native resources if (p->ctx) { - struct mpv_opengl_drm_params *drm_params; - drm_params = (mpv_opengl_drm_params *)ra_get_native_resource(hw->ra, "drm_params"); + struct mpv_opengl_drm_params_v2 *drm_params; + drm_params = (mpv_opengl_drm_params_v2 *)ra_get_native_resource(hw->ra, "drm_params_v2"); if (!drm_params) { MP_ERR(hw, "Failed to retrieve drm params from native resources\n"); return -1; @@ -250,9 +250,9 @@ static int init(struct ra_hwdec *hw) drmprime_video_plane = opts->drm_drmprime_video_plane; talloc_free(tmp); - struct mpv_opengl_drm_params *drm_params; + struct mpv_opengl_drm_params_v2 *drm_params; - drm_params = ra_get_native_resource(hw->ra, "drm_params"); + drm_params = ra_get_native_resource(hw->ra, "drm_params_v2"); if (drm_params) { p->ctx = drm_atomic_create_context(p->log, drm_params->fd, drm_params->crtc_id, drm_params->connector_id, draw_plane, drmprime_video_plane); |