Commit Graph

649619 Commits

Author SHA1 Message Date
Cao Jian
479ffdf842 gdc: add a probed flag to avoid crash [1/1]
PD#SWPL-29848

Problem:
on platforms which GDC are not supported
if create_gdc_work_queue is invoked
a crash occurs

Solution:
add a probed flag to avoid crash
add a interface is_gdc_supported to query

Verify:
g12b/tm2

Change-Id: I65b88294822d8a2c7429d375039fee962b9612aa
Signed-off-by: Cao Jian <jian.cao@amlogic.com>
2023-04-21 13:52:33 +09:00
Cao Jian
dfd7a2da8e gdc: support phy addr configuration [1/1]
PD#SWPL-15157

Problem:
GDC Driver Support physical address configuration

Solution:
add this support

Verify:
verified on g12b

Change-Id: I8aee517a13bb2a65c021279cc3b54bd9861fc20c
Signed-off-by: Cao Jian <jian.cao@amlogic.com>
2023-04-21 13:52:33 +09:00
hang cheng
3cdb821e1b hdmitx: double confirm the ACR packet is enabled [1/1]
PD#SWPL-34731

Problem:
the ACR packet is not enabled with very low probability

Solution:
double confirm the ACR packet is enabled
simultaneously with audio sample packet

Verify:
AC214

Signed-off-by: hang cheng <hang.cheng@amlogic.com>
Change-Id: Ie7a142a739f8928b34dd1904176786f8664d6f18
2023-04-21 13:52:33 +09:00
renjiang.han
49eba5bef4 ppmgr: rotate to exit with garbage. [1/1]
PD#SWPL-35488

Problem:
rotate to exit with garbage.

Solution:
after unreg is over, the buffer of ppmgr is released.

Verify:
on X301

Change-Id: I40cd59db0dee442fde034ccfb1c3f1afe86eb3ff
Signed-off-by: renjiang.han <renjiang.han@amlogic.com>
Signed-off-by: chunlong.cao <chunlong.cao@amlogic.com>
2023-04-21 13:52:33 +09:00
Cao Jian
af20988661 osd: use viu2 logo output size for viu1 mode switch [1/1]
PD#SWPL-34685

Problem:
for dual logo, if viu1 interface(such as hdmi) is unplugged when booting
the viu2 display device will be used for viu1 after booting

Solution:
use viu2 logo output size for viu1 mode switch

Verify:
on sm1

Change-Id: I90819039fe46edc33d93d0114bdadb4c0de97b1e
Signed-off-by: Cao Jian <jian.cao@amlogic.com>
2023-04-21 13:52:33 +09:00
“maolin.zhou”
1c4c10f09e tsync: apts lookup failed because interpolate calc method invalid [1/1]
PD#SWPL-31520

Problem:
Because interpolate threshold setting is too small, this will lead to
failure of using the interpolate calculation method to look up right
audio pts.

Solution:
Increase the threshold of the apts interpolate value

Verify:
U212

Change-Id: I30d4ad7085f4774d932acf557784ffbb85169afb
Signed-off-by: maolin.zhou <maolin.zhou@amlogic.com>
2023-04-21 13:52:33 +09:00
jintao xu
f86181dd9d ionvideo: use alloc canvas [1/1]
PD#SWPL-28070

Problem:
ionvideo use ppmgr canvas

Solution:
ionvideo use alloc canvas

Verify:
T962X2-X301

Change-Id: Ic0f0f39eaeb129c4a5449b795dcb367964073275
Signed-off-by: jintao xu <jintao.xu@amlogic.com>
2023-04-21 13:52:33 +09:00
Zongdong Jiao
2c8a794002 hdmitx: fix wrong color under 480i/576i, Y422 [1/1]
PD#SWPL-31602

Problem:
Lack y422 setting for 480i/576i

Solution:
Add y422 setting for 480i/576i

Verify:
SM1/Newton

Change-Id: I3a1b766fc3e87dc70592cb3c3c4db8527ce9037d
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
2023-04-21 13:52:33 +09:00
Pengcheng Chen
f7c31b27d8 osd: osd not divide when format RGBX [1/1]
PD#SWPL-32340

Problem:
osd display abnormal when layer is premult_en and rgbx

Solution:
osd not divide when format RGBX

Verify:
u215

Change-Id: Icac55eddd3b5ca47350a585a377d2a54e3e5b0b1
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
2023-04-21 13:52:33 +09:00
Zhengrong.Zhu
5bd85810ae hdmitx: In HDMI2.0 certification test, cannot be switched to 420 [1/1]
PD#SWPL-25446

Problem:
In the empty capmap processing, create the bitmap errorly.

Solution:
In the empty capmap processing, modify the code about the bitmap.

Verify:
Verify on the board of U212

Change-Id: I26d4d07692557c8d6b0df0c984282f81e13ab6c4
Signed-off-by: Zhengrong Zhu <zhengrong.zhu@amlogic.com>
2023-04-21 13:52:33 +09:00
Zongdong Jiao
df12ca3fee hdmitx: need to support 1080i mode for DVI case [1/1]
PD#SWPL-23446

Problem:
The HDMI ATC Lab requires to support 1080i mode for DVI case

Solution:
Add 1080i mode for DVI case

Verify:
G12

Change-Id: I9285a9669176793e55a6f0fe8007702b4c2f239f
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
2023-04-21 13:52:33 +09:00
Zongdong Jiao
8696ec962f hdmitx: remove DDC glitch filter in plugout [1/1]
PD#SWPL-22926

Problem:
hdcp_tx22 may still work at the beginning of plugout, and reset
DDC glitch filter may hold SDA as low

Solution:
Remove DDC glitch filter in plugout

Verify:
sm1

Change-Id: Ifdc760f8246ee38ab2525835be5d29fd37cdfc7c
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
Signed-off-by: chunlong.cao <chunlong.cao@amlogic.com>
2023-04-21 13:52:33 +09:00
Zongdong Jiao
8b50f64bd3 hdmitx: resend scdc/div40 in probe stage [1/1]
PD#SWPL-25274

Problem:
The TV and mbox may power up simutanously. If the uboot output
4k 4.5G or 6G signal, it also send the SCDC/DIV40, but TV may
discard DIV40 during itself bootup. And next TV will generate
the HPD, but mbox may discard this HPD during the probe stage.
So TV may display nothing, while mbox still output normally.

Solution:
Resend scdc/div40 in probe stage

Verify:
G12

Change-Id: I3276889541596b42acc6d0e05a48953a4e9a63b1
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
2023-04-21 13:52:33 +09:00
Zongdong Jiao
d8544983eb hdmitx: add hdcp limitation [1/1]
PD#SWPL-24787

Problem:
For some type's chip, there is no 4k output, and there
will no need the hdcp22

Solution:
Add hdcp limitation

Verify:
805x/y

Change-Id: I36bf7b89d614a738bfca2d5c50a14d2355063792
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
2023-04-21 13:52:33 +09:00
changqing.gao
10339a40a3 config: remove unused configs on ref-board [1/1]
PD#SWPL-27983

Problem:
code size of kernel is too large

Solution:
remove unused but default enabled configs for refernce-board
merge from:a3242b3096d5b9423105e2695723244e7edee433

Verify:
ac214

Change-Id: I9b66178acf67971c0144c4b7141d676866d7b65a
Signed-off-by: changqing.gao <changqing.gao@amlogic.com>
Signed-off-by: chunlong.cao <chunlong.cao@amlogic.com>
2023-04-21 13:52:32 +09:00
Tao Zeng
c97cac5c71 config: remove unused configs on ref-board [1/1]
PD#SWPL-27983

Problem:
code size of kernel is too large

Solution:
remove unused but default enabled configs for refernce-board
code size comparison(base on ARMv7):
------------------------------------------
             |   before(KB)  |   after(KB)
------------------------------------------
kernel code: |    14336      |   11456
rwdata:      |     1352      |    1195
rodata:      |     5144      |    4560
init:        |     1024      |    1024
bss:         |     1379      |    1327
------------------------------------------
summary:     |    22211      |   18538
------------------------------------------

This change can save about 3.6MB kernel code size

Verify:
x301

Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
Change-Id: Iafc4b2a2b8dc55a42fbee197cc7272fd2c476cec
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
Signed-off-by: chunlong.cao <chunlong.cao@amlogic.com>
2023-04-21 13:52:32 +09:00
long.yu
351c78def9 emmc: save clock reg after cali failure [1/1]
PD#SWPL-30974

Problem:
don't need to save the value of
the Clock register after a calibration failure

Solution:
save clock register

Verify:
txl

Change-Id: I79799967ee3417600df960492a94f868427effb2
Signed-off-by: long.yu <long.yu@amlogic.com>
2023-04-21 13:52:32 +09:00
Nanxin Qin
4be10acc4e media: fixed issue of fastplay mode. [1/2]
PD#SWPL-30672

Problem:
1. echo 1 > /sys/class/codec_mm/fastplay_enable
fail with single mode playback on arch 32bit.

2. add codec_mm_memset to avoid vmap fail.

Solution:
fixed issue of reserve memory alloc from CMA.

Verify:
u212

Change-Id: I8823427dfde16d1811132d11c8bab0fe71f1d641
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
2023-04-21 13:52:32 +09:00
Chris
8cf2c7456b ODROID-G12: Add picdec for imageserver.
Change-Id: Ic42dfe19241596079a8a5927ba9a38655589d7e7
2023-04-17 12:32:19 +09:00
Luke Go
e820bc3314 ODROID-COMMON: arm64/dts: g12: Add new uart a pinctrl.
- mesong12b have a_uart_pins pinctrl set that separate mux with cts. So
  if you want to remove cts and rts from pinctrl, have to redefined or
  make new one. this patch add new pinctrl to use only rx and tx pin of
  uart a.

Signed-off-by: Luke Go <sangch.go@gmail.com>
Change-Id: Id18893a943b9937855317cbe1adac3a78261d4f6
2023-04-17 12:32:19 +09:00
Luke Go
600936d78d ODROID-G12: arm64/overlays: Moved uart pinmux to overlay.
Signed-off-by: Luke Go <sangch.go@gmail.com>
Change-Id: I865665108503c45e6ba5f9721fec6add5932dcc9
2023-04-17 12:32:19 +09:00
Hyeonki Hong
f92e4a25e7 ODROID-COMMON: arm64/dts: g12: set uart_a cts/rts to disable
Change-Id: Ia2a22e6d294605bddf612cb763f700594fb2176b
(cherry picked from commit 5a7fddf46c5709e7c05e77c189a902dec2364d1e)
2023-04-17 12:32:19 +09:00
Chris
6ce28606e6 ODROID-G12: Fix passthrough not working
Android does not need hdmitx_ext_set_i2s_mask with vu7c.

Change-Id: Id31292e36cde63618c4a2b402451d503f3923be5
2023-04-11 15:27:01 +09:00
Chris
5ce5a126a8 ODROID-N2: Add RTL8152/3 Driver.
Change-Id: I4b330123335e27430f94c1c822192b4c01ed3d69
2023-03-16 12:14:00 +09:00
Chris
7153b96d49 ODROID-N2L: Fix dts for USB devices.
Change-Id: I50db6bf0393e201fd4011a6ee9c63023bcfef00f
2022-12-16 11:07:01 +09:00
Chris
57d82246a9 ODROID-N2L: Delete pcf8563 rtc from dts.
Change-Id: Id86065b8098a0c1ddadf920ca4b0077b3d8da71d
2022-11-02 13:50:18 +09:00
Chris
ceed7aa5bc ODROID-N2L: Add pcf8563 dtbo for RTC Shield.
Change-Id: Id786921d1c34895cfb9f1291fdc7c49f3d821c9f
2022-11-02 09:08:49 +09:00
Chris
38775d03e8 ODROID-G12: Fix to enable multi-touch for goodix.
Change-Id: I487efc66ee2e0a48daa384e88eed800e1eae9948
2022-10-27 15:10:23 +09:00
Chris
b5c616e80e ODROID-G12: Enable to change orientation for goodix.
referenced:
https://gitlab.com/AdyaAdya/goodix-touchscreen-linux-driver

Change-Id: I117e7d2a7fd701ef1a3cf6a1198809c4d4a09603
2022-10-27 15:10:03 +09:00
Simon Beginn
dd09367e7a Input: goodix - add upside-down quirk for Teclast X98 Pro tablet
[ Upstream commit cffdd6d904 ]

The touchscreen on the Teclast x98 Pro is also mounted upside-down in
relation to the display orientation.

Signed-off-by: Simon Beginn <linux@simonmicro.de>
Signed-off-by: Bastien Nocera <hadess@hadess.net>
Link: https://lore.kernel.org/r/20201117004253.27A5A27EFD@localhost
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Change-Id: Id643f6a3314b4808d3ec98e92107ab719a17dd7c
2022-10-27 15:09:42 +09:00
Hans de Goede
c5557f488f Input: goodix - add upside-down quirk for Teclast X89 tablet
commit df5b5e555b upstream.

The touchscreen on the Teclast X89 is mounted upside down in relation to
the display orientation (the touchscreen itself is mounted upright, but the
display is mounted upside-down). Add a quirk for this so that we send
coordinates which match the display orientation.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Bastien Nocera <hadess@hadess.net>
Link: https://lore.kernel.org/r/20191202085636.6650-1-hdegoede@redhat.com
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: Idab48cdbdf6791021543aa4b33d87d341c9ab0e8
2022-10-27 15:09:18 +09:00
Marcin Niestroj
f467f6e1a0 Input: goodix - use generic touchscreen_properties
Use touchscreen_properties structure instead of implementing all
properties by our own. It allows us to reuse generic code for parsing
device-tree properties (which was implemented manually in the driver for
now). Additionally, it allows us to report events using generic
touchscreen_report_pos(), which automatically handles inverted and
swapped axes.

This fixes the issue with the custom code incorrectly handling case where
ts->inverted_x and ts->swapped_x_y were true, but ts->inverted_y was
false. Assuming we have 720x1280 touch panel, ts->abs_x_max == 1279 and
ts->abs_y_max == 719 (because we inverted that in goodix_read_config()).
Now let's assume that we received event from (0:0) position (in touch
panel original coordinates). In function goodix_ts_report_touch() we
calculate input_x as 1279, but after swapping input_y takes that value
(which is more that maximum 719 value reported during initialization).

Note that since touchscreen coordinates are 0-indexed, we now report
touchscreen range as (0:size-1).

Developed and tested on custom DT-based device with gt1151 touch
panel.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
[dtor: fix endianness annotation reported by sparse, handle errors when
 initializing MT slots]
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Change-Id: I3fdd49b7357ca94111fde041c295a4a548ba109b
2022-10-27 15:08:57 +09:00
Marcin Niestroj
9875ffd457 Input: goodix - support gt1151 touchpanel
Support was added based on Goodix GitHub repo [1]. There are two major
differences between gt1151 and currently supported devices (gt9x):
 * CONFIG_DATA register has 0x8050 address instead of 0x8047,
 * config data checksum has 16-bit width instead of 8-bit.

Also update goodix_i2c_test() function, so it reads ID register (which
has the same address for all devices) instead of CONFIG_DATA (because
its address is known only after reading ID of the device).

[1] https://github.com/goodix/gt1x_driver_generic

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Change-Id: I12f2f9e745c2f14ff45b3f967fbf91e629230989
2022-10-27 15:08:32 +09:00
Paul Cercueil
9a8c3734c3 Input: goodix - poll the 'buffer status' bit before reading data
The Goodix panel triggers an interrupt on touch events. However, its
registers will contain the valid values a short time after the
interrupt, and not when it's raised. At that moment, the 'buffer status'
bit is set.

Previously, if the 'buffer status' bit was not set when the registers
were read, the data was discarded and no input event was emitted,
causing "finger down" or "finger up" events to be missed sometimes.

This went unnoticed until v4.9, as the DesignWare I2C driver commonly
used with this driver had enough latency for that bug to never trigger
until commit 2702ea7dbe ("i2c: designware: wait for disable/enable only
if necessary").

Now, in the IRQ handler we will poll (with a timeout) the 'buffer status'
bit and process the data of the panel as soon as this bit gets set.

Note that the Goodix panel will send a few spurious interrupts after the
'finger up' event, in which the 'buffer status' bit will never be set.

Cc: Bastien Nocera <hadess@hadess.net>
Cc: russianneuromancer@ya.ru
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
[hdegoede@redhat.com: Change poll loop to use jiffies,
                      add comment about typical poll time]
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
[dtor: rearranged control flow a bit to avoid explicit goto and double
check]
Reviewed-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Change-Id: I3fa771b0b07cf811b157cb76e1c1deba6bf4e4ea
2022-10-27 15:08:12 +09:00
Sergei A. Trusov
b8c1122b2c Input: goodix - add support for capacitive home button
On some x86 tablets with a Goodix touchscreen, the Windows logo on the
front is a capacitive home button. Touching this button results in a touch
with bit 4 of the first byte set, while only the lower 4 bits (0-3) are
used to indicate the number of touches.

Report a KEY_LEFTMETA press when this happens.

Note that the hardware might support more than one button, in which
case the "id" byte of coor_data would identify the button in question.
This is not implemented as we don't have access to hardware with
multiple buttons.

Signed-off-by: Sergei A. Trusov <sergei.a.trusov@ya.ru>
Acked-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Change-Id: I30f0248bca9de921d25b19bf823698ab6dc3eb3f
2022-10-27 15:07:51 +09:00
Chris
b663de2fe6 ODROID-N2L: Fix for meson64_odroidn2l_android
Change-Id: I3cd142446b5cb69d0629f66125b0c8020f09272f
2022-10-27 15:07:09 +09:00
Chris
7a26dca174 ODROID-N2L: rev_1.0 20220426 USB VBUS Power modify.
Change-Id: I819ddb2551fc6d76582ed77f27c14617856f61da
2022-10-24 10:28:33 +09:00
Chris
6179a9c421 ODROID-N2/N2L: Fill uuid if not exists.
If uuid is empty, it will be replaced by CPU id.

Change-Id: Iae971a089bb317817574eb26119c931dbbc7856c
2022-10-12 12:42:20 +09:00
Dongjin Kim
aec190bed7 ODROID-N2/N2Plus: simple compare 'Hardkernel ODROID-N2'
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I59f599211b89805c17881099a209f07a9089006c
2022-10-12 12:41:59 +09:00
Chris
24555490c0 ODROID-N2L: Introduce new SBC board 'ODROID-N2L'
Change-Id: Ie5bad34edb436ec551932d9d4a985a03967ea14d
2022-10-12 12:41:16 +09:00
Luke Go
2c99989c75 ODROID: arm64/dts: overlay: Add keymatrix exmaple.
- this Exampel support keyboard matrix driver.
  Added 4 by 4 gpio, and 11 key map.

Signed-off-by: Luke Go <sangch.go@gmail.com>
Change-Id: If7d0c801756885c28f316d56a797425b1a8385b4
2022-08-31 14:38:49 +09:00
Luke Go
7cfa86f4fd ODROID: arm64/configs: Add KEYBOARD_MATRIX to C4 and N2. matrix keypad
support polling feature.

Change-Id: Ibef25334c09987e09916b951297c10c2b8e3051c
Signed-off-by: Luke Go <sangch.go@gmail.com>
2022-08-31 14:38:42 +09:00
Chris
26ee82a010 ODROID-C4: Fix to disappear boot logo.
Change-Id: I4867e437e00eb7ab99e62abce836e04288111dc2
2022-07-20 12:33:21 +09:00
Chris
d07dda58d2 ODROID-COMMON: Fix not to display recovery screen.
Change-Id: I3e7a341f182b793784d8870956eae1d30d46921e
2022-07-20 12:32:35 +09:00
Chris
ed726fcebe ODROID-COMMON: Fix to disappear boot logo.
Change-Id: I89fe590a492866ca4f9e595d3c3da17d74dc1463
2022-07-20 12:25:53 +09:00
Chris
c618899067 ODROID-COMMON: Remove unused module drivers.
Change-Id: I9dc8ab3f7a5ebbf8717c5ff22471efe93ba96274
2022-07-19 16:51:39 +09:00
ckkim
fa571b1da5 ODROID-COMMON:UART minimum baud rate modify(110).
Signed-off-by: ckkim <changkon12@gmail.com>
Change-Id: Iad06bdf188ac4c7c1184ffb93dccbb5bc7c334bf
2022-07-19 16:51:32 +09:00
Chris
d7a6341e6b ODROID-G12: Modified pwm_backlight.dts
Change-Id: Ic9c5d462a9d5b0d36ba84f5eabd28e5a3771cbb6
2022-03-15 09:22:46 +09:00
Chris
62633eabb8 ODROID-COMMON:VU7C EDID modify. Display Product name : HK_VU7C
Change-Id: I7528b1a655ce385cc5f0fc3a55f4e4d1a08fd830
2022-03-15 09:22:36 +09:00
Chris
bb003fb072 ODROID-G12: Fix display_vu7c dts for Android kernel.
Change-Id: I3011d2fbc86e6041ce137960250a849183ca3c44
2022-03-15 09:22:25 +09:00