drm/via: drop use of deprecated headers drmP.h and drm_os_linux.h

Submitted by Sam Ravnborg on July 18, 2019, 3:37 p.m.

Details

Reviewer None
Submitted July 18, 2019, 3:37 p.m.
Last Updated July 20, 2019, 8:46 a.m.
Revision 2

Cover Letter(s)

Revision 1
      This is some janitorial updates to the via driver
that is required to get rid of deprecated headers
in the drm subsystem.

The first three patches are trivial, where
the dependencies on drmP.h and drm_os_linux are dropped.

The remaining three patches drop use of DRM_WAIT_ON().
They are replaced by wait_event_interruptible_timeout().
These patches could use a more critical review.

When replacing DRM_WAIT_ON() I took care to not change the uapi,
by continue to use the original return codes.

The following table was used for the transition:

               DRM_WAIT_ON   wait_event_interruptible_timeout
               -----------  ---------------------------------
condition OK:    ret                   >= 1
timeout:        -EBUSY                  0
interrupted:    -EINTR             -ERESTARTSYS

The changes has been build tested only.
Testing on a real device would be highly appreciated.

I had preferred that the via driver was replaced by the
openchrome driver, but until we have it then we need
to deal with the legacy via driver to remove old cruft
in the drm subsystem.

Note: A simpler approach had been to copy DRM_WAIT_ON
to via_drv.h, but then the actual solution is
presumeably better.

	Sam


Sam Ravnborg (6):
      drm/via: drop use of DRM(READ|WRITE) macros
      drm/via: make via_drv.h self-contained
      drm/via: drop use of drmP.h
      drm/via: drop DRM_WAIT_ON() in via_dmablit.c
      drm/via: drop DRM_WAIT_ON() in via_irq
      drm/via: drop DRM_WAIT_ON() in via_video

 drivers/gpu/drm/via/via_dma.c      |  9 +++++-
 drivers/gpu/drm/via/via_dmablit.c  | 66 +++++++++++++++++++++++++++-----------
 drivers/gpu/drm/via/via_drv.c      |  7 ++--
 drivers/gpu/drm/via/via_drv.h      | 21 +++++++++---
 drivers/gpu/drm/via/via_irq.c      | 37 +++++++++++++++------
 drivers/gpu/drm/via/via_map.c      |  6 +++-
 drivers/gpu/drm/via/via_mm.c       |  7 +++-
 drivers/gpu/drm/via/via_verifier.c | 10 +++---
 drivers/gpu/drm/via/via_video.c    | 23 ++++++++++---
 9 files changed, 137 insertions(+), 49 deletions(-)
    
Revision 2
      This is some janitorial updates to the via driver
that is required to get rid of deprecated headers
in the drm subsystem.

The first three patches prepare for the removal of drmP.h.
The last patch remove use of drmP.h and replace with necessary
include files to fix build.

Build tested with various configs and various architectures.

I had preferred that the via driver was replaced by the
openchrome driver, but until we have it then we need
to deal with the legacy via driver when removing old cruft
in the drm subsystem.

v2:
- Add a copy of DRM_WAIT_ON to the via driver, keeping
  the changes to this legacy driver to a minimum.
  This also gives much more confidence that the
  driver continues to work as there is no changes
  in logic. Therefore dropped "RFT".
- Added Cc: Michel Dänzer <michel@daenzer.net> to all
  patches, as Michael have commented on the series.

	Sam

Sam Ravnborg (4):
      drm/via: drop use of DRM(READ|WRITE) macros
      drm/via: add VIA_WAIT_ON()
      drm/via: make via_drv.h self-contained
      drm/via: drop use of drmP.h

 drivers/gpu/drm/via/via_dma.c      |  9 +++++-
 drivers/gpu/drm/via/via_dmablit.c  | 17 +++++++-----
 drivers/gpu/drm/via/via_drv.c      |  7 +++--
 drivers/gpu/drm/via/via_drv.h      | 57 ++++++++++++++++++++++++++++++++++----
 drivers/gpu/drm/via/via_irq.c      |  8 ++++--
 drivers/gpu/drm/via/via_map.c      |  6 +++-
 drivers/gpu/drm/via/via_mm.c       |  7 ++++-
 drivers/gpu/drm/via/via_verifier.c | 10 +++----
 drivers/gpu/drm/via/via_video.c    |  5 ++--
 9 files changed, 99 insertions(+), 27 deletions(-)
    

Revisions