All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/28] OpenChrome DRM for Linux 5.20
@ 2022-06-24 20:26 Kevin Brace
  2022-06-24 20:26 ` [PATCH 01/28] drm/via: Add via_3d_reg.h Kevin Brace
                   ` (20 more replies)
  0 siblings, 21 replies; 34+ messages in thread
From: Kevin Brace @ 2022-06-24 20:26 UTC (permalink / raw)
  To: dri-devel; +Cc: Kevin Brace

From: Kevin Brace <kevinbrace@bracecomputerlab.com>

Hi Dave and Daniel,

This is my first attempt (this is not a RFC posting) in trying to get
OpenChrome DRM pulled in for Linux 5.20.
I started to work on this seriously around the summer of 2017, so it has
been a long journey.
I know that the code is not quite perfect, but I have done as much work
as I can do on my own, and I now think that I should post the code on
dri-devel mailing list for other people to take a look at it.
Whether or not the code itself works or not, no, OpenChrome DRM is not
some vaporware, and the code reliability is comparable to the existing
OpenChrome DDX UMS code path.
The code reliability is more than good enough to the point where I utilize
the module almost every time I work on developing the code.
I am aware that the hardware (silicon) is quite old by today's standards,
so not too many people "still" (the word one open source software focused
journalist often uses to describe greater than 5 year old computer
hardware) own the VIA silicon hardware to actually test the code
themselves.
The current code is developed against drm-next branch
drm-next-2022-06-03-1 tag.
The current iteration of the code has no support for acceleration.
It is currently a mode setting only DRM module.
Even if the code is pulled into the Linux kernel tree, I will consider
the code experimental until at least 2D acceleration is implemented for
all supported devices.
Because of this, the DRM module requires via.modeset=1 to be added to
Linux kernel boot option line for it to function, and I intend to keep
this arrangement in place until at least 2D acceleration is fully
supported.
As a result, I think the code is fairly low risk to be pulled into the
Linux kernel tree.
The current module version is 3.5.2, but when the code is about to
be pulled into the kernel tree, I will like to up the version to 4.0.0.
This is because James Simmons era OpenChrome DRM used version number
3.0.x, but the current OpenChrome DRM uAPI implementation is different
from his implementation, so I will like to assign a new major version
(i.e., 4) so that DDX can distinguish the old and new OpenChrome DRM.
The current uAPI has no backward compatibility with the older DRI1 based
implementation, although some remnants of old DRI1 based uAPI still needs
to be there inside via_drm.h for XvMC based libraries on the DDX side to
properly compile.
It is my intention to replace the old DRI1 based VIA DRM located at
drivers/gpu/drm/via/ with OpenChrome DRM at the same location.
As I indicated previously, I do not wish to get pulled into the staging
area of the kernel tree.
I personally will like to have the option of porting the code to
BSD someday, however, the I2C bus access module (via_i2c.c) is GPL
based, so the DRM module license type is GPL (everything else is MIT
license based), for now.
I hope to replace this module someday with equivalent functionality
code that will be MIT license based.
I hope the uAPI variable types are compatible with BSD (please give
me advise on this since I do not know too much about this) since James
Simmons brought this up back in 2013 when he posted the code as RFC.

https://lists.freedesktop.org/archives/dri-devel/2013-June/039594.html
https://lists.freedesktop.org/archives/dri-devel/2013-June/040811.html


Features:

- Supports 12 different generations of VIA Technologies Chrome based
integrated graphics (CLE266 / KM400 / K8M800 / P4M800 Pro / PM800 /
P4M890 / K8M890 / P4M900 / CX700 / VX800 / VX855 / VX900 chipset) and
their variants
- Support for DAC (VGA), LVDS flat panel, DVI (CX700 / VX800 chipset
integrated, VX900 chipset integrated, and Silicon Image SiI164 /
VIA Technologies VT1632(A) DVI transmitter), and HDMI (VX900H chipset
integrated)
- Support for standby resume (ACPI S3 State)
- Support for dual head operation
- Supports atomic mode setting (implementation might still be incomplete
especially around gamma correction / palette initialization)
- Utilizes GEM / TTM for memory management
- Utilizes DRM FB Helper for FBDEV emulation


Known issues:

- via_lvds.c gives out 3 unused function warnings (willing to delete
the offending functions since they are not used)
- Gamma correction / palette initialization code is still legacy KMS
based (Daniel, how do I convert it for atomic mode setting?)
- uAPI might not be quite right (Do I need something like
DRM_IOCTL_VIA_GEM_DESTROY or DRM_IOCTL_VIA_GEM_FREE call to pair it
against DRM_IOCTL_VIA_GEM_CREATE?)


Code repository:
https://cgit.freedesktop.org/openchrome/drm-openchrome/

Current bleeding edge branch (drm-next-5.20 branch):
https://cgit.freedesktop.org/openchrome/drm-openchrome/?h=drm-next-5.20

Current bleeding edge branch (drm-next-5.20 branch) code location:
https://cgit.freedesktop.org/openchrome/drm-openchrome/tree/drivers/gpu/drm/via?h=drm-next-5.20
https://cgit.freedesktop.org/openchrome/drm-openchrome/tree/include/uapi/drm?h=drm-next-5.20

Obviously, I do not expect to get the code pulled in on my first try,
but if other people can point out what I need to improve, I will try to
improve the code so that I can get the code pulled in as soon as possible.
Personally, I will like the code to be pulled in for Linux 5.20, but I
sort of expect the next release after 5.20 is more likely.

Regards,

Kevin Brace
Brace Computer Laboratory blog
https://bracecomputerlab.com


---
Kevin Brace (28):
  drm/via: Add via_3d_reg.h
  drm/via: Add via_crtc_hw.h
  drm/via: Add via_disp_reg.h
  drm/via: Add via_drv.h
  drm/via: Add via_regs.h
  drm/via: Add via_crtc.c
  drm/via: Add via_crtc_hw.c
  drm/via: Add via_cursor.c
  drm/via: Add via_dac.c
  drm/via: Add via_display.c
  drm/via: Add via_drv.c
  drm/via: Add via_encoder.c
  drm/via: Add via_hdmi.c
  drm/via: Add via_i2c.c
  drm/via: Add via_init.c
  drm/via: Add via_ioctl.c
  drm/via: Add via_lvds.c
  drm/via: Add via_object.c
  drm/via: Add via_pll.c
  drm/via: Add via_pm.c
  drm/via: Add via_sii164.c
  drm/via: Add via_tmds.c
  drm/via: Add via_ttm.c
  drm/via: Add via_vt1632.c
  drm/via: Add via_drm.h
  drm/via: Add Kconfig
  drm/via: Add Makefile
  drm/via: Modify DRM main Makefile to be able to build OpenChrome DRM

 drivers/gpu/drm/Makefile           |    1 +
 drivers/gpu/drm/via/Kconfig        |   10 +
 drivers/gpu/drm/via/Makefile       |   26 +
 drivers/gpu/drm/via/via_3d_reg.h   | 1863 ++++++++++++++++++++++
 drivers/gpu/drm/via/via_crtc.c     | 2324 ++++++++++++++++++++++++++++
 drivers/gpu/drm/via/via_crtc_hw.c  |   91 ++
 drivers/gpu/drm/via/via_crtc_hw.h  | 1048 +++++++++++++
 drivers/gpu/drm/via/via_cursor.c   |  419 +++++
 drivers/gpu/drm/via/via_dac.c      |  504 ++++++
 drivers/gpu/drm/via/via_disp_reg.h |  513 ++++++
 drivers/gpu/drm/via/via_display.c  |  125 ++
 drivers/gpu/drm/via/via_drv.c      |  313 ++++
 drivers/gpu/drm/via/via_drv.h      |  437 ++++++
 drivers/gpu/drm/via/via_encoder.c  |  173 +++
 drivers/gpu/drm/via/via_hdmi.c     |  719 +++++++++
 drivers/gpu/drm/via/via_i2c.c      |  209 +++
 drivers/gpu/drm/via/via_init.c     | 1300 ++++++++++++++++
 drivers/gpu/drm/via/via_ioctl.c    |  122 ++
 drivers/gpu/drm/via/via_lvds.c     | 1420 +++++++++++++++++
 drivers/gpu/drm/via/via_object.c   |  324 ++++
 drivers/gpu/drm/via/via_pll.c      |  263 ++++
 drivers/gpu/drm/via/via_pm.c       |  187 +++
 drivers/gpu/drm/via/via_regs.h     |  296 ++++
 drivers/gpu/drm/via/via_sii164.c   |  563 +++++++
 drivers/gpu/drm/via/via_tmds.c     |  714 +++++++++
 drivers/gpu/drm/via/via_ttm.c      |  168 ++
 drivers/gpu/drm/via/via_vt1632.c   |  583 +++++++
 include/uapi/drm/via_drm.h         |  309 ++++
 28 files changed, 15024 insertions(+)
 create mode 100644 drivers/gpu/drm/via/Kconfig
 create mode 100644 drivers/gpu/drm/via/Makefile
 create mode 100644 drivers/gpu/drm/via/via_3d_reg.h
 create mode 100644 drivers/gpu/drm/via/via_crtc.c
 create mode 100644 drivers/gpu/drm/via/via_crtc_hw.c
 create mode 100644 drivers/gpu/drm/via/via_crtc_hw.h
 create mode 100644 drivers/gpu/drm/via/via_cursor.c
 create mode 100644 drivers/gpu/drm/via/via_dac.c
 create mode 100644 drivers/gpu/drm/via/via_disp_reg.h
 create mode 100644 drivers/gpu/drm/via/via_display.c
 create mode 100644 drivers/gpu/drm/via/via_drv.c
 create mode 100644 drivers/gpu/drm/via/via_drv.h
 create mode 100644 drivers/gpu/drm/via/via_encoder.c
 create mode 100644 drivers/gpu/drm/via/via_hdmi.c
 create mode 100644 drivers/gpu/drm/via/via_i2c.c
 create mode 100644 drivers/gpu/drm/via/via_init.c
 create mode 100644 drivers/gpu/drm/via/via_ioctl.c
 create mode 100644 drivers/gpu/drm/via/via_lvds.c
 create mode 100644 drivers/gpu/drm/via/via_object.c
 create mode 100644 drivers/gpu/drm/via/via_pll.c
 create mode 100644 drivers/gpu/drm/via/via_pm.c
 create mode 100644 drivers/gpu/drm/via/via_regs.h
 create mode 100644 drivers/gpu/drm/via/via_sii164.c
 create mode 100644 drivers/gpu/drm/via/via_tmds.c
 create mode 100644 drivers/gpu/drm/via/via_ttm.c
 create mode 100644 drivers/gpu/drm/via/via_vt1632.c
 create mode 100644 include/uapi/drm/via_drm.h

--
2.35.1


^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2022-06-30  8:34 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-24 20:26 [PATCH 00/28] OpenChrome DRM for Linux 5.20 Kevin Brace
2022-06-24 20:26 ` [PATCH 01/28] drm/via: Add via_3d_reg.h Kevin Brace
2022-06-24 20:26 ` [PATCH 02/28] drm/via: Add via_crtc_hw.h Kevin Brace
2022-06-24 20:26 ` [PATCH 03/28] drm/via: Add via_disp_reg.h Kevin Brace
2022-06-24 20:26 ` [PATCH 04/28] drm/via: Add via_drv.h Kevin Brace
2022-06-25  6:51   ` Sam Ravnborg
2022-06-28 14:33     ` Jani Nikula
2022-06-28 14:32   ` Jani Nikula
2022-06-24 20:26 ` [PATCH 05/28] drm/via: Add via_regs.h Kevin Brace
2022-06-24 20:26 ` [PATCH 06/28] drm/via: Add via_crtc.c Kevin Brace
2022-06-24 20:26 ` [PATCH 07/28] drm/via: Add via_crtc_hw.c Kevin Brace
2022-06-24 20:26 ` [PATCH 08/28] drm/via: Add via_cursor.c Kevin Brace
2022-06-25  6:59   ` Sam Ravnborg
2022-06-24 20:26 ` [PATCH 09/28] drm/via: Add via_dac.c Kevin Brace
2022-06-24 20:26 ` [PATCH 10/28] drm/via: Add via_display.c Kevin Brace
2022-06-24 20:26 ` [PATCH 11/28] drm/via: Add via_drv.c Kevin Brace
2022-06-25  7:15   ` Sam Ravnborg
2022-06-24 20:26 ` [PATCH 12/28] drm/via: Add via_encoder.c Kevin Brace
2022-06-24 20:26 ` [PATCH 13/28] drm/via: Add via_hdmi.c Kevin Brace
2022-06-24 20:26 ` [PATCH 14/28] drm/via: Add via_i2c.c Kevin Brace
2022-06-24 20:26 ` [PATCH 15/28] drm/via: Add via_init.c Kevin Brace
2022-06-24 20:26 ` [PATCH 16/28] drm/via: Add via_ioctl.c Kevin Brace
2022-06-24 20:26 ` [PATCH 17/28] drm/via: Add via_lvds.c Kevin Brace
2022-06-24 20:26 ` [PATCH 18/28] drm/via: Add via_object.c Kevin Brace
2022-06-24 20:26 ` [PATCH 19/28] drm/via: Add via_pll.c Kevin Brace
2022-06-24 21:15 ` [PATCH 00/28] OpenChrome DRM for Linux 5.20 Sam Ravnborg
2022-06-24 23:14   ` Kevin Brace
2022-06-27  7:37 ` Thomas Zimmermann
2022-06-27 21:32   ` Sam Ravnborg
2022-06-28 12:21     ` Thomas Zimmermann
2022-06-30  8:07       ` Javier Martinez Canillas
2022-06-30  8:19         ` Thomas Zimmermann
2022-06-30  8:27           ` Javier Martinez Canillas
2022-06-30  8:33           ` Thomas Zimmermann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.