media: phytium: update phytium media controller driver support to 6.6.0.4#1702
media: phytium: update phytium media controller driver support to 6.6.0.4#1702wangchenlu2236 wants to merge 3 commits into
Conversation
MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The BMC KVM Web UI must display a 'No Signal' status from the moment a host is powered on until its VGA monitor is activated. As the previous implementation did not perform reliably on certain platform, this new solution has been adopted to resolve these known issues. Mainline: Open-Source Signed-off-by: Wang Min <wangmin@phytium.com.cn> Signed-off-by: Wang Yinfeng <wangyinfeng@phytium.com.cn> Signed-off-by:Wang Chenlu <wangchenlu2236@phytium.com.cn>
This driver is exclusively for the PHYTIUM platform and is not compatible with other SoCs. This restriction prevents errors on unsupported platform. Mainline: Open-Source Signed-off-by: Wang Min <wangmin@phytium.com.cn> Signed-off-by: Wang Yinfeng <wangyinfeng@phytium.com.cn> Signed-off-by:Wang Chenlu <wangchenlu2236@phytium.com.cn>
The previous delay is so long that it interferes with the proper operation of the switch resolution. This incorrect operation would occasionally cause the BMC to hang. Mainline: Open-Source Signed-off-by: Wang Min <wangmin@phytium.com.cn> Signed-off-by: Wang Yinfeng <wangyinfeng@phytium.com.cn> Signed-off-by: Wang Chenlu <wangchenlu2236@phytium.com.cn>
Reviewer's GuideUpdates the Phytium JPEG media controller driver’s signal-detection and resolution-change handling by using a dedicated buffer register as a host power/signal state flag, adding host power-off tracking, and reducing resolution change latency, while removing an unnecessary power-off delay and performing small cleanups. Sequence diagram for updated signal and resolution detection in Phytium JPEG driversequenceDiagram
participant resolution_work as phytium_jpeg_resolution_work
participant jpeg_dev as phytium_jpeg_dev
participant BUF_LAST_reg as BUF_LIST_INDEX_ADDR_VB_BUF_LAST
resolution_work->>jpeg_dev: phytium_jpeg_init_regs(jpeg_dev)
resolution_work->>BUF_LAST_reg: phytium_jpeg_write(jpeg_dev, BUF_LIST_INDEX_ADDR(VB_BUF_LAST), HAVE_SIGNAL)
resolution_work->>jpeg_dev: phytium_jpeg_get_resolution(jpeg_dev)
activate jpeg_dev
jpeg_dev->>BUF_LAST_reg: phytium_jpeg_read(jpeg_dev, BUF_LIST_INDEX_ADDR(VB_BUF_LAST))
Note over jpeg_dev,BUF_LAST_reg: input_signal read from VB_BUF_LAST
alt [input_signal == HOST_POWER_OFF]
jpeg_dev-->jpeg_dev: once_poweroff = true
else [jpeg_dev->once_poweroff == false]
jpeg_dev->>BUF_LAST_reg: phytium_jpeg_write(jpeg_dev, BUF_LIST_INDEX_ADDR(VB_BUF_LAST), HAVE_SIGNAL)
jpeg_dev-->jpeg_dev: v4l2_input_status may be cleared
else [input_signal == HOST_POWER_ON]
jpeg_dev-->jpeg_dev: v4l2_input_status = V4L2_IN_ST_NO_SIGNAL
else [input_signal == HAVE_SIGNAL and width * height != 0]
jpeg_dev-->jpeg_dev: detected_timings.width/height updated
jpeg_dev-->jpeg_dev: v4l2_input_status = 0
end
deactivate jpeg_dev
%% Query path using the same flag
participant file as file
file->>jpeg_dev: phytium_jpeg_query_dv_timings(file, priv, timings)
activate jpeg_dev
jpeg_dev->>BUF_LAST_reg: phytium_jpeg_read(jpeg_dev, BUF_LIST_INDEX_ADDR(VB_BUF_LAST))
alt [input_signal != HAVE_SIGNAL]
jpeg_dev-->jpeg_dev: v4l2_input_status = V4L2_IN_ST_NO_SIGNAL
end
jpeg_dev-->file: return (v4l2_input_status ? -ENOLINK : 0)
deactivate jpeg_dev
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Hi @wangchenlu2236. Thanks for your PR. I'm waiting for a deepin-community member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
There was a problem hiding this comment.
Pull request overview
Updates the Phytium JPEG media controller driver to better detect host power state and signal presence on KVM, reduce resolution switch latency, and restrict the driver to Phytium platforms.
Changes:
- Use the last buffer-list address register as a marker to distinguish host-power-off, host-power-on/no-signal, and have-signal states; updates
phytium_jpeg_get_resolutionandphytium_jpeg_query_dv_timingsaccordingly. - Reduce
RESOLUTION_CHANGE_DELAYfrom 250ms to 150ms and drop the 50ms delay inphytium_jpeg_off. - Add
ARCH_PHYTIUMdependency in Kconfig.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| drivers/media/platform/phytium/phytium_jpeg_core.h | New marker macros (HAVE_SIGNAL/HOST_POWER_ON/OFF, VB_BUF_LAST), reduced resolution change delay, new once_poweroff flag |
| drivers/media/platform/phytium/phytium_jpeg_core.c | Power/signal detection via buffer-list register; init/restore signal marker; remove mdelay in jpeg_off |
| drivers/media/platform/phytium/Kconfig | Restrict driver build to ARCH_PHYTIUM |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The new
once_poweroffstate is read/modified from both the resolution workqueue and the resolution/query paths; consider whether this needs explicit locking or atomic access to avoid races between host power transitions and signal detection. - Using
BUF_LIST_INDEX_ADDR(VB_BUF_LAST)as an out-of-band host power/signal marker is subtle; it may be worth centralizing the marker read/write logic in small helper functions so future changes don’t accidentally reuse that buffer index for data.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The new `once_poweroff` state is read/modified from both the resolution workqueue and the resolution/query paths; consider whether this needs explicit locking or atomic access to avoid races between host power transitions and signal detection.
- Using `BUF_LIST_INDEX_ADDR(VB_BUF_LAST)` as an out-of-band host power/signal marker is subtle; it may be worth centralizing the marker read/write logic in small helper functions so future changes don’t accidentally reuse that buffer index for data.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
/ok-to-test |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Avenger-285714 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This patches updates the support for phytium media controller driver.
1.media:phytium-jpeg: Redesign the feature of diplaying 'No Signal' on KVM
2.media: phytium-jpeg: Restricted adaptation platform for jpeg driver
3.media: phytium-jpeg: Reduce switch resolution latency
Summary by Sourcery
Improve Phytium JPEG media controller handling of input signal and host power state during resolution detection and switching.
Bug Fixes:
Enhancements: