-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
205 additions
and
0 deletions.
There are no files selected for viewing
68 changes: 68 additions & 0 deletions
68
...D/steamfork-device-support/src/etc/gamescope/scripts/displays/testing/AYA-AYANEO-OLED.lua
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
-- Ayaneo Air 1S | ||
|
||
local panel_id = "ayaneo_hd_oled" | ||
local panel_name = "Ayaneo HD OLED Panel" | ||
|
||
local panel_models = { | ||
{ vendor = "AYA", model = "AYANEO-OLED" }, | ||
} | ||
|
||
local panel_resolutions = { | ||
{ width = 1080, height = 1920 }, | ||
{ width = 720, height = 1280 }, | ||
{ width = 600, height = 1066 }, | ||
} | ||
|
||
local panel_refresh_rates = {} | ||
for hz = 31, 60 do | ||
table.insert(panel_refresh_rates, hz) | ||
end | ||
|
||
|
||
gamescope.config.known_displays[panel_id] = { | ||
pretty_name = panel_name, | ||
colorimetry = (panel_colorimetry ~= nil) and panel_colorimetry, | ||
dynamic_refresh_rates = (panel_refresh_rates ~= nil) and panel_refresh_rates, | ||
hdr = (panel_hdr ~= nil) and panel_hdr, | ||
|
||
dynamic_modegen = function(base_mode, refresh) | ||
local mode = base_mode | ||
local set_res = false | ||
debug("["..panel_id.."] Switching mode to "..mode.hdisplay.."x"..mode.vdisplay.."@"..refresh.."Hz") | ||
|
||
for i, res in ipairs(panel_resolutions) do | ||
if res.width == mode.hdisplay and res.height == mode.vdisplay then | ||
set_res = res | ||
break | ||
end | ||
end | ||
|
||
if not set_res then | ||
debug("["..panel_id.."] Mode not found. Aborting.") | ||
return mode | ||
end | ||
|
||
if set_res.hfp ~= nil and set_res.hsync ~= nil and set_res.hbp ~= nil then | ||
gamescope.modegen.set_h_timings(mode, set_res.hfp, set_res.hsync, set_res.hbp) | ||
end | ||
if set_res.vfp ~= nil and set_res.vsync ~= nil and set_res.vbp ~= nil then | ||
gamescope.modegen.set_v_timings(mode, set_res.vfp, set_res.vsync, set_res.vbp) | ||
end | ||
|
||
mode.clock = gamescope.modegen.calc_max_clock(mode, refresh) | ||
mode.vrefresh = gamescope.modegen.calc_vrefresh(mode) | ||
|
||
return mode | ||
end, | ||
|
||
matches = function(display) | ||
for i, panel in ipairs(panel_models) do | ||
if panel.vendor == display.vendor and panel.model == display.model then | ||
debug("["..panel_id.."] Matched vendor: "..display.vendor.." model: "..display.model) | ||
return 4000 | ||
end | ||
end | ||
|
||
return -1 | ||
end | ||
} |
69 changes: 69 additions & 0 deletions
69
.../steamfork-device-support/src/etc/gamescope/scripts/displays/testing/MSF-W0550U99GE-D.lua
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
-- Ayaneo Air | ||
-- Ayaneo Air Pro | ||
|
||
local panel_id = "ayaneo_air_oled" | ||
local panel_name = "Ayaneo Air OLED Panel" | ||
|
||
local panel_models = { | ||
{ vendor = "MSF", model = "W0550U99GE-D" }, | ||
} | ||
|
||
local panel_resolutions = { | ||
{ width = 1080, height = 1920 }, | ||
{ width = 720, height = 1280 }, | ||
{ width = 600, height = 960 }, | ||
} | ||
|
||
local panel_refresh_rates = {} | ||
for hz = 31, 60 do | ||
table.insert(panel_refresh_rates, hz) | ||
end | ||
|
||
|
||
gamescope.config.known_displays[panel_id] = { | ||
pretty_name = panel_name, | ||
colorimetry = (panel_colorimetry ~= nil) and panel_colorimetry, | ||
dynamic_refresh_rates = (panel_refresh_rates ~= nil) and panel_refresh_rates, | ||
hdr = (panel_hdr ~= nil) and panel_hdr, | ||
|
||
dynamic_modegen = function(base_mode, refresh) | ||
local mode = base_mode | ||
local set_res = false | ||
debug("["..panel_id.."] Switching mode to "..mode.hdisplay.."x"..mode.vdisplay.."@"..refresh.."Hz") | ||
|
||
for i, res in ipairs(panel_resolutions) do | ||
if res.width == mode.hdisplay and res.height == mode.vdisplay then | ||
set_res = res | ||
break | ||
end | ||
end | ||
|
||
if not set_res then | ||
debug("["..panel_id.."] Mode not found. Aborting.") | ||
return mode | ||
end | ||
|
||
if set_res.hfp ~= nil and set_res.hsync ~= nil and set_res.hbp ~= nil then | ||
gamescope.modegen.set_h_timings(mode, set_res.hfp, set_res.hsync, set_res.hbp) | ||
end | ||
if set_res.vfp ~= nil and set_res.vsync ~= nil and set_res.vbp ~= nil then | ||
gamescope.modegen.set_v_timings(mode, set_res.vfp, set_res.vsync, set_res.vbp) | ||
end | ||
|
||
mode.clock = gamescope.modegen.calc_max_clock(mode, refresh) | ||
mode.vrefresh = gamescope.modegen.calc_vrefresh(mode) | ||
|
||
return mode | ||
end, | ||
|
||
matches = function(display) | ||
for i, panel in ipairs(panel_models) do | ||
if panel.vendor == display.vendor and panel.model == display.model then | ||
debug("["..panel_id.."] Matched vendor: "..display.vendor.." model: "..display.model) | ||
return 4000 | ||
end | ||
end | ||
|
||
return -1 | ||
end | ||
} |
68 changes: 68 additions & 0 deletions
68
PKGBUILD/steamfork-device-support/src/etc/gamescope/scripts/displays/testing/RTK-7911D.lua
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
-- Anbernic Win600 | ||
|
||
local panel_id = "anbernic_win600_lcd" | ||
local panel_name = "Anbernic Win600 LCD Panel" | ||
|
||
local panel_models = { | ||
{ vendor = "RTK", model = "7911D" }, | ||
} | ||
|
||
local panel_resolutions = { | ||
{ width = 720, height = 1280 }, | ||
{ width = 600, height = 800 }, | ||
{ width = 544, height = 960 }, | ||
} | ||
|
||
--local panel_refresh_rates = {} | ||
--for hz = 31, 60 do | ||
-- table.insert(panel_refresh_rates, hz) | ||
--end | ||
|
||
|
||
gamescope.config.known_displays[panel_id] = { | ||
pretty_name = panel_name, | ||
colorimetry = (panel_colorimetry ~= nil) and panel_colorimetry, | ||
dynamic_refresh_rates = (panel_refresh_rates ~= nil) and panel_refresh_rates, | ||
hdr = (panel_hdr ~= nil) and panel_hdr, | ||
|
||
dynamic_modegen = function(base_mode, refresh) | ||
local mode = base_mode | ||
local set_res = false | ||
debug("["..panel_id.."] Switching mode to "..mode.hdisplay.."x"..mode.vdisplay.."@"..refresh.."Hz") | ||
|
||
for i, res in ipairs(panel_resolutions) do | ||
if res.width == mode.hdisplay and res.height == mode.vdisplay then | ||
set_res = res | ||
break | ||
end | ||
end | ||
|
||
if not set_res then | ||
debug("["..panel_id.."] Mode not found. Aborting.") | ||
return mode | ||
end | ||
|
||
if set_res.hfp ~= nil and set_res.hsync ~= nil and set_res.hbp ~= nil then | ||
gamescope.modegen.set_h_timings(mode, set_res.hfp, set_res.hsync, set_res.hbp) | ||
end | ||
if set_res.vfp ~= nil and set_res.vsync ~= nil and set_res.vbp ~= nil then | ||
gamescope.modegen.set_v_timings(mode, set_res.vfp, set_res.vsync, set_res.vbp) | ||
end | ||
|
||
mode.clock = gamescope.modegen.calc_max_clock(mode, refresh) | ||
mode.vrefresh = gamescope.modegen.calc_vrefresh(mode) | ||
|
||
return mode | ||
end, | ||
|
||
matches = function(display) | ||
for i, panel in ipairs(panel_models) do | ||
if panel.vendor == display.vendor and panel.model == display.model then | ||
debug("["..panel_id.."] Matched vendor: "..display.vendor.." model: "..display.model) | ||
return 4000 | ||
end | ||
end | ||
|
||
return -1 | ||
end | ||
} |