Skip to content

media: iris: Enable iris video-codec support for Nord - #966

Open
gouravk-qualcomm wants to merge 5 commits into
qualcomm-linux:staging/nordfrom
gouravk-qualcomm:staging/nord
Open

media: iris: Enable iris video-codec support for Nord#966
gouravk-qualcomm wants to merge 5 commits into
qualcomm-linux:staging/nordfrom
gouravk-qualcomm:staging/nord

Conversation

@gouravk-qualcomm

Copy link
Copy Markdown

Nord shares its VPU silicon with Glymur, so rather than write a new
driver backend, this brings up Iris video encode/decode on Nord by
wiring the DT node to fall back onto Glymur's existing platform data,
patching the two gaps that surfaced along the way (a missing UBWC
config entry, and a firmware buffer-sizing quirk specific to Nord's
core-switching behavior), and enabling the node on the rrd and
ride-sx boards.

Signed-off-by: Gourav Kumar gouravk@qti.qualcomm.com

Add iris video-codec node to nord-embedded.dtsi with clocks, resets,
power-domains, IOMMU mappings and OPP table. List qcom,glymur-iris as
a fallback compatible so the node matches the existing glymur platform
data.

Signed-off-by: Priyanka Gujjula <pgujjula@qti.qualcomm.com>
Signed-off-by: Gourav Kumar <gouravk@qti.qualcomm.com>
Enable the iris video-codec node for the rrd and ride-sx boards, and
set firmware-name explicitly to the glymur video firmware since Nord
reuses glymur's firmware.

Signed-off-by: Priyanka Gujjula <pgujjula@qti.qualcomm.com>
Signed-off-by: Gourav Kumar <gouravk@qti.qualcomm.com>
Nord's iris node uses "qcom,nord-iris", "qcom,glymur-iris" as its
compatible list, reusing Glymur's iris data via the DT fallback
compatible. Add this combination in the schema alongside the
existing qcom,glymur-iris-only case.

Signed-off-by: Gourav Kumar <gouravk@qti.qualcomm.com>
Map qcom,nord to glymur_data in qcom_ubwc_configs[], since Nord
shares Glymur's UBWC capabilities.

Signed-off-by: Gourav Kumar <gouravk@qti.qualcomm.com>
On Nord, dynamic single-session core switching (F1) is enabled by
default in firmware, unlike Glymur where it is hardcoded off via a
SoC check. With F1 enabled, firmware reserves internal sub-allocations
out of the ARP buffer for both vcodec cores even for a single active
session (uBufferCount:2), so the buffer sized for one core's worth of
resources is exhausted mid-allocation and encoder session init fails:

  encSetInternalBuffers: uBufferCount:2
  VenusVencAllocFromInternalBuffer: ... buffer_size shrinks to 8192
  encSetInternalBuffers: TK: goto bailout
  VenusVencFWSessonInit: failed in internal buffer allocation
  venc_c2Start: Send HFI_CMD_START error response for port 0

Double the ARP buffer size for qcom,nord-iris so firmware has enough
room to reserve resources for both cores. This is a workaround until
firmware is fixed to not require double the ARP size for a single
active session.

Signed-off-by: Gourav Kumar <gouravk@qti.qualcomm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant