drivers/gpu/drm/openchrome/via_crtc.c | 50 +++++++++++++++++++++++----------- drivers/gpu/drm/openchrome/via_drv.h | 2 - 2 files changed, 35 insertions(+), 17 deletions(-)
New commits: commit 7f911a43144a372b42b31e5632ab3fb7650b68c1 Author: Kevin Brace <kevinbr...@gmx.com> Date: Sun Jan 28 13:07:21 2018 -0800 drm/openchrome: Version bumped to 3.0.65 Display FIFO fixes for K8M800 chipset. Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/drivers/gpu/drm/openchrome/via_drv.h b/drivers/gpu/drm/openchrome/via_drv.h index 6079d7f2d5ac..bf6ff085bb63 100644 --- a/drivers/gpu/drm/openchrome/via_drv.h +++ b/drivers/gpu/drm/openchrome/via_drv.h @@ -34,7 +34,7 @@ #define DRIVER_MAJOR 3 #define DRIVER_MINOR 0 -#define DRIVER_PATCHLEVEL 64 +#define DRIVER_PATCHLEVEL 65 #include <linux/module.h> commit 49fb3645167e01578b9fff993b4458b9f2295f71 Author: Kevin Brace <kevinbr...@gmx.com> Date: Sun Jan 28 13:05:52 2018 -0800 drm/openchrome: Changing K8M800 IGA2 display FIFO parameters The display FIFO parameters came from VIA Technologies Chrome IGP open source DDX device driver. Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/drivers/gpu/drm/openchrome/via_crtc.c b/drivers/gpu/drm/openchrome/via_crtc.c index 42b504f7f76a..d5cc9ce9ac21 100644 --- a/drivers/gpu/drm/openchrome/via_crtc.c +++ b/drivers/gpu/drm/openchrome/via_crtc.c @@ -904,12 +904,23 @@ static void via_iga2_display_fifo_regs(struct drm_device *dev, break; case PCI_DEVICE_ID_VIA_K8M800: - iga->display_queue_expire_num = 0; - iga->fifo_high_threshold = 296; + /* SR17[7:0] */ + iga->fifo_max_depth = 376; + + /* SR16[7], SR16[5:0] */ iga->fifo_threshold = 328; - iga->fifo_max_depth = 384; - break; + /* SR18[7], SR18[5:0] */ + iga->fifo_high_threshold = 296; + + if ((fb->format->depth == 32) && + (mode->hdisplay >= 1400)) { + iga->display_queue_expire_num = 64; + } else { + iga->display_queue_expire_num = 128; + } + + break; case PCI_DEVICE_ID_VIA_PM800: iga->display_queue_expire_num = 0; iga->fifo_high_threshold = 64; @@ -1005,15 +1016,12 @@ static void via_iga2_display_fifo_regs(struct drm_device *dev, } else { /* If resolution > 1280x1024, expire length = 64, else expire length = 128 */ - if ((dev->pdev->device == PCI_DEVICE_ID_VIA_K8M800 - || dev->pdev->device == PCI_DEVICE_ID_VIA_CN700) - && ((mode->hdisplay > 1280) && (mode->vdisplay > 1024))) + if ((dev->pdev->device == PCI_DEVICE_ID_VIA_CN700) && + (mode->hdisplay > 1280) && (mode->vdisplay > 1024)) iga->display_queue_expire_num = 16; /* Set IGA2 Display FIFO Depth Select */ reg_value = IGA2_FIFO_DEPTH_SELECT_FORMULA(iga->fifo_max_depth); - if (dev->pdev->device == PCI_DEVICE_ID_VIA_K8M800) - reg_value--; load_value_to_registers(VGABASE, &iga->fifo_depth, reg_value); /* Set Display FIFO Threshold Select */ commit a9a43751beece404d8658fc26e6fe53245606d63 Author: Kevin Brace <kevinbr...@gmx.com> Date: Sun Jan 28 13:03:13 2018 -0800 drm/openchrome: Changing K8M800 IGA1 display FIFO parameters The display FIFO parameters came from VIA Technologies Chrome IGP open source DDX device driver. Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/drivers/gpu/drm/openchrome/via_crtc.c b/drivers/gpu/drm/openchrome/via_crtc.c index 75688285e388..42b504f7f76a 100644 --- a/drivers/gpu/drm/openchrome/via_crtc.c +++ b/drivers/gpu/drm/openchrome/via_crtc.c @@ -666,12 +666,23 @@ static void via_iga1_display_fifo_regs(struct drm_device *dev, break; case PCI_DEVICE_ID_VIA_K8M800: - iga->display_queue_expire_num = 128; - iga->fifo_high_threshold = 296; + /* SR17[7:0] */ + iga->fifo_max_depth = 768; + + /* SR16[7], SR16[5:0] */ iga->fifo_threshold = 328; - iga->fifo_max_depth = 384; - break; + /* SR18[7], SR18[5:0] */ + iga->fifo_high_threshold = 296; + + if ((fb->format->depth == 32) && + (mode->hdisplay >= 1400)) { + iga->display_queue_expire_num = 64; + } else { + iga->display_queue_expire_num = 128; + } + + break; case PCI_DEVICE_ID_VIA_PM800: iga->display_queue_expire_num = 128; iga->fifo_high_threshold = 32; @@ -765,9 +776,8 @@ static void via_iga1_display_fifo_regs(struct drm_device *dev, /* If resolution > 1280x1024, expire length = 64, else expire length = 128 */ - if ((dev->pdev->device == PCI_DEVICE_ID_VIA_K8M800 - || dev->pdev->device == PCI_DEVICE_ID_VIA_CN700) - && ((mode->hdisplay > 1280) && (mode->vdisplay > 1024))) + if ((dev->pdev->device == PCI_DEVICE_ID_VIA_CN700) && + ((mode->hdisplay > 1280) && (mode->vdisplay > 1024))) iga->display_queue_expire_num = 16; /* Set IGA1 Display FIFO Depth Select */ _______________________________________________ Openchrome-devel mailing list Openchrome-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/openchrome-devel