Git Product home page Git Product logo

Comments (2)

Miouyouyou avatar Miouyouyou commented on September 27, 2024

Well, in order :

  1. I don't think I'll maintain this code at the moment, as I'd like to rewrite another, based on the information I got from MPP and the V4L2 drivers.
  2. I haven't tested this code since the 4.15 and the only one that "did not crash with MPV" at least was the one in the "retry" branch.
  3. As stated by Tomasz Figa in your mail exchange, there's actually a v4l2 implementation of the VPU code, which I intend to salvage and reuse for a new driver.

I spent a lot (too much) time understanding how things worked with the current VPU code, since a lot of things are done using magic indices on a set of registers sent "as-is" by the MPP library, which in turn has the definition of the registers and what they're for.
I also spent too much time trying to understanding what this IOMMU code was doing in the DRM part of driver, while it was just setting up the VPU so that it can read the encoded frame from user memory, and write the decoded one into a buffer allocated by the DRM driver, through DMA operations. A lot of things, like DMA Scatter-Gather tables realignment to satisfy IOMMU alignment restrictions, are currently done manually based on code copy pasted from the kernel, with no real understanding of the issues, as reported to me on the #linux-rockchip IRC channel.

Since a few people, in the Armbian forums, have currently set up a "quick tutorial" on how to set up Armbian to get MPV and the VPU working with 4.4 kernel, I used that opportunity to start recompiling a MPP version with a bunch of logs, providing me the content of the registers sent to the driver, with their interpretation.
I still have to get a copy of the "before" and "after" buffers so that I can use them to generate automated tests, when writing the new driver.
I see that the Chromium team has prepared v4l2 user-space libraries to communicate with their v4l2. That should help testing and doing things "correctly".

The V4L2 driver ported to 4.4 kernel by the Rockchip team is available here :
https://github.com/rockchip-linux/kernel/tree/release-4.4/drivers/media/platform/rockchip-vpu

The most useful files being :
https://github.com/rockchip-linux/kernel/blob/release-4.4/drivers/media/platform/rockchip-vpu/rk3288_vpu_regs.h (Registers definitions)
https://github.com/rockchip-linux/kernel/blob/release-4.4/drivers/media/platform/rockchip-vpu/rk3288_vpu_hw_h264d.c (Registers use and setup for H264 decoding)
https://github.com/rockchip-linux/kernel/blob/release-4.4/drivers/media/platform/rockchip-vpu/rk3288_vpu_hw_vp8d.c (Registers use and setup for VP8 decoding)

from rockchip-vcodec.

Miouyouyou avatar Miouyouyou commented on September 27, 2024

Now, for the real issue, I have no idea why it didn't receive any "ack" from the right domain. If you do a dmesg | grep domain, do you get anything ?

from rockchip-vcodec.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.