diff options
author | 2018-03-17 08:21:56 +0100 | |
---|---|---|
committer | 2018-05-01 20:48:02 +0300 | |
commit | 49bc07faea5f3c621eed437fadf68653b4b2498b (patch) | |
tree | 4d29c3655bd56ba9a6687445947203dff29c7178 /video/out/opengl | |
parent | 9f2970f28a28076897fda1100de2b6eb9a92be79 (diff) |
drm/atomic: add connector to atomic context
This patch adds
- DRM connector object to atomic context.
- fd property to the drm atomic object as well as a method to read blob type properties.
This allows to ensure that the proper connector is picked up, especially when specifying it
from the commandline, and also allows to make sure we're using the right one when embedding
with interop into an application.
Diffstat (limited to 'video/out/opengl')
-rw-r--r-- | video/out/opengl/context_drm_egl.c | 1 | ||||
-rw-r--r-- | video/out/opengl/hwdec_drmprime_drm.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/video/out/opengl/context_drm_egl.c b/video/out/opengl/context_drm_egl.c index cf37cb524a..27b1ab968a 100644 --- a/video/out/opengl/context_drm_egl.c +++ b/video/out/opengl/context_drm_egl.c @@ -567,6 +567,7 @@ static bool drm_egl_init(struct ra_ctx *ctx) p->drm_params.fd = p->kms->fd; p->drm_params.connector_id = p->kms->connector->connector_id; p->drm_params.crtc_id = p->kms->crtc_id; + p->drm_params.connector_id = p->kms->connector->connector_id; if (p->kms->atomic_context) p->drm_params.atomic_request_ptr = &p->kms->atomic_context->request; struct ra_gl_ctx_params params = { diff --git a/video/out/opengl/hwdec_drmprime_drm.c b/video/out/opengl/hwdec_drmprime_drm.c index 0c7f86a584..f99550442a 100644 --- a/video/out/opengl/hwdec_drmprime_drm.c +++ b/video/out/opengl/hwdec_drmprime_drm.c @@ -224,7 +224,7 @@ static int init(struct ra_hwdec *hw) drm_params = ra_get_native_resource(hw->ra, "drm_params"); if (drm_params) { p->ctx = drm_atomic_create_context(p->log, drm_params->fd, drm_params->crtc_id, - drm_overlay); + drm_params->connector_id, drm_overlay); if (!p->ctx) { mp_err(p->log, "Failed to retrieve DRM atomic context.\n"); goto err; |