Commit bb72d188 authored by John Stultz's avatar John Stultz
Browse files

[RFC] drm_hwcomposer: Fix for setting one too many prime_fds



When trying to work with NV12 buffers, I'm seeing lots of the
following noise:

10-20 20:39:40.855   474   474 E hwc-drm-two: Failed to import layer, ret=-22
10-20 20:39:40.888   474   474 E hwc-platform-drm-generic: could not create drm fb -22
10-20 20:39:40.888   474   474 E hwc-platform-drm-generic: Failed to rm fb
10-20 20:39:40.888   474   474 E hwc-drm-utils: Failed to import buffer

Digging back it seems we're setting three fds for 2 plane
formats.

This patch changes it so we only set two, which stops the
import errors.

(NOTE: I'm still not seeing the NV12 buffers rendered properly,
 but I'm  not yet sure where that issue is stemming from).

Signed-off-by: John Stultz's avatarJohn Stultz <john.stultz@linaro.org>
Change-Id: Id5493e37f17053740ca6b643fd838a2d11507462
parent 11ef8c5f
Pipeline #428192 failed with stages
in 6 minutes and 46 seconds
......@@ -53,7 +53,7 @@ BufferInfoMapperMetadata::GetFds(buffer_handle_t handle, hwc_drm_bo_t *bo) {
if (IsDrmFormatRgb(bo->format)) {
bo->prime_fds[0] = handle->data[0];
} else {
bo->prime_fds[0] = bo->prime_fds[1] = bo->prime_fds[2] = handle->data[0];
bo->prime_fds[0] = bo->prime_fds[1] = handle->data[0];
}
if (bo->prime_fds[0] <= 0) {
ALOGE("Encountered invalid fd %d", bo->prime_fds[0]);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment