drivers/gpu/drm/openchrome/via_analog.c | 2 +- drivers/gpu/drm/openchrome/via_crtc.c | 14 ++++++++++++++ drivers/gpu/drm/openchrome/via_drv.c | 10 ++++++++-- drivers/gpu/drm/openchrome/via_drv.h | 4 ++-- drivers/gpu/drm/openchrome/via_fp.c | 7 ++++++- 5 files changed, 31 insertions(+), 6 deletions(-)
New commits: commit 5fb286ec71cf7cd4a058d7ae7bfeb3fa8ef1ed3f Author: Kevin Brace <kevinbr...@gmx.com> Date: Sun Oct 8 13:15:52 2017 -0700 Version bumped to 3.0.49 Another important upgrade to the code where the second displayâs cursor will be restored correctly after standby resume. Along with the previous version, there is now initial support for standby resume. Again, this hugely advances OpenChrome DRM towards mainlining. 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 59251d599de6..52aad8df5074 100644 --- a/drivers/gpu/drm/openchrome/via_drv.h +++ b/drivers/gpu/drm/openchrome/via_drv.h @@ -30,11 +30,11 @@ #define DRIVER_AUTHOR "OpenChrome Project" #define DRIVER_NAME "openchrome" #define DRIVER_DESC "OpenChrome DRM for VIA Technologies Chrome IGP" -#define DRIVER_DATE "20171007" +#define DRIVER_DATE "20171008" #define DRIVER_MAJOR 3 #define DRIVER_MINOR 0 -#define DRIVER_PATCHLEVEL 48 +#define DRIVER_PATCHLEVEL 49 #include <linux/module.h> commit 21f08bc8280b419629afbca792f50fc7995cc5df Author: Kevin Brace <kevinbr...@gmx.com> Date: Sun Oct 8 13:03:04 2017 -0700 Simplifying the code inside via_init Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/drivers/gpu/drm/openchrome/via_drv.c b/drivers/gpu/drm/openchrome/via_drv.c index 30b78e006186..d8df814dfba0 100644 --- a/drivers/gpu/drm/openchrome/via_drv.c +++ b/drivers/gpu/drm/openchrome/via_drv.c @@ -576,6 +576,8 @@ via_pci_remove(struct pci_dev *pdev) static struct pci_driver via_pci_driver = { .name = DRIVER_NAME, .id_table = via_pci_table, + .probe = via_pci_probe, + .remove = via_pci_remove, .driver.pm = &via_dev_pm_ops, }; @@ -584,10 +586,9 @@ static int __init via_init(void) via_driver.num_ioctls = via_max_ioctl; if (via_modeset) { - via_pci_driver.probe = via_pci_probe; - via_pci_driver.remove = via_pci_remove; via_driver.driver_features |= DRIVER_MODESET; } + return pci_register_driver(&via_pci_driver); } commit 8260bf78a5005d1cb8275b1fbabc0d4a23e69744 Author: Kevin Brace <kevinbr...@gmx.com> Date: Sun Oct 8 12:53:53 2017 -0700 Add copyright holder names and acknowledgement to via_drv.c The code for standby and resume was borrowed from Radeon DRM, but was shortened and simplified. For the rest of the code, the previous developerâs name should be added as well. Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/drivers/gpu/drm/openchrome/via_drv.c b/drivers/gpu/drm/openchrome/via_drv.c index 144abd9010cd..30b78e006186 100644 --- a/drivers/gpu/drm/openchrome/via_drv.c +++ b/drivers/gpu/drm/openchrome/via_drv.c @@ -1,7 +1,12 @@ /* + * Copyright 2017 Kevin Brace. All Rights Reserved. + * Copyright 2012 James Simmons <jsimm...@infradead.org>. All Rights Reserved. * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved. * Copyright 2001-2003 S3 Graphics, Inc. All Rights Reserved. * + * This DRM's standby and resume code is based on Radeon DRM's code, + * but it was shortened and simplified. + * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation commit ba2f0e8834f3c43b80acc3c67f0386c87e143fdd Author: Kevin Brace <kevinbr...@gmx.com> Date: Sun Oct 8 12:19:55 2017 -0700 Add copyright holder names to via_fp.c Many of via_fp.c lines of code were written by me (Kevin Brace), so I feel like I can now add my name to the file. Obviously, previous developerâs name should be added as well. Also, VIA Technologies and S3 Graphics names should be added since many of the FP register settings information originally came from their open source DDX. Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/drivers/gpu/drm/openchrome/via_fp.c b/drivers/gpu/drm/openchrome/via_fp.c index fcd32be661cf..8df2ffecdf84 100644 --- a/drivers/gpu/drm/openchrome/via_fp.c +++ b/drivers/gpu/drm/openchrome/via_fp.c @@ -1,4 +1,9 @@ /* + * Copyright 2017 Kevin Brace. All Rights Reserved. + * Copyright 2012 James Simmons <jsimm...@infradead.org>. All Rights Reserved. + * Copyright 1998-2008 VIA Technologies, Inc. All Rights Reserved. + * Copyright 2001-2008 S3 Graphics, Inc. All Rights Reserved. + * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation commit 87b27ef153e83d19d21f51c9e628abbd6a334fbb Author: Kevin Brace <kevinbr...@gmx.com> Date: Sun Oct 8 12:03:54 2017 -0700 Remove analog (VGA) and FP display controller restrictions A recent commit assigned analog (VGA) to IGA2 and FP (Flat Panel) to IGA1 due to HP 2133 mini-noteâs IGA2 display cursor disappearing after standby resume. This problem was fixed by the previous commit, so now the restrictions on the display controller assignment can be removed. Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/drivers/gpu/drm/openchrome/via_analog.c b/drivers/gpu/drm/openchrome/via_analog.c index efb9f0cedd2d..6f3fd48469f4 100644 --- a/drivers/gpu/drm/openchrome/via_analog.c +++ b/drivers/gpu/drm/openchrome/via_analog.c @@ -274,7 +274,7 @@ via_analog_init(struct drm_device *dev) DRM_MODE_ENCODER_DAC, NULL); drm_encoder_helper_add(&enc->base, &via_dac_enc_helper_funcs); - enc->base.possible_crtcs = BIT(1); + enc->base.possible_crtcs = BIT(1) | BIT(0); enc->base.possible_clones = 0; enc->di_port = VIA_DI_PORT_NONE; diff --git a/drivers/gpu/drm/openchrome/via_fp.c b/drivers/gpu/drm/openchrome/via_fp.c index ecc4cd99b84a..fcd32be661cf 100644 --- a/drivers/gpu/drm/openchrome/via_fp.c +++ b/drivers/gpu/drm/openchrome/via_fp.c @@ -1367,7 +1367,7 @@ via_lvds_init(struct drm_device *dev) DRM_MODE_ENCODER_LVDS, NULL); drm_encoder_helper_add(&enc->base, &via_lvds_helper_funcs); - enc->base.possible_crtcs = BIT(0); + enc->base.possible_crtcs = BIT(1) | BIT(0); if (dev_priv->int_fp1_presence) { enc->di_port = dev_priv->int_fp1_di_port; commit 3fc12cb0ee07814c0ca60bb31e97686dd2c8513c Author: Kevin Brace <kevinbr...@gmx.com> Date: Sun Oct 8 11:53:28 2017 -0700 Always set HI FIFO and colors when displaying display cursor Not doing this will cause IGA2 (Display Controller 2) to lose the display cursor after standby resume. 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 6c73bb7e6968..6a76f894e7ae 100644 --- a/drivers/gpu/drm/openchrome/via_crtc.c +++ b/drivers/gpu/drm/openchrome/via_crtc.c @@ -220,6 +220,20 @@ via_show_cursor(struct drm_crtc *crtc) VIA_WRITE(PRIM_HI_FBOFFSET, iga->cursor_kmap.bo->offset); VIA_WRITE(PRIM_HI_CTRL, 0x36000005); } + + /* Program Hardware Icon (HI) FIFO and foreground + * and background colors. */ + if (iga->index) { + VIA_WRITE(HI_TRANSPARENT_COLOR, 0x00000000); + VIA_WRITE(HI_INVTCOLOR, 0x00FFFFFF); + VIA_WRITE(ALPHA_V3_PREFIFO_CONTROL, 0x000E0000); + VIA_WRITE(ALPHA_V3_FIFO_CONTROL, 0x0E0F0000); + } else { + VIA_WRITE(PRIM_HI_TRANSCOLOR, 0x00000000); + VIA_WRITE(PRIM_HI_INVTCOLOR, 0x00FFFFFF); + VIA_WRITE(V327_HI_INVTCOLOR, 0x00FFFFFF); + VIA_WRITE(PRIM_HI_FIFO, 0x0D000D0F); + } } static int
_______________________________________________ Openchrome-devel mailing list Openchrome-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/openchrome-devel