From 12269c5ad47471706259a0222561df9b90ff05e7 Mon Sep 17 00:00:00 2001 From: Povilas Kanapickas Date: Mon, 13 Apr 2020 07:19:49 +0300 Subject: [PATCH] genesys: Prefer not to use ccd_size_divisor on gl841 --- backend/genesys/gl841.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/backend/genesys/gl841.cpp b/backend/genesys/gl841.cpp index ce3a87ff4..249948447 100644 --- a/backend/genesys/gl841.cpp +++ b/backend/genesys/gl841.cpp @@ -1055,22 +1055,21 @@ static void gl841_init_optical_regs_scan(Genesys_Device* dev, const Genesys_Sens /* gpio part.*/ if (dev->model->gpio_id == GpioId::CANON_LIDE_35) { - if (session.ccd_size_divisor > 1) { + if (session.params.xres <= 600) { reg->find_reg(REG_0x6C).value &= ~0x80; } else { reg->find_reg(REG_0x6C).value |= 0x80; } } if (dev->model->gpio_id == GpioId::CANON_LIDE_80) { - if (session.ccd_size_divisor > 1) { - - reg->find_reg(REG_0x6C).value &= ~0x40; - reg->find_reg(REG_0x6C).value |= 0x20; + if (session.params.xres <= 600) { + reg->find_reg(REG_0x6C).value &= ~0x40; + reg->find_reg(REG_0x6C).value |= 0x20; } else { - reg->find_reg(REG_0x6C).value &= ~0x20; - reg->find_reg(REG_0x6C).value |= 0x40; + reg->find_reg(REG_0x6C).value &= ~0x20; + reg->find_reg(REG_0x6C).value |= 0x40; } - } + } /* enable shading */ reg->find_reg(0x01).value |= REG_0x01_SCAN;