Skip to content

Commit

Permalink
Merge pull request #49 from uejji/flipds
Browse files Browse the repository at this point in the history
Ayaneo Flip DS support
  • Loading branch information
uejji authored Dec 24, 2024
2 parents 43353f3 + de8d98a commit 5c76f79
Show file tree
Hide file tree
Showing 25 changed files with 316 additions and 46 deletions.
43 changes: 31 additions & 12 deletions PKGBUILD/linux/0001-drm-panel-orientation-quirks.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
diff -rupN linux-6.12.5.orig/drivers/gpu/drm/drm_panel_orientation_quirks.c linux-6.12.5/drivers/gpu/drm/drm_panel_orientation_quirks.c
--- linux-6.12.5.orig/drivers/gpu/drm/drm_panel_orientation_quirks.c 2024-12-14 19:04:17.000000000 +0000
+++ linux-6.12.5/drivers/gpu/drm/drm_panel_orientation_quirks.c 2024-12-15 04:41:36.643769144 +0000
@@ -129,6 +129,12 @@ static const struct drm_dmi_panel_orient
+++ linux-6.12.5/drivers/gpu/drm/drm_panel_orientation_quirks.c 2024-12-16 05:16:59.397212363 +0000
@@ -93,6 +93,12 @@ static const struct drm_dmi_panel_orient
.orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
};

+static const struct drm_dmi_panel_orientation_data lcd640x960_leftside_up = {
+ .width = 640,
+ .height = 960,
+ .orientation = DRM_MODE_PANEL_ORIENTATION_LEFT_UP,
+};
+
static const struct drm_dmi_panel_orientation_data lcd720x1280_rightside_up = {
.width = 720,
.height = 1280,
@@ -129,6 +135,12 @@ static const struct drm_dmi_panel_orient
.orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
};

Expand All @@ -14,7 +27,7 @@ diff -rupN linux-6.12.5.orig/drivers/gpu/drm/drm_panel_orientation_quirks.c linu
static const struct drm_dmi_panel_orientation_data lcd1280x1920_rightside_up = {
.width = 1280,
.height = 1920,
@@ -166,6 +172,12 @@ static const struct dmi_system_id orient
@@ -166,6 +178,12 @@ static const struct dmi_system_id orient
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Win600"),
},
.driver_data = (void *)&lcd720x1280_rightside_up,
Expand All @@ -27,7 +40,7 @@ diff -rupN linux-6.12.5.orig/drivers/gpu/drm/drm_panel_orientation_quirks.c linu
}, { /* Asus T100HA */
.matches = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
@@ -184,16 +196,16 @@ static const struct dmi_system_id orient
@@ -184,16 +202,16 @@ static const struct dmi_system_id orient
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T103HAF"),
},
.driver_data = (void *)&lcd800x1280_rightside_up,
Expand All @@ -48,20 +61,26 @@ diff -rupN linux-6.12.5.orig/drivers/gpu/drm/drm_panel_orientation_quirks.c linu
},
.driver_data = (void *)&lcd800x1280_rightside_up,
}, { /* AYA NEO AIR */
@@ -208,6 +220,12 @@ static const struct dmi_system_id orient
DMI_MATCH(DMI_PRODUCT_NAME, "AYA NEO Founder"),
@@ -202,6 +208,18 @@ static const struct dmi_system_id orientation_data[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "AIR"),
},
.driver_data = (void *)&lcd800x1280_rightside_up,
+ }, { /* AYA NEO FLIP KB and DS*/
.driver_data = (void *)&lcd1080x1920_leftside_up,
+ }, { /* AYA NEO Flip DS Bottom Screen */
+ .matches = {
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AYANEO"),
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "FLIP DS"),
+ },
+ .driver_data = (void *)&lcd640x960_leftside_up,
+ }, { /* AYA NEO Flip KB/DS Top Screen */
+ .matches = {
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AYANEO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "FLIP"),
+ },
+ .driver_data = (void *)&lcd1080x1920_leftside_up,
}, { /* AYA NEO GEEK */
}, { /* AYA NEO Founder */
.matches = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AYANEO"),
@@ -226,6 +244,12 @@ static const struct dmi_system_id orient
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AYA NEO"),
@@ -226,6 +256,12 @@ static const struct dmi_system_id orient
DMI_MATCH(DMI_BOARD_NAME, "KUN"),
},
.driver_data = (void *)&lcd1600x2560_rightside_up,
Expand All @@ -74,7 +93,7 @@ diff -rupN linux-6.12.5.orig/drivers/gpu/drm/drm_panel_orientation_quirks.c linu
}, { /* AYN Loki Max */
.matches = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ayn"),
@@ -315,6 +339,12 @@ static const struct dmi_system_id orient
@@ -315,6 +351,12 @@ static const struct dmi_system_id orient
DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"),
},
.driver_data = (void *)&gpd_win2,
Expand Down
19 changes: 19 additions & 0 deletions PKGBUILD/linux/0009-enable-flip-ds-bottom-touchscreen.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
diff -rupN linux-6.12.6.orig/drivers/input/touchscreen/goodix.c linux-6.12.6/drivers/input/touchscreen/goodix.c
--- linux-6.12.6.orig/drivers/input/touchscreen/goodix.c 2024-12-20 06:33:12.088233449 +0000
+++ linux-6.12.6/drivers/input/touchscreen/goodix.c 2024-12-20 19:46:50.982440555 +0000
@@ -1511,6 +1511,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(goodix_p

static const struct i2c_device_id goodix_ts_id[] = {
{ "GDIX1001:00" },
+ { "GDIX1003:00" },
{ }
};
MODULE_DEVICE_TABLE(i2c, goodix_ts_id);
@@ -1519,6 +1520,7 @@ MODULE_DEVICE_TABLE(i2c, goodix_ts_id);
static const struct acpi_device_id goodix_acpi_match[] = {
{ "GDIX1001", 0 },
{ "GDIX1002", 0 },
+ { "GDIX1003", 0 },
{ "GDX9110", 0 },
{ }
};
6 changes: 4 additions & 2 deletions PKGBUILD/linux/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

pkgbase=linux
pkgver=6.12.6
pkgrel=1
pkgrel=2
pkgdesc="Linux Stable"
arch=(x86_64)
url="https://kernel.org/"
Expand Down Expand Up @@ -51,6 +51,7 @@ source=(
0006-Ayaneo-geek-headset-patch.patch
0007-ayaneo-2-headphone-fix.patch
0008-ayaneo-1s-hp-fix.patch
0009-enable-flip-ds-bottom-touchscreen.patch
0012-HACK-add-KConfig-to-enable-driver-specific-color-mgm.patch
0013-Don-t-create-color_mgmt_properties-on-asics-SIENNA_C.patch
0020-add-devices-to-oxp-sensors.patch
Expand All @@ -75,11 +76,12 @@ validpgpkeys=(
)
sha256sums=('SKIP'
'9d5827a1304da7860d4e12ad3ae5ad40076b0013c2f067020904146c32640773' # config
'e3eec3aee54745fd61cf67f08a9e7f0f2109c7dc058eaec64347a781edb49b00' # 0001-drm-panel-orientation-quirks.patch
'8c9b1250638bf42b49bb50072f4a8f94797a4cc41c323f8d9b1c69cd4b894b40' # 0001-drm-panel-orientation-quirks.patch
'71d093c5c95d7bd594dd8dcd804eabe2f6b95398c519ded42b7d8994f384e4d8' # 0002-drm-amdgpu-always-allocate-cleared-VRAM-for-GEM-allo.patch
'3e22c0093a3ba0596a440bb97355348fd0de202a7e4487a5abe2469b4ed1f1dc' # 0006-Ayaneo-geek-headset-patch.patch
'3805f3b8b39d9d49586fb5d2a445a9ee54cf00cd1cdedd226e727420196cc568' # 0007-ayaneo-2-headphone-fix.patch
'a5fc093f55a43295e08bb70df91d1b0861f2fbd76cee2cf9725b52f3f8d0c4a7' # 0008-ayaneo-1s-hp-fix.patch
'bb5dd08ae830b11a0170014a7b855bd4224fb5f83b0a8fb7a166d702e63d4e36' # 0009-enable-flip-ds-bottom-touchscreen.patch
'f45ba5d7dbc004474314c9e0329014e8c9d6b111f1e00397b1072b1bde581761' # 0012-HACK-add-KConfig-to-enable-driver-specific-color-mgm.patch
'683128d044f4df12dcb0a7b2858075f510d870460dc71f0d60f69df89cf62419' # 0013-Don-t-create-color_mgmt_properties-on-asics-SIENNA_C.patch
'783178f81727fcec0ff37b279a32c59b6c71702d18e53e472cdf1ee0a23d5241' # 0020-add-devices-to-oxp-sensors.patch
Expand Down
4 changes: 2 additions & 2 deletions PKGBUILD/steamfork-customizations/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Maintainer: Fewtarius

pkgname=steamfork-customizations
pkgver=2024.12.06
pkgrel=2
pkgver=2024.12.23
pkgrel=1
pkgdesc='SteamFork customizations provider.'
arch=('any')
url='http://www.steamfork.org'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[
{
"enabled": true,
"id": "cfaac615846132a6d01cbe02ea6286ac",
"metadata": {
"fullname": "xrandr-AYANEOFHD-539169026",
"name": "eDP"
},
"mode": {
"refresh": 120.02743530273438,
"size": {
"height": 1920,
"width": 1080
}
},
"overscan": 0,
"pos": {
"x": 0,
"y": 0
},
"priority": 1,
"rgbrange": 0,
"rotation": 2,
"scale": 1,
"vrrpolicy": 2
},
{
"enabled": true,
"id": "7416f805407bf1da569f33f5d0b1b68d",
"metadata": {
"fullname": "xrandr-AYANEOQHD-539168806",
"name": "eDP-1"
},
"mode": {
"refresh": 60.003170013427734,
"size": {
"height": 960,
"width": 640
}
},
"overscan": 0,
"pos": {
"x": 480,
"y": 1080
},
"priority": 2,
"rgbrange": 0,
"rotation": 2,
"scale": 1,
"vrrpolicy": 2
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"outputs": [
{
"id": "cfaac615846132a6d01cbe02ea6286ac",
"metadata": {
"name": "eDP"
},
"retention": 1
},
{
"id": "7416f805407bf1da569f33f5d0b1b68d",
"metadata": {
"name": "eDP-1"
},
"retention": 1
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"id": "7416f805407bf1da569f33f5d0b1b68d",
"metadata": {
"fullname": "xrandr-AYANEOQHD-539168806",
"name": "eDP-1"
},
"mode": {
"refresh": 60.003170013427734,
"size": {
"height": 960,
"width": 640
}
},
"overscan": 0,
"rgbrange": 0,
"rotation": 2,
"scale": 1,
"vrrpolicy": 2
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"id": "cfaac615846132a6d01cbe02ea6286ac",
"metadata": {
"fullname": "xrandr-AYANEOFHD-539169026",
"name": "eDP"
},
"mode": {
"refresh": 120.02743530273438,
"size": {
"height": 1920,
"width": 1080
}
},
"overscan": 0,
"rgbrange": 0,
"rotation": 2,
"scale": 1,
"vrrpolicy": 2
}
2 changes: 1 addition & 1 deletion PKGBUILD/steamfork-device-support/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Maintainer: Fewtarius

pkgname=steamfork-device-support
pkgver=2024.12.17
pkgver=2024.12.23
pkgrel=1
pkgdesc='Hardware support provider for PC handhelds.'
arch=('any')
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

# Make sure kscreen files match the default, or else delete and overwrite them
# TODO: Find literally any other way to do this

for SKELFILE in $( find /etc/skel/.local/share/kscreen/ -type f ); do
HOMEFILE="/home/deck/$( echo ${SKELFILE} | cut -f4- -d'/' )"
if [ "$( md5sum ${SKELFILE} | cut -f1 -d' ' )" != "$( md5sum ${HOMEFILE} | cut -f1 -d' ' )" ]; then
rm -rf /home/deck/.local/share/kscreen/
mkdir -p /home/deck/.local/share/kscreen/
cp -r /etc/skel/.local/share/kscreen/* /home/deck/.local/share/kscreen
chown -R deck:deck /home/deck/.local
break
fi
done
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

# Generate calibration matrix for bottom touchscreen
# TODO: Find literally any other way to do this

cat <<EOF | sudo tee /etc/X11/xorg.conf.d/99-touchscreen_orientation.conf
Section "InputClass"
Identifier "Coordinate Transformation Matrix"
MatchIsTouchscreen "on"
MatchDevicePath "/dev/input/event*"
MatchDriver "libinput"
Option "CalibrationMatrix" "0 -0.5 0.75 0.37209302 0 0.62790698 0 0 1"
EndSection
EOF

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2024 Fewtarius

### Disable the touch display until issues can be resolved.
echo 1 >$(find /sys/devices/platform -name inhibited | grep GDIX)
### Disable the touch display (top on DS) until issues can be resolved.
echo 1 >$(find /sys/devices/platform -name inhibited | grep GDIX1002)
6 changes: 4 additions & 2 deletions rootfs/installer/airootfs/etc/X11/Xsession.d/999rotate-screen
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/bin/bash
INT_DISPLAY=$(xrandr | awk '/\<connected\>/ {print $1}' | grep eDP | head -n1)
INT_DISPLAYS=$(xrandr | awk '/\<connected\>/ {print $1}' | grep eDP)
source steamfork-devicequirk-set

if [ -z "${X11_ROTATION}" ]; then
echo "Ignoring anything. Assume normal rotation"
else
xrandr --output ${INT_DISPLAY} --rotate ${X11_ROTATION}
for INT_DISPLAY in ${INT_DISPLAYS}; do
xrandr --output ${INT_DISPLAY} --rotate ${X11_ROTATION}
done
fi
Loading

0 comments on commit 5c76f79

Please sign in to comment.