mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-12-25 18:29:49 +00:00
atimach64gx: Fix DAC_CNTL for non-byte access.
If offset is 2, a size of 2 will also overwrite byte 3.
This commit is contained in:
parent
df09a1e3bf
commit
bfd60155b6
@ -404,7 +404,7 @@ void AtiMach64Gx::write_reg(uint32_t reg_offset, uint32_t value, uint32_t size)
|
||||
case ATI_DAC_CNTL:
|
||||
new_value = value;
|
||||
// monitor ID is usually accessed using 8bit writes
|
||||
if (offset == 3) {
|
||||
if (offset <= 3 && offset + size > 3) {
|
||||
uint8_t gpio_dirs = extract_bits<uint32_t>(new_value, ATI_DAC_GIO_DIR, ATI_DAC_GIO_DIR_size);
|
||||
uint8_t gpio_levels = extract_bits<uint32_t>(new_value, ATI_DAC_GIO_STATE, ATI_DAC_GIO_STATE_size);
|
||||
gpio_levels = this->disp_id->read_monitor_sense(gpio_levels, gpio_dirs);
|
||||
|
Loading…
Reference in New Issue
Block a user