forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 19
[6.15] Switch ALL Novatek nt36672a based panels to common driver #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
minlexx
wants to merge
12
commits into
qcom-sdm660-6.15.y
Choose a base branch
from
alexeymin/6.15-novatek-tianma-panels
base: qcom-sdm660-6.15.y
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b5b6c39
to
ee6b473
Compare
barni2000
previously requested changes
May 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this driver naming the iovcc supply as vddio
a04cdbe
to
4298a2f
Compare
efa5eae
to
2116061
Compare
a6c8128
to
0685fd8
Compare
3e83c63
to
9a0feed
Compare
0685fd8
to
711a648
Compare
e1fff71
to
70f47ab
Compare
Use the new refcounted allocation API devm_drm_panel_alloc() to allocate the panel in place of devm_kzalloc(). Remove call to drm_panel_init() because it's part of devm_drm_panel_alloc(). Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
The driver was made with extensibility in mind, but it is not enough. In preparation for extending the driver with support for more panels, stop using arrays of nt36672a_panel_cmd, which incorrectly assumed that all panels have init sequences consisting of 2 bytes. This is not true for all panels using nt36672a controller. Instead, use dedicated init and shutdown functions for each panel. This allows for more flexibility, solving at least 2 problems: * different DSI commands length for different panels * different delays for msleep() calls for different panels Make it so that each panel can initialize the way it prefers. Combine init sequences in .on_cmds_1 and .on_cmds_2 into a new init finction, and code from .off_cmds to new off_cmds function. Struct nt36672a_panel_cmd and function nt36672a_send_cmds() are no longer needed, so remove them. While doing this, also switch to modern multi-api for sending commands, which greatly simplifies error handling using accumulated error counter. This refactoring change should have no functional effect on existing devices. Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Since this driver should represent not only devices manufactured by Tianma Micro-electronics, but also from other companies, it makes more sense to name it according to what driver file name already is: novatek. This does not change neither module file name nor Kconfig symbol, only driver identification in dmesg. This makes it possible to e.g. grep dmesg for "novatek" and get messages from both nt36672a-based panel and Novatek touchscreen. Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Add support for Tianma video mode panel based on nt36672a, used in Xiaomi Redmi Note 7 smartphone (xiaomi-lavender). Tianma panel is one of the 3 panel variants that you can find inside xiaomi-lavender. Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Add support for Tianma video mode panel based on nt36672a, used in Xiaomi Mi A2 smartphone (xiaomi-jasmine). It shares some code with already supported panel in this driver for xiaomi-lavender. Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Add support for Tianma video mode panel based on nt36672a, used in Xiaomi Redmi Note 6 Pro smartphone (xiaomi-tulip). It shares almost exactly the same init/off sequences with already supported panel in this driver for Redmi Note 7 (xiaomi-lavender). Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Add support for TXD video mode panel based on nt36672a, used in Asus Zenfone Max Pro M1 smartphone (asus-x00td). Signed-off-by: iAboothahir <aboothahirpkd@gmail.com>
711a648
to
17d37f6
Compare
use touch in follower mode Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
…smine) use touch in follower mode Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Sometimes Novatek touchscreen is paired together with Novatek panel, and they both need to be powered together in sync. Add support for nvt-ts driver to operate in panel follower mode, in which touchscreen isn't in full control of its lifecycle. This is managed using callbacks from panel, to get informed when the panel is powered on and off. From there we can match the nvt-ts device's power state to that of the panel. Without this probing touchscreen before panel sometimes randomly fails with I2C read errors. * split some code from probe function to separate initial_power_on function, which is called once from panel_prepared callback, or from probe function, depending on mode; * update Kconfig to depend on DRM. Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
17d37f6
to
0f5e5ed
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Start with lavender. Later add jasmine, tulip, maybe something else?
Fixes #70