Skip to content

Conversation

hasiburr-qti
Copy link

No description provided.

Dikshita Agarwal and others added 30 commits August 11, 2025 12:04
Update the vbuf flags appropriately in error cases before calling
v4l2_m2m_buf_done(). Previously, the flag update was skippied in error
scenario, which could result in incorrect state reporting for buffers.

Link: https://lore.kernel.org/linux-media/[email protected]/
Fixes: 17f2a48 ("media: iris: implement vb2 ops for buf_queue and firmware response")
Signed-off-by: Dikshita Agarwal <[email protected]>
For HFI Gen1, the instances substate is changed to LOAD_RESOURCES only
when a START command is issues to the firmware. If STOP is called
without a prior START, the firmware may reject the command and throw
some erros.
Handle this by adding a substate check before issuing STOP command to
the firmware.

Link: https://lore.kernel.org/linux-media/[email protected]/
Fixes: 11712ce ("media: iris: implement vb2 streaming ops")
Signed-off-by: Dikshita Agarwal <[email protected]>
…g drain

Firmware can handle a dummy address for buffers with the EOS flag. To
ensure consistent behavior across all codecs, update the drain
command to always send a dummy buffer address.

This makes the drain handling uniform and avoids any codec specific
assumptions.

Link: https://lore.kernel.org/linux-media/[email protected]/
Fixes: 478c447 ("media: iris: Add codec specific check for VP9 decoder drain handling")
Signed-off-by: Dikshita Agarwal <[email protected]>
Improve drain handling by ensuring the LAST flag is attached to final
capture buffer when drain response is received from the firmware.

Previously, the driver failed to attach the V4L2_BUF_FLAG_LAST flag when
a drain response was received from the firmware, relying on userspace to
mark the next queued buffer as LAST. This update fixes the issue by
checking the pending drain status, attaching the LAST flag to the
capture buffer received from the firmware (with EOS attached), and
returning it to the V4L2 layer correctly.

Link: https://lore.kernel.org/linux-media/[email protected]/
Fixes: d091007 ("media: iris: add support for drain sequence")
Signed-off-by: Dikshita Agarwal <[email protected]>
Add support for registering a V4L2 encoder video device to the iris
driver. The encoder device is registered with the name
"qcom-iris-encoder".

Link: https://lore.kernel.org/linux-media/[email protected]/
Signed-off-by: Dikshita Agarwal <[email protected]>
…tructure

Introduce initialization and deinitialization for internal encoder
instance structure with necessary hooks.

Link: https://lore.kernel.org/linux-media/[email protected]/
Signed-off-by: Dikshita Agarwal <[email protected]>
Add V4L2 format handling support for the encoder by adding
implementation of ENUM/S/G/TRY_FMT with necessary hooks.

This ensures that the encoder supports format negotiation consistent
with V4L2 expectation, enabling userspace applications to configure
resolution, pixel format and buffer layout properly.

Link: https://lore.kernel.org/linux-media/[email protected]/
Signed-off-by: Dikshita Agarwal <[email protected]>
… for encoder

Add support for frame size and frame interval enumeration by
implementing ENUM_FRAMESIZES/FRAMEINTERVALS V4L2 ioctls for encoder
video device with necessary hooks.

This allows userspace application to query encoder capabilities and
adapt encoding configurations accordingly.

Link: https://lore.kernel.org/linux-media/[email protected]/
Signed-off-by: Dikshita Agarwal <[email protected]>
…deo device

Add support for the VIDIOC_QUERYCAP V4L2 iocts for the encoder video
device to report core driver capabilities.

Link: https://lore.kernel.org/linux-media/[email protected]/
Signed-off-by: Dikshita Agarwal <[email protected]>
Implement support for V4L2 event subscription on the encoder device by
handling the SUBSCRIBE_EVENT and UNSUBSCRIBE_EVENT ioctls with the
necessary hooks.

This enables userspace applications to subscribe to V4L2 events,
allowing asynchronous notification mechanisms.

Link: https://lore.kernel.org/linux-media/[email protected]/
Signed-off-by: Dikshita Agarwal <[email protected]>
…o device

Add support for G/S_SELECTION V4L2 ioctls for the encoder video
device with necessary hooks. This allows userspace to query and
configure rectangular selection areas such as crop.

Link: https://lore.kernel.org/linux-media/[email protected]/
Signed-off-by: Dikshita Agarwal <[email protected]>
Add supports for the G/S_PARM V4L2 ioctls for encoder video device with
necessary hooks. This allows userspace to query the current streaming
parameters such as frame intervals and set desired streaming parameters
primarily the frame rate.

Link: https://lore.kernel.org/linux-media/[email protected]/
Signed-off-by: Dikshita Agarwal <[email protected]>
… video device

Add platform-specific capabilities for the encoder video device and
initialize the corresponding controls in the control handler.

This enables proper configuration and handling of encoder-specific
features based on platform requirements.

Link: https://lore.kernel.org/linux-media/[email protected]/
Signed-off-by: Dikshita Agarwal <[email protected]>
…evice

Add support for V4L2 streaming operations on the encoder video device.
During stream-on, configure mandatory properties on the respective
planes and notify the firmware to initiate an encode session.

Link: https://lore.kernel.org/linux-media/[email protected]/
Signed-off-by: Dikshita Agarwal <[email protected]>
…der video device

Initialize and configure platform-specific capabilities for the encoder
in the firmware during stream-on, to tailor encoding behavior to the
current session's requirements. Some of these capabilities can also be
updated dynamically when V4L2 controls are modified by the client after
stream-on.

Link: https://lore.kernel.org/linux-media/[email protected]/
Signed-off-by: Dikshita Agarwal <[email protected]>
…r video device

Add support for allocating and queuing internal buffers required by the
encoder. The sizes of these buffers are derived from hardware
specifications and are essential to meet the encoder's functional and
performance requirements.

These buffers are not exposed to userspace; they are allocated and
managed internally to ensure correct and efficient hardware operation.

Link: https://lore.kernel.org/linux-media/[email protected]/
Signed-off-by: Dikshita Agarwal <[email protected]>
…ncoder device

Implement support for queuing and dequeuing input and output buffers
for the encoder video device using the appropriate V4L2 buffer
management ioctls.

This enables userspace applications to manage streaming buffers
required for encoding operations.

Link: https://lore.kernel.org/linux-media/[email protected]/
Signed-off-by: Dikshita Agarwal <[email protected]>
…o device

Add support for handling start and stop commands, including the
end-of-stream (drain) sequence, in the encoder video device.

This enables proper signaling to the firmware and ensures that all
pending frames are processed and flushed before completing the stream.

Link: https://lore.kernel.org/linux-media/[email protected]/
Signed-off-by: Dikshita Agarwal <[email protected]>
Firmware that doesn't provide section headers leave both e_shentsize and
e_shnum 0, which obvious isn't compatible with the newly introduced
stricter checks.

Make the section-related checks conditional on either of these values
being non-zero.

Link: https://lore.kernel.org/r/20250730-mdt-loader-shentsize-zero-v1-1-04f43186229c@oss.qualcomm.com
Fixes: 9f9967f ("soc: qcom: mdt_loader: Ensure we don't read past the ELF header")
Reported-by: Val Packett <[email protected]>
Closes: https://lore.kernel.org/all/[email protected]/
Reported-by: Neil Armstrong <[email protected]>
Closes: https://lore.kernel.org/all/[email protected]/
Signed-off-by: Bjorn Andersson <[email protected]>
Document compatible for cpufreq hardware on Qualcomm QCS615 platform.

Signed-off-by: Taniya Das <[email protected]>
Acked-by: Krzysztof Kozlowski <[email protected]>
Link: https://lore.kernel.org/linux-arm-msm/[email protected]/
Signed-off-by: Dongfang Zhao <[email protected]>
Add a device tree binding for the Toshiba TC9563 PCIe switch, which
provides an Ethernet MAC integrated to the 3rd downstream port and
two downstream PCIe ports.

Link: https://lore.kernel.org/lkml/[email protected]/
Signed-off-by: Krishna Chaitanya Chundru <[email protected]>
Reviewed-by: Rob Herring (Arm) <[email protected]>
First controller driver probes, enables link training and scans the
bus. When the PCI bridge is found, its child DT nodes will be scanned
and pwrctrl devices will be created if needed. By the time pwrctrl
driver probe gets called link training is already enabled by controller
driver.

Certain devices like TC956x which uses PCI pwrctl framework needs to
configure the device before PCI link is up.

As the controller driver already enables link training as part of
its probe, the moment device is powered on, controller and device
participates in the link training and link can come up immediately
and maynot have time to configure the device.

So we need to stop the link training by using stop_link() and enable
them back after device is configured by using start_link().

Link: https://lore.kernel.org/lkml/[email protected]/
Signed-off-by: Krishna Chaitanya Chundru <[email protected]>
…or dwc glue drivers

Add host_start_link() and host_stop_link() functions to dwc glue drivers to
register with start_link() and stop_link() of pci ops, allowing for better
control over the link initialization and shutdown process.

Link: https://lore.kernel.org/lkml/[email protected]/
Signed-off-by: Krishna Chaitanya Chundru <[email protected]>
Implement stop_link() and  start_link() function op for dwc drivers.

Link: https://lore.kernel.org/lkml/[email protected]/
Signed-off-by: Krishna Chaitanya Chundru <[email protected]>
…nk()

Add support for host_stop_link() and host_start_link() for switches like
TC956x, which require configuration before the PCIe link is established.

Assert PERST# and disable LTSSM bit to prevent the PCIe controller from
participating in link training during host_stop_link(). De-assert PERST#
and enable LTSSM bit during host_start_link().

Introduce ltssm_disable function op to stop link training.
For the switches like TC956x, which needs to configure it before
the PCIe link is established.

Link: https://lore.kernel.org/lkml/[email protected]/
Signed-off-by: Krishna Chaitanya Chundru <[email protected]>
…e link is active

Introduce a common API to check if the PCIe link is active, replacing
duplicate code in multiple locations.

Link: https://lore.kernel.org/lkml/[email protected]/
Signed-off-by: Krishna Chaitanya Chundru <[email protected]>
Reviewed-by: Lukas Wunner <[email protected]>
TC9563 is a PCIe switch which has one upstream and three downstream
ports. To one of the downstream ports ethernet MAC is connected as endpoint
device. Other two downstream ports are supposed to connect to external
device. One Host can connect to TC9563 by upstream port. TC9563 switch
needs to be configured after powering on and before PCIe link was up.

The PCIe controller driver already enables link training at the host side
even before this driver probe happens, due to this when driver enables
power to the switch it participates in the link training and PCIe link
may come up before configuring the switch through i2c. Once the link is
up the configuration done through i2c will not have any affect.To prevent
the host from participating in link training, disable link training on the
host side to ensure the link does not come up before the switch is
configured via I2C.

Based up on dt property and type of the port, tc9563 is configured
through i2c.

Link: https://lore.kernel.org/lkml/[email protected]/
Signed-off-by: Krishna Chaitanya Chundru <[email protected]>
Reviewed-by: Bjorn Andersson <[email protected]>
Reviewed-by: Bartosz Golaszewski <[email protected]>
A TEE driver doesn't always need to provide a pool if it doesn't
support memory sharing ioctls and can allocate memory for TEE
messages in another way. Although this is mentioned in the
documentation for tee_device_alloc(), it is not handled correctly.

Reviewed-by: Sumit Garg <[email protected]>
Signed-off-by: Amirreza Zarrabi <[email protected]>
Link: https://lore.kernel.org/all/20250713-qcom-tee-using-tee-ss-without-mem-obj-v6-1-697fb7d41c36@oss.qualcomm.com/
The tee_context can be used to manage TEE user resources, including
those allocated by the driver for the TEE on behalf of the user.
The release() callback is invoked only when all resources, such as
tee_shm, are released and there are no references to the tee_context.

When a user closes the device file, the driver should notify the
TEE to release any resources it may hold and drop the context
references. To achieve this, a close_context() callback is
introduced to initiate resource release in the TEE driver when
the device file is closed.

Relocate teedev_ctx_get, teedev_ctx_put, tee_device_get, and
tee_device_get functions to tee_core.h to make them accessible
outside the TEE subsystem.

Reviewed-by: Sumit Garg <[email protected]>
Tested-by: Neil Armstrong <[email protected]>
Tested-by: Harshal Dev <[email protected]>
Signed-off-by: Amirreza Zarrabi <[email protected]>
Link: https://lore.kernel.org/all/20250713-qcom-tee-using-tee-ss-without-mem-obj-v6-2-697fb7d41c36@oss.qualcomm.com/
For drivers that can transfer data to the TEE without using shared
memory from client, it is necessary to receive the user address
directly, bypassing any processing by the TEE subsystem. Introduce
TEE_IOCTL_PARAM_ATTR_TYPE_UBUF_INPUT/OUTPUT/INOUT to represent
userspace buffers.

Reviewed-by: Sumit Garg <[email protected]>
Tested-by: Neil Armstrong <[email protected]>
Tested-by: Harshal Dev <[email protected]>
Signed-off-by: Amirreza Zarrabi <[email protected]>
Link: https://lore.kernel.org/all/20250713-qcom-tee-using-tee-ss-without-mem-obj-v6-3-697fb7d41c36@oss.qualcomm.com/
sgaud-quic and others added 26 commits September 24, 2025 14:58
# Conflicts:
#	arch/arm64/boot/dts/qcom/Makefile
# Conflicts:
#	Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
Adding merge log file and topic_SHA1 file

Signed-off-by: Salendarsingh Gaud <[email protected]>
….org/pub/scm/linux/kernel/git/torvalds/linux.git

tech/bsp/clk fe2e403 1
tech/security/firmware-smc 5141424 23
tech/bsp/soc-infra 9a5ba34 1
tech/bsp/remoteproc 1dea0b5 1
tech/bus/peripherals 71488c8 5
tech/bus/pci/all 709a25b 1
tech/bus/pci/pwrctl 22d1ad3 7
tech/debug/eud eb36d9d 1
tech/debug/hwtracing e06716b 22
tech/mm/audio/all bd743b3 9
tech/mm/drm dac980f 5
tech/mm/fastrpc adfe2ea 15
tech/mm/video 4449558 25
tech/net/bluetooth b5902f2 2
tech/pm/power 27953b2 6
tech/security/ice 9a1a01d 1
tech/all/dt/qcs6490 5f903d3 14
tech/all/dt/qcs9100 c923eb9 30
tech/all/dt/qcs8300 86c8c4c 12
tech/all/dt/qcs615 3c039c8 20
tech/all/dt/hamoa 756cf76 24
tech/all/config ebc9af8 6
tech/mm/gpu d62e8b2 5
Signed-off-by: Hasibur Rahman Mohammed <[email protected]>
@qcomlnxci
Copy link

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.