From 99972307dc52d0b8173ee869376a9be71fcce6b2 Mon Sep 17 00:00:00 2001 From: joevt Date: Sat, 4 May 2024 22:16:15 -0700 Subject: [PATCH] platinum: Implement FB_TEST read/write. --- devices/memctrl/platinum.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/devices/memctrl/platinum.cpp b/devices/memctrl/platinum.cpp index 6e02145..b127c35 100644 --- a/devices/memctrl/platinum.cpp +++ b/devices/memctrl/platinum.cpp @@ -145,6 +145,9 @@ uint32_t PlatinumCtrl::read(uint32_t rgn_start, uint32_t offset, int size) { case PlatinumReg::MON_ID_SENSE: value = (this->mon_sense ^ 7); break; + case PlatinumReg::FB_TEST: + value = this->fb_test; + break; case PlatinumReg::SWATCH_CONFIG: value = this->swatch_config; break; @@ -296,6 +299,11 @@ void PlatinumCtrl::write(uint32_t rgn_start, uint32_t offset, uint32_t value, in } break; + case PlatinumReg::FB_TEST: + this->fb_test = + (this->fb_test & ~(SENSE_LINE_OUTPUT_DATA | SYNCS_OUTPUT_ENABLE | FORCED_SYNC_LEVELS)) | + (value & (SENSE_LINE_OUTPUT_DATA | SYNCS_OUTPUT_ENABLE | FORCED_SYNC_LEVELS)); + break; case PlatinumReg::VRAM_REFRESH: this->vram_refresh = value; break;