kmscapture: fix v4l buftype
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 2 Oct 2017 08:55:52 +0000 (11:55 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 3 Oct 2017 09:33:14 +0000 (12:33 +0300)
utils/kmscapture.cpp

index 43ef9899dd9d3de313834c6cf0bffef7c7608a7b..c72d38c324db132103a2231b90a317f74b755e14 100644 (file)
@@ -76,19 +76,15 @@ ExtFramebuffer* CameraPipeline::GetExtFrameBuffer(Card& card, uint32_t i, PixelF
        r = buffer_export(m_fd, V4L2_BUF_TYPE_VIDEO_CAPTURE, i, &dmafd);
        ASSERT(r == 0);
 
-       uint32_t handle;
-       r = drmPrimeFDToHandle(card.fd(), dmafd, &handle);
-       ASSERT(r == 0);
-
        const PixelFormatInfo& format_info = get_pixel_format_info(pixfmt);
        ASSERT(format_info.num_planes == 1);
 
-       vector<uint32_t> handles { handle };
+       vector<int> fds { dmafd };
        vector<uint32_t> pitches { m_in_width * (format_info.planes[0].bitspp / 8) };
-       vector<uint32_t> offsets { };
+       vector<uint32_t> offsets { };
 
        return new ExtFramebuffer(card, m_in_width, m_in_height, pixfmt,
-                                 handles, pitches, offsets);
+                                 fds, pitches, offsets);
 }
 
 bool inline better_size(struct v4l2_frmsize_discrete* v4ldisc,