backend-drm: Add GBM_BO_HANDLE as a failure reason
And use it to get a feedback event for when adding scanout tranche. With this change, I get back a feedback event for dmabuf-feedback on VC4: ���� tranche: target device /dev/dri/card0, scanout � ���� format ABGR2101010, modifier LINEAR (0x0) � ���� format XBGR2101010, modifier LINEAR (0x0) � ���� format ARGB8888, modifier LINEAR (0x0) � ���� format ABGR8888, modifier LINEAR (0x0) � ���� format XRGB8888, modifier LINEAR (0x0) � ���� format XBGR8888, modifier LINEAR (0x0) � ���� format RGB565, modifier LINEAR (0x0) � ���� format YUV420, modifier LINEAR (0x0) � ���� format YUV422, modifier LINEAR (0x0) � ���� format YVU420, modifier LINEAR (0x0) � ���� format YVU422, modifier LINEAR (0x0) � ���� format NV12, modifier LINEAR (0x0) � ���� format NV12, modifier BROADCOM_SAND128 (0x700000000000004) � ���� format NV16, modifier LINEAR (0x0) � ���� end of tranche Besides that, it can place a fullscreen state of simple-egl on the primary plane, which without this change wasn't possible. Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
parent
aa507417c2
commit
b0257e0ffc
@ -246,6 +246,7 @@ enum try_view_on_plane_failure_reasons {
|
||||
FAILURE_REASONS_GLOBAL_ALPHA = 1 << 10,
|
||||
FAILURE_REASONS_NO_GBM = 1 << 11,
|
||||
FAILURE_REASONS_GBM_BO_IMPORT_FAILED = 1 << 12,
|
||||
FAILURE_REASONS_GBM_BO_GET_HANDLE_FAILED = 1 << 13,
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -315,8 +315,11 @@ drm_fb_get_from_dmabuf(struct linux_dmabuf_buffer *dmabuf,
|
||||
union gbm_bo_handle handle;
|
||||
|
||||
handle = gbm_bo_get_handle_for_plane(fb->bo, i);
|
||||
if (handle.s32 == -1)
|
||||
if (handle.s32 == -1) {
|
||||
*try_view_on_plane_failure_reasons |=
|
||||
FAILURE_REASONS_GBM_BO_GET_HANDLE_FAILED;
|
||||
goto err_free;
|
||||
}
|
||||
fb->handles[i] = handle.u32;
|
||||
}
|
||||
|
||||
|
@ -341,7 +341,8 @@ dmabuf_feedback_maybe_update(struct drm_backend *b, struct weston_view *ev,
|
||||
(FAILURE_REASONS_ADD_FB_FAILED |
|
||||
FAILURE_REASONS_FB_FORMAT_INCOMPATIBLE |
|
||||
FAILURE_REASONS_DMABUF_MODIFIER_INVALID |
|
||||
FAILURE_REASONS_GBM_BO_IMPORT_FAILED))
|
||||
FAILURE_REASONS_GBM_BO_IMPORT_FAILED |
|
||||
FAILURE_REASONS_GBM_BO_GET_HANDLE_FAILED))
|
||||
action_needed |= ACTION_NEEDED_ADD_SCANOUT_TRANCHE;
|
||||
|
||||
assert(action_needed != (ACTION_NEEDED_REMOVE_SCANOUT_TRANCHE |
|
||||
|
Loading…
Reference in New Issue
Block a user