Skip to content
Permalink
Branch: rk-vpu1-h264
Commits on May 10, 2019
  1. debug crap

    Boris Brezillon
    Boris Brezillon committed May 10, 2019
Commits on May 8, 2019
  1. Revert "DT VPU service"

    Boris Brezillon
    Boris Brezillon committed May 8, 2019
    This reverts commit 1cd8423.
  2. DT VPU service

    Boris Brezillon
    Boris Brezillon committed May 8, 2019
  3. WIP

    Boris Brezillon
    Boris Brezillon committed May 8, 2019
Commits on May 7, 2019
  1. soc: rockchip: power-domain: export idle request

    hizukiayaka authored and Boris Brezillon committed Jan 5, 2019
    We need to put the power status of HEVC IP into IDLE unless
    we can't reset that IP or the SoC would crash down.
    rockchip_pmu_idle_request(dev, true)---> enter idle
    rockchip_pmu_idle_request(dev, false)---> exit idle
    
    Signed-off-by: Caesar Wang <wxt@rock-chips.com>
    Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
    Signed-off-by: Randy Li <ayaka@soulik.info>
  2. traces

    Boris Brezillon
    Boris Brezillon committed May 7, 2019
  3. fixup! rockchip/vpu: rk3288 h264 WIP

    Boris Brezillon
    Boris Brezillon committed May 7, 2019
  4. clk: rockchip: Fix video codec clocks on rk3288

    dianders authored and Boris Brezillon committed Apr 11, 2019
    It appears that there is a typo in the rk3288 TRM.  For
    GRF_SOC_CON0[7] it says that 0 means "vepu" and 1 means "vdpu".  It's
    the other way around.
    
    How do I know?  Here's my evidence:
    
    1. Prior to commit 4d3e84f ("clk: rockchip: describe aclk_vcodec
       using the new muxgrf type on rk3288") we always pretended that we
       were using "aclk_vdpu" and the comment in the code said that this
       matched the default setting in the system.  In fact the default
       setting is 0 according to the TRM and according to reading memory
       at bootup.  In addition rk3288-based Chromebooks ran like this and
       the video codecs worked.
    2. With the existing clock code if you boot up and try to enable the
       new VIDEO_ROCKCHIP_VPU as a module (and without "clk_ignore_unused"
       on the command line), you get errors like "failed to get ack on
       domain 'pd_video', val=0x80208".  After flipping vepu/vdpu things
       init OK.
    3. If I export and add both the vepu and vdpu to the list of clocks
       for RK3288_PD_VIDEO I can get past the power domain errors, but now
       I freeze when the vpu_mmu gets initted.
    4. If I just mark the "vdpu" as IGNORE_UNUSED then everything boots up
       and probes OK showing that somehow the "vdpu" was important to keep
       enabled.  This is because we were actually using it as a parent.
    5. After this change I can hack "aclk_vcodec_pre" to parent from
       "aclk_vepu" using assigned-clocks and the video codec still probes
       OK.
    6. Rockchip has said so on the mailing list [1].
    
    ...so let's fix it.
    
    Let's also add CLK_SET_RATE_PARENT to "aclk_vcodec_pre" as suggested
    by Jonas Karlman.  Prior to the same commit you could do
    clk_set_rate() on "aclk_vcodec" and it would change "aclk_vdpu".
    That's because "aclk_vcodec" was a simple gate clock (always gets
    CLK_SET_RATE_PARENT) and its direct parent was "aclk_vdpu".  After
    that commit "aclk_vcodec_pre" gets in the way so we need to add
    CLK_SET_RATE_PARENT to it too.
    
    [1] https://lkml.kernel.org/r/1d17b015-9e17-34b9-baf8-c285dc1957aa@rock-chips.com
    
    Fixes: 4d3e84f ("clk: rockchip: describe aclk_vcodec using the new muxgrf type on rk3288")
    Suggested-by: Jonas Karlman <jonas@kwiboo.se>
    Suggested-by: Randy Li <ayaka@soulik.info>
    Signed-off-by: Douglas Anderson <dianders@chromium.org>
  5. lib: Add the sort_r() variant

    Boris Brezillon
    Boris Brezillon committed May 7, 2019
    Sometimes the compare function needs some context to compare 2 elements
    and the sort() function does not allow passing this private data which
    forces users to use a global variable (and the associated lock) to pass
    this context.
    
    Add a sort_r() variant to address this limitation.
    
    Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
  6. rockchip/vpu: rk3288 h264 WIP

    Boris Brezillon
    Boris Brezillon committed May 7, 2019
    Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Commits on May 3, 2019
  1. Revert "WIP: fix sizeimage check"

    Boris Brezillon
    Boris Brezillon committed May 3, 2019
    This reverts commit db4bd4447f245ffc9942be0bb7a474e0fdc1d6db.
  2. WIP: fix sizeimage check

    Boris Brezillon
    Boris Brezillon committed May 3, 2019
    Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
  3. DT changes

    Boris Brezillon
    Boris Brezillon committed Apr 22, 2019
  4. [WIP] rockchip/vpu: Add H264 decoding

    ezequielgarcia authored and Boris Brezillon committed Feb 1, 2019
    Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
  5. [WIP] media: Add H264 Parsed Annex B pixel format

    ezequielgarcia authored and Boris Brezillon committed Apr 17, 2019
    Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
  6. v4l: Add VP8 low-level decoder API controls.

    Pawel Osciak Boris Brezillon
    Pawel Osciak authored and Boris Brezillon committed Dec 26, 2014
    These controls are to be used with the new low-level decoder API for VP8
    to provide additional parameters for the hardware that cannot parse the
    input stream.
    
    Signed-off-by: Pawel Osciak <posciak@chromium.org>
    [ezequiel: rebased]
    Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
  7. media: cedrus: Add H264 decoding support

    mripard authored and Boris Brezillon committed Apr 11, 2019
    Introduce some basic H264 decoding support in cedrus. So far, only the
    baseline profile videos have been tested, and some more advanced features
    used in higher profiles are not even implemented.
    
    Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net>
    Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
    Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
  8. media: pixfmt: Add H264_SLICE_RAW format documentation

    mripard authored and Boris Brezillon committed Apr 11, 2019
    The H264_SLICE_RAW format introduced before is meant for stateless
    decoders that will need the H264 parsed slice data without the start code.
    
    Let's document it.
    
    Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
  9. media: pixfmt: Add H264 Slice format

    mripard authored and Boris Brezillon committed Apr 11, 2019
    The H264_SLICE_RAW format is meant to hold the parsed slice data without
    the start code. This will be needed by stateless decoders.
    
    Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
  10. media: uapi: Add H264 low-level decoder API compound controls.

    Pawel Osciak Boris Brezillon
    Pawel Osciak authored and Boris Brezillon committed Apr 11, 2019
    Stateless video codecs will require both the H264 metadata and slices in
    order to be able to decode frames.
    
    This introduces the definitions for the structures used to pass the
    metadata from the userspace to the kernel.
    
    Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
    Reviewed-by: Tomasz Figa <tfiga@chromium.org>
    Signed-off-by: Pawel Osciak <posciak@chromium.org>
    Signed-off-by: Guenter Roeck <groeck@chromium.org>
    Co-developed-by: Maxime Ripard <maxime.ripard@bootlin.com>
    Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
  11. log mpeg ctrls WIP

    Boris Brezillon
    Boris Brezillon committed Apr 25, 2019
    Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
  12. media: v4l2: Initialize mpeg slice controls

    Boris Brezillon
    Boris Brezillon committed Apr 25, 2019
    Make sure the default value at least passes the std_validate() tests.
    
    Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
  13. rockchip/vpu: Add support for MPEG-2 decoding on RK3288

    Kwiboo authored and Boris Brezillon committed Feb 7, 2019
    Add necessary bits to support MPEG2 decoding on RK3288.
    
    Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
    Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
    ---
    Changes from v4:
    * Stop including rockchip_vpu_common.h
    
    Changes from v3:
    * Coding style improvements (Jonas)
    * Use ALIGN() instead of div+shift (Jonas)
    
    Changes from v2:
    * New patch
  14. rockchip/vpu: Add MPEG2 decoding support to RK3399

    Kwiboo authored and Boris Brezillon committed Apr 23, 2019
    Add the necessary bits to support MPEG2 decoding on RK3399.
    
    Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
    Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
    ---
    Changes from v4:
    * Stop including rockchip_vpu_common.h
    
    Changes from v3:
    * New patch (was part of another patch before)
  15. rockchip/vpu: Add infra to support MPEG-2 decoding

    Kwiboo authored and Boris Brezillon committed Apr 12, 2019
    Only adds structs and helpers to allow supporting MPEG-2 decoding on
    rockchip SoCs. Support for RK3399 and RK3288 will be added in separate
    commits
    
    Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
    Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
    Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
    --
    Changes from v4:
    * Define rockchip_vpu_get_ctrl() and rockchip_vpu_get_ref() prototypes
      in rockchip_vpu.h
    
    Changes from v3:
    * Coding style improvements (Jonas)
    * Move RK3399 support in a separate commit
    
    Changes from v2:
    * Remove uneeded check from rockchip_vpu_get_ctrl.
    * Use user negotiated resolution when programming the hardware.
  16. rockchip/vpu: Add support for non-standard controls

    ezequielgarcia authored and Boris Brezillon committed Dec 17, 2018
    Rework the way controls are registered by the driver,
    so it can support non-standard controls, such as those
    used by stateless codecs.
    
    Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
    Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
    --
    Changes from v4:
    * Remove unused var in rockchip_vpu_ctrls_setup()
    
    Changes from v3:
    * None
    
    Changes from v2:
    * Got rid of unused ctrls related fields.
    * Removed unndeeded is_std internal field.
  17. rockchip/vpu: Add decoder boilerplate

    ezequielgarcia authored and Boris Brezillon committed Apr 17, 2019
    This commit adds the needed boilerplate code to support the VPU
    in decoding operation. Two v4l2 interfaces are exposed, one for
    encoding and one for decoding, but a single m2m device is shared
    by them, so jobs are properly serialized.
    
    Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
    Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
    --
    Changes from v4:
    * Remove vpu_common.h inclusion
    * Set ->requires_requests from s_fmt() instead of fixing it at queue
      creation time (suggested by Hans)
    
    Changes from v3:
    * Update things according to changes done in the patch introducing
      custom media controller support (Boris)
    * Move the rk3399 vdpu irq definition in the commit introducing
      MPGEG2 support on rk3399
    * Fix media controller deregistration code (Jonas)
    
    Changes from v2:
    * Use the common vb2/v4l2 implementation
    * Use strscpy instead of strlcpy.
    * Abstract vidioc v4l2 api implementations into generic code, creating
      helpers that can be used by the encoder and the decoder.
    * Only prevent S_FMT on the coded format queue, if the peer queue has buffers allocated.
    * Refactor the code, adding a buf_finish callback to rockchip_vpu_ctx.
      With this change, is_enc field is not needed.
    * Separate OUTPUT and CAPTURE queue ops (vb2_ops), and create common helpers that
      can be used by both.
    * Pass a no kernel mapping attribute on both ends of the decoder.
  18. rockchip/vpu: Prepare things to support decoders

    Boris Brezillon
    Boris Brezillon committed Apr 19, 2019
    The code in rockchip_vpu_v4l2 was hardcoded for encoder support.
    Modify it more generic to support the decoder case so that we can
    re-use the same vb2/v4l2 ops for both devices.
    
    Co-developed-by: Ezequiel Garcia <ezequiel@collabora.com>
    Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
    Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
    ---
    Changes from v4:
    * Fix s_fmt() implems WRT to format properties propagation
    * s/fmt->pix/fmt->pix_mp/ in try_fmt() (Reported by Hans)
    
    Changes from v3:
    * None
    
    Changes from v2:
    * New patch
  19. rockchip/vpu: Provide a helper to reset both src and dst formats

    Boris Brezillon
    Boris Brezillon committed Apr 19, 2019
    When initializing a context, the core wants to reset both src and dst
    formats. Right now the order doesn't matter, but if we want to have a
    valid default width/height on the non-coded/raw format side (src in
    case of encoders, dst in case of decoders), we need to reset those
    formats in the right order: first the coded-format side, then the other,
    such that width and height on the raw format side can be taken from
    the coded format.
    
    Let's provide a helper that will reset both formats and make sure this
    is done in the right order.
    
    Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
    ---
    Changes from v2:
    * None
    
    Changes from v2:
    * New patch
  20. rockchip/vpu: Move encoder logic to a common place

    Boris Brezillon
    Boris Brezillon committed Apr 19, 2019
    The V4L2/VB2 implementation for the encoder and decoder logic are very
    similar, so let's rename rockchip_vpu_enc.c file into
    rockchip_vpu_v4l2.c and remove the _enc_ part in objects/functions
    exposed in rockchip_vpu_v4l2.h. We also rename the enc_queue_init()
    function (in rockchip_vpu_drv.c) queue_init() since it will be used
    to initialize both type of queues.
    
    The implementation itself will be patched to support the decoding case
    when decoder support is added.
    
    Suggested-by: Ezequiel Garcia <ezequiel@collabora.com>
    Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
    ---
    Changes from v3:
    * None
    
    Changes from v2:
    * New patch
  21. rockchip/vpu: Rename rockchip_vpu_common.h into rockchip_vpu_v4l2.h

    Boris Brezillon
    Boris Brezillon committed Apr 17, 2019
    We're about to add prototypes for the vb2/v4l2 helpers shared by the
    encoder/decoder logic in this file, so let's pick a name that reflects
    that (rockchip_vpu_common.h was a bit to generic).
    
    Suggested-by: Ezequiel Garcia <ezequiel@collabora.com>
    Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
    ---
    Changes from v3:
    * None
    
    Changes from v2:
    * New patch
  22. rockchip/vpu: Support the Request API

    ezequielgarcia authored and Boris Brezillon committed Jan 17, 2019
    Introduce support for the Request API. Although the JPEG encoder
    does not mandate using the Request API, it's perfectly possible to
    use it, if the application wants to.
    
    Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
    Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
    --
    Changes from v3:
    * None
    
    Changes from v2:
    * Drop unrelated mdev.bus_info changes.
    * Remove the get_ref and get_ctrl helpers as they are not used yet.
  23. rockchip/vpu: Open-code media controller register

    ezequielgarcia authored and Boris Brezillon committed Jan 25, 2019
    In preparation to support decoders, using a single memory-to-memory
    device, we need to roll our own media controller entities registration.
    
    To do that, we define a rockchip_vpu_func object that embeds the
    video_device object plus all the elements that are needed to attach this
    vdev to the media device.
    
    Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
    Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
    --
    Changes from v3:
    * Rework the media controller registration logic (Boris)
    * Fix media controller deregistration (Jonas)
    
    Changes from v2:
    * Use kvasprintf instead of kmalloc and snprintf.
    * Fix missing kfree in error paths.
    * Remove unneeded media_remove_intf_links on error paths.
  24. rockchip/vpu: Use v4l2_apply_frmsize_constraints() where appropriate

    Boris Brezillon
    Boris Brezillon committed Apr 29, 2019
    Use the v4l2_apply_frmsize_constraints() helper instead of open-coding
    it.
    
    Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
    ---
    Changes in v5:
    * New patch
  25. media: v4l2-common: Support custom imagesize/bytesperline in fill_pix…

    Boris Brezillon
    Boris Brezillon committed Apr 29, 2019
    …fmt()
    
    Users can define custom sizeimage and bytesperline as long as they're
    big enough to store the amount of pixels required for a specific
    width/height under a specific format. Avoid overriding those fields in
    this case.
    
    Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
    ---
    Hello Hans,
    
    The sizeimage/bytesperline check on !MPLANE formats is still not 100%
    sure, as custom bytesperline might induce bigger sizeimage than what
    we calculate.
    
    I tried implementing something smarter taking the per-component plane
    bpp + hdiv param as we discussed the other day but decided to step
    back after realizing the per-component plane macro block might also
    differ at least in theory (not sure that's true in practice) and that
    has an impact on bytesperline too.
    
    Let me know how you want to handle that case.
    
    Regards,
    
    Boris
    
    Changes in v5:
    * New patch
Older
You can’t perform that action at this time.