Skip to content

Glymur support - #136

Open
bvisredd wants to merge 10 commits into
qualcomm-linux:video.qclinux.mainfrom
bvisredd:glymur_support
Open

Glymur support#136
bvisredd wants to merge 10 commits into
qualcomm-linux:video.qclinux.mainfrom
bvisredd:glymur_support

Conversation

@bvisredd

Copy link
Copy Markdown

Add glymur support, fix green line issue on rotated output and fix downscale support.

Vishnu Reddy added 10 commits July 29, 2026 09:06
On platforms with two video codec cores, select the hardware core for
a new session based on the current Macroblocks Per Frame (MBPF) and
Macroblocks Per Second (MBPS) load on each core. The selected core is
communicated to the firmware via the HFI_PROP_CORE_ID property at
stream-on time.

Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
Glymur has two video codec cores, VCODEC0 and VCODEC1. Add power-on and
power-off sequences for the glymur controller and each vcodec core, along
with register definitions needed to control and check per vcodec core
power state.

Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
Glymur platform has two video codec cores: vcodec0 and vcodec1. Both
cores share a common clock source (video_cc_mvs0_clk_src) and the same
power rails. The clock dividers between the source and the branch clocks
are fixed. So when both cores are running, the source clock always runs
at the highest frequency requested by either core.
Since both cores share the same power rails, the power corner cannot be
voted independently. Scaling one core's power corner up or down would
directly affect the other, leading to under or over-voting.
For these reasons, both cores should voted the clock and power rail must
be based on the workload of both cores.

Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
Glymur requires the firmware memory region IOVA to be passed to
qcom_scm_mem_protect_video_var function along with other video memory
regions so it can set the correct access permissions for the firmware
memory during video firmware initialization.

Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
Register the "qcom,glymur-iris" compatible string so that driver can
match and initialize glymur devices during probe.

Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
Add the vendor specific platform configuration required by the video
driver for glymur targets, including hardware capabilities, resource
definitions, format mappings, and platform initialization hooks.

Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
Add the mainline specific platform configuration required by the video
driver for glymur targets, including hardware capabilities, resource
definitions, format mappings, and platform initialization hooks.

Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
Add the glymur platform and iris36 variant source files and include
paths to the Kbuild so the driver can be built with glymur support.

Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
The dt-bindings headers <dt-bindings/clock/qcom,glymur-videocc.h>
and <dt-bindings/clock/qcom,glymur-gcc.h> should be present in the
kernel trees to build the video driver for glymur support. If it is not
available any kernel like linux-yocto based trees. Then the build will
fail.  Add a build-time probe in video/Kbuild that tests for the header
and, when found, passes -DMSM_VIDC_HAS_GLYMUR_GCC_VIDEOCC=1 to compiler.
Guard the include of that header and the clock-table entries whose
initialiser values are defined exclusively by it with the same macro.
Also guard the qcom,glymur-iris entry in msm_vidc_dt_match[] so
that the kernel does not associate the driver with the glymur device
at all on kernels where the header is absent.

Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
The driver currently aligns input dimensions before programming them to
the encoder firmware. The firmware does not require aligned input
resolutions, and using aligned values can result in a green line being
visible on the right side of rotated output frames.

Remove the input dimension alignment and program the actual configured
resolution to the firmware to avoid the artifact.

Additionally, output resolution handling relies on compose dimensions.
The compose rectangle can be updated through format, crop, and selection
operations, but output format updates do not refresh the compose values.
As a result, the final output resolution may be derived from stale
compose dimensions, causing requested output resolutions to be ignored
and preventing downscaling from working.

Keep compose and format dimensions synchronized across format, crop, and
compose operations so that output resolution changes are applied
correctly and downscaling works as expected.

Signed-off-by: Vishnu Reddy <busanna.reddy@oss.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