(no subject)
Subsystems (2)
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.
v3:
- Use static inline functions for the read/write operations (Emil)
- Use dedicated *_mask_or() and *_mask_and() (Emil)
- Replace DRM_WAIT_ON in same path that introduces VIA_WAIT_ON (Emil)
- Collected r-b's
- Changelog adjustments
- Rebased on top of drm-misc-next
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 <[email protected]> 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: copy DRM_WAIT_ON as VIA_WAIT_ON and use it drm/via: make via_drv.h self-contained drm/via: drop use of drmP.h
drivers/gpu/drm/via/via_dma.c | 43 +++++++++++--------- drivers/gpu/drm/via/via_dmablit.c | 41 ++++++++++--------- drivers/gpu/drm/via/via_drv.c | 7 +++- drivers/gpu/drm/via/via_drv.h | 83 +++++++++++++++++++++++++++++++++++--- drivers/gpu/drm/via/via_irq.c | 54 +++++++++++++------------ drivers/gpu/drm/via/via_map.c | 6 ++- drivers/gpu/drm/via/via_mm.c | 7 +++- drivers/gpu/drm/via/via_verifier.c | 22 +++++----- drivers/gpu/drm/via/via_video.c | 5 ++- 9 files changed, 182 insertions(+), 86 deletions(-)
_______________________________________________
openchrome-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/openchrome-devel
PATCH v3 1/4 drm/via: drop use of DRM(READ|WRITE) macros
The DRM_READ, DRM_WRITE macros comes from the deprecated drm_os_linux.h header file. Remove their use to remove this dependency.
Replace the use of the macros with static inline variants.
v3:
- Use static inline functions, rather than macros (Emil)
- Use dedicated mask variants for byte access (Emil)
--- drivers/gpu/drm/via/via_dma.c | 34 +++++++++++----------- drivers/gpu/drm/via/via_dmablit.c | 24 ++++++++-------- drivers/gpu/drm/via/via_drv.h | 40 ++++++++++++++++++++++---- drivers/gpu/drm/via/via_irq.c | 46 +++++++++++++++--------------- drivers/gpu/drm/via/via_verifier.c | 12 ++++---- 5 files changed, 92 insertions(+), 64 deletions(-)
drivers/gpu/drm/via/via_dma.c +17 -17
@@ -430,14 +430,14 @@ static int via_hook_segment(drm_via_private_t *dev_priv, diff = (uint32_t ) (ptr - reader) - dev_priv->dma_diff; count =10000000 ;while (diff ==0 && count--) { - paused = (VIA_READ (0x41c ) &0x80000000 ); + paused = (via_read (dev_priv,0x41c ) &0x80000000 );if (paused)break ; reader = *(dev_priv->hw_addr_ptr); diff = (uint32_t ) (ptr - reader) - dev_priv->dma_diff; } - paused =VIA_READ (0x41c ) &0x80000000 ; + paused =via_read (dev_priv,0x41c ) &0x80000000 ;if (paused && !no_pci_fire) { reader = *(dev_priv->hw_addr_ptr);
@@ -454,10 +454,10 @@ static int via_hook_segment(drm_via_private_t *dev_priv,* doesn't make a difference. */ -VIA_WRITE (VIA_REG_TRANSET , (HC_ParaType_PreCR <<16 )); -VIA_WRITE (VIA_REG_TRANSPACE , pause_addr_hi); -VIA_WRITE (VIA_REG_TRANSPACE , pause_addr_lo); -VIA_READ (VIA_REG_TRANSPACE ); +via_write (dev_priv,VIA_REG_TRANSET , (HC_ParaType_PreCR <<16 )); +via_write (dev_priv,VIA_REG_TRANSPACE , pause_addr_hi); +via_write (dev_priv,VIA_REG_TRANSPACE , pause_addr_lo); +via_read (dev_priv,VIA_REG_TRANSPACE ); } }return paused;
@@ -467,10 +467,10 @@ static int via_wait_idle(drm_via_private_t *dev_priv) {int count =10000000 ; -while (!(VIA_READ (VIA_REG_STATUS ) &VIA_VR_QUEUE_BUSY ) && --count) +while (!(via_read (dev_priv,VIA_REG_STATUS ) &VIA_VR_QUEUE_BUSY ) && --count) ; -while (count && (VIA_READ (VIA_REG_STATUS ) & +while (count && (via_read (dev_priv,VIA_REG_STATUS ) & (VIA_CMD_RGTR_BUSY |VIA_2D_ENG_BUSY |VIA_3D_ENG_BUSY ))) --count;
@@ -536,21 +536,21 @@ static void via_cmdbuf_start(drm_via_private_t *dev_priv)via_flush_write_combine (); (void ) *(volatile uint32_t *)dev_priv->last_pause_ptr; -VIA_WRITE (VIA_REG_TRANSET , (HC_ParaType_PreCR <<16 )); -VIA_WRITE (VIA_REG_TRANSPACE , command); -VIA_WRITE (VIA_REG_TRANSPACE , start_addr_lo); -VIA_WRITE (VIA_REG_TRANSPACE , end_addr_lo); +via_write (dev_priv,VIA_REG_TRANSET , (HC_ParaType_PreCR <<16 )); +via_write (dev_priv,VIA_REG_TRANSPACE , command); +via_write (dev_priv,VIA_REG_TRANSPACE , start_addr_lo); +via_write (dev_priv,VIA_REG_TRANSPACE , end_addr_lo); -VIA_WRITE (VIA_REG_TRANSPACE , pause_addr_hi); -VIA_WRITE (VIA_REG_TRANSPACE , pause_addr_lo); +via_write (dev_priv,VIA_REG_TRANSPACE , pause_addr_hi); +via_write (dev_priv,VIA_REG_TRANSPACE , pause_addr_lo);wmb (); -VIA_WRITE (VIA_REG_TRANSPACE , command |HC_HAGPCMNT_MASK ); -VIA_READ (VIA_REG_TRANSPACE ); +via_write (dev_priv,VIA_REG_TRANSPACE , command |HC_HAGPCMNT_MASK ); +via_read (dev_priv,VIA_REG_TRANSPACE ); dev_priv->dma_diff =0 ; count =10000000 ; -while (!(VIA_READ (0x41c ) &0x80000000 ) && count--); +while (!(via_read (dev_priv,0x41c ) &0x80000000 ) && count--); reader = *(dev_priv->hw_addr_ptr); ptr = ((volatile char *)dev_priv->last_pause_ptr - dev_priv->dma_ptr) +
drivers/gpu/drm/via/via_dmablit.c +12 -12
@@ -214,16 +214,16 @@ via_fire_dmablit(struct drm_device *dev, drm_via_sg_info_t *vsg, int engine) {drm_via_private_t *dev_priv = (drm_via_private_t *)dev->dev_private; -VIA_WRITE (VIA_PCI_DMA_MAR0 + engine*0x10 ,0 ); -VIA_WRITE (VIA_PCI_DMA_DAR0 + engine*0x10 ,0 ); -VIA_WRITE (VIA_PCI_DMA_CSR0 + engine*0x04 ,VIA_DMA_CSR_DD |VIA_DMA_CSR_TD | +via_write (dev_priv,VIA_PCI_DMA_MAR0 + engine*0x10 ,0 ); +via_write (dev_priv,VIA_PCI_DMA_DAR0 + engine*0x10 ,0 ); +via_write (dev_priv,VIA_PCI_DMA_CSR0 + engine*0x04 ,VIA_DMA_CSR_DD |VIA_DMA_CSR_TD |VIA_DMA_CSR_DE ); -VIA_WRITE (VIA_PCI_DMA_MR0 + engine*0x04 ,VIA_DMA_MR_CM |VIA_DMA_MR_TDIE ); -VIA_WRITE (VIA_PCI_DMA_BCR0 + engine*0x10 ,0 ); -VIA_WRITE (VIA_PCI_DMA_DPR0 + engine*0x10 , vsg->chain_start); +via_write (dev_priv,VIA_PCI_DMA_MR0 + engine*0x04 ,VIA_DMA_MR_CM |VIA_DMA_MR_TDIE ); +via_write (dev_priv,VIA_PCI_DMA_BCR0 + engine*0x10 ,0 ); +via_write (dev_priv,VIA_PCI_DMA_DPR0 + engine*0x10 , vsg->chain_start);wmb (); -VIA_WRITE (VIA_PCI_DMA_CSR0 + engine*0x04 ,VIA_DMA_CSR_DE |VIA_DMA_CSR_TS ); -VIA_READ (VIA_PCI_DMA_CSR0 + engine*0x04 ); +via_write (dev_priv,VIA_PCI_DMA_CSR0 + engine*0x04 ,VIA_DMA_CSR_DE |VIA_DMA_CSR_TS ); +via_read (dev_priv,VIA_PCI_DMA_CSR0 + engine*0x04 ); }/*
@@ -291,7 +291,7 @@ via_abort_dmablit(struct drm_device *dev, int engine) {drm_via_private_t *dev_priv = (drm_via_private_t *)dev->dev_private; -VIA_WRITE (VIA_PCI_DMA_CSR0 + engine*0x04 ,VIA_DMA_CSR_TA ); +via_write (dev_priv,VIA_PCI_DMA_CSR0 + engine*0x04 ,VIA_DMA_CSR_TA ); } static void
@@ -299,7 +299,7 @@ via_dmablit_engine_off(struct drm_device *dev, int engine) {drm_via_private_t *dev_priv = (drm_via_private_t *)dev->dev_private; -VIA_WRITE (VIA_PCI_DMA_CSR0 + engine*0x04 ,VIA_DMA_CSR_TD |VIA_DMA_CSR_DD ); +via_write (dev_priv,VIA_PCI_DMA_CSR0 + engine*0x04 ,VIA_DMA_CSR_TD |VIA_DMA_CSR_DD ); }
@@ -330,7 +330,7 @@ via_dmablit_handler(struct drm_device *dev, int engine, int from_irq)spin_lock_irqsave (&blitq->blit_lock, irqsave); done_transfer = blitq->is_active && - ((status =VIA_READ (VIA_PCI_DMA_CSR0 + engine*0x04 )) &VIA_DMA_CSR_TD ); + ((status =via_read (dev_priv,VIA_PCI_DMA_CSR0 + engine*0x04 )) &VIA_DMA_CSR_TD ); done_transfer = done_transfer || (blitq->aborting && !(status &VIA_DMA_CSR_DE )); cur = blitq->cur;
@@ -349,7 +349,7 @@ via_dmablit_handler(struct drm_device *dev, int engine, int from_irq)* Clear transfer done flag. */ -VIA_WRITE (VIA_PCI_DMA_CSR0 + engine*0x04 ,VIA_DMA_CSR_TD ); +via_write (dev_priv,VIA_PCI_DMA_CSR0 + engine*0x04 ,VIA_DMA_CSR_TD ); blitq->is_active =0 ; blitq->aborting =0 ;
drivers/gpu/drm/via/via_drv.h +34 -6
@@ -113,12 +113,40 @@ enum via_family { };/* VIA MMIO register access */ -#define VIA_BASE ((dev_priv->mmio)) - -#define VIA_READ (reg) DRM_READ32(VIA_BASE, reg) -#define VIA_WRITE (reg, val) DRM_WRITE32(VIA_BASE, reg, val) -#define VIA_READ8 (reg) DRM_READ8(VIA_BASE, reg) -#define VIA_WRITE8 (reg, val) DRM_WRITE8(VIA_BASE, reg, val) +static inline u32 via_read (struct drm_via_private *dev_priv,u32 reg) +{ +return readl ((void __iomem *)(dev_priv->mmio->handle + reg)); +} + +static inline void via_write (struct drm_via_private *dev_priv,u32 reg, +u32 val) +{ +writel (val, (void __iomem *)(dev_priv->mmio->handle + reg)); +} + +static inline void via_write8 (struct drm_via_private *dev_priv,u32 reg, +u32 val) +{ +writeb (val, (void __iomem *)(dev_priv->mmio->handle + reg)); +} + +static inline void via_write8_mask_or (struct drm_via_private *dev_priv, +u32 reg,u32 mask) +{ +u32 val; + + val =readb ((void __iomem *)(dev_priv->mmio->handle + reg)); +writeb (val | mask, (void __iomem *)(dev_priv->mmio->handle + reg)); +} + +static inline void via_write8_mask_and (struct drm_via_private *dev_priv, +u32 reg,u32 mask) +{ +u32 val; + + val =readb ((void __iomem *)(dev_priv->mmio->handle + reg)); +writeb (val & mask, (void __iomem *)(dev_priv->mmio->handle + reg)); +}extern const struct drm_ioctl_desc via_ioctls[];extern int via_max_ioctl;
drivers/gpu/drm/via/via_irq.c +23 -23
106 lines not on this page · raw message
drivers/gpu/drm/via/via_verifier.c +6 -6
@@ -725,14 +725,14 @@ via_parse_header2(drm_via_private_t *dev_priv, uint32_t const **buffer, next_fire = dev_priv->fire_offsets[*fire_count]; buf++; cmd = (*buf &0xFFFF0000 ) >>16 ; -VIA_WRITE (HC_REG_TRANS_SET +HC_REG_BASE , *buf++); +via_write (dev_priv,HC_REG_TRANS_SET +HC_REG_BASE , *buf++);switch (cmd) {case HC_ParaType_CmdVdata:while ((buf < buf_end) && (*fire_count < dev_priv->num_fire_offsets) && (*buf &HC_ACMD_MASK ) == HC_ACMD_HCmdB) {while (buf <= next_fire) { -VIA_WRITE (HC_REG_TRANS_SPACE +HC_REG_BASE + +via_write (dev_priv,HC_REG_TRANS_SPACE +HC_REG_BASE + (burst &63 ), *buf++); burst +=4 ; }
@@ -753,7 +753,7 @@ via_parse_header2(drm_via_private_t *dev_priv, uint32_t const **buffer, (*buf & VIA_VIDEOMASK) == VIA_VIDEO_HEADER6) break; -VIA_WRITE (HC_REG_TRANS_SPACE +HC_REG_BASE + +via_write (dev_priv,HC_REG_TRANS_SPACE +HC_REG_BASE + (burst &63 ), *buf++); burst +=4 ; }
@@ -843,7 +843,7 @@ via_parse_header1(drm_via_private_t *dev_priv, uint32_t const **buffer, cmd = *buf;if ((cmd &HALCYON_HEADER1MASK ) !=HALCYON_HEADER1 )break ; -VIA_WRITE ((cmd & ~HALCYON_HEADER1MASK ) <<2 , *++buf); +via_write (dev_priv, (cmd & ~HALCYON_HEADER1MASK ) <<2 , *++buf); buf++; } *buffer = buf;
@@ -894,7 +894,7 @@ via_parse_vheader5(drm_via_private_t *dev_priv, uint32_t const **buffer, i = count = *buf; buf +=3 ;while (i--) -VIA_WRITE (addr, *buf++); +via_write (dev_priv, addr, *buf++);if (count &3 ) buf +=4 - (count &3 ); *buffer = buf;
@@ -950,7 +950,7 @@ via_parse_vheader6(drm_via_private_t *dev_priv, uint32_t const **buffer, buf +=3 ;while (i--) { addr = *buf++; -VIA_WRITE (addr, *buf++); +via_write (dev_priv, addr, *buf++); } count <<=1 ;if (count &3 )
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v3 2/4 drm/via: copy DRM_WAIT_ON as VIA_WAIT_ON and use it
In reply to Sam RavnborgVIA_WAIT_ON() is a direct copy of DRM_WAIT_ON() from drm_os_linux.h.
The copy is made so we can avoid the dependency on the legacy header. A more involved approach had been to introduce wait_event_* but for this legacy driver the simpler and more safe approach with a copy of the macro was selected.
Added the relevant header files for the functions used in VIA_WAIT_ON.
v3:
- Updated users of DRM_WAIT_ON => VIA_WAIT_ON (Emil)
- Updated $subject (Emil)
--- drivers/gpu/drm/via/via_dmablit.c | 4 +-- drivers/gpu/drm/via/via_drv.h | 42 ++++++++++++++++++++++++++++++- drivers/gpu/drm/via/via_irq.c | 4 +-- drivers/gpu/drm/via/via_video.c | 2 +- 4 files changed, 46 insertions(+), 6 deletions(-)
drivers/gpu/drm/via/via_dmablit.c +2 -2
@@ -436,7 +436,7 @@ via_dmablit_sync(struct drm_device *dev, uint32_t handle, int engine)int ret =0 ;if (via_dmablit_active (blitq, engine, handle, &queue)) { -DRM_WAIT_ON (ret, *queue,3 *HZ , +VIA_WAIT_ON (ret, *queue,3 *HZ , !via_dmablit_active (blitq, engine, handle,NULL )); } DRM_DEBUG("DMA blit sync handle 0x%x engine %d returned %d\n",
@@ -687,7 +687,7 @@ via_dmablit_grab_slot(drm_via_blitq_t *blitq, int engine)while (blitq->num_free ==0 ) {spin_unlock_irqrestore (&blitq->blit_lock, irqsave); -DRM_WAIT_ON (ret, blitq->busy_queue,HZ , blitq->num_free >0 ); +VIA_WAIT_ON (ret, blitq->busy_queue,HZ , blitq->num_free >0 );if (ret)return (-EINTR == ret) ? -EAGAIN : ret;
drivers/gpu/drm/via/via_drv.h +41 -1
55 lines not on this page · raw message
drivers/gpu/drm/via/via_irq.c +2 -2
@@ -233,12 +233,12 @@ via_driver_irq_wait(struct drm_device *dev, unsigned int irq, int force_sequence cur_irq = dev_priv->via_irqs + real_irq;if (masks[real_irq][2 ] && !force_sequence) { -DRM_WAIT_ON (ret, cur_irq->irq_queue,3 *HZ , +VIA_WAIT_ON (ret, cur_irq->irq_queue,3 *HZ , ((via_read (dev_priv, masks[irq][2 ]) & masks[irq][3 ]) == masks[irq][4 ])); cur_irq_sequence =atomic_read (&cur_irq->irq_received); }else { -DRM_WAIT_ON (ret, cur_irq->irq_queue,3 *HZ , +VIA_WAIT_ON (ret, cur_irq->irq_queue,3 *HZ , (((cur_irq_sequence =atomic_read (&cur_irq->irq_received)) - *sequence) <= (1 <<23 )));
drivers/gpu/drm/via/via_video.c +1 -1
@@ -82,7 +82,7 @@ int via_decoder_futex(struct drm_device *dev, void *data, struct drm_file *file_switch (fx->func) {case VIA_FUTEX_WAIT : -DRM_WAIT_ON (ret, dev_priv->decoder_queue[fx->lock], +VIA_WAIT_ON (ret, dev_priv->decoder_queue[fx->lock], (fx->ms /10 ) * (HZ /100 ), *lock != fx->val);return ret;case VIA_FUTEX_WAKE :
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v3 3/4 drm/via: make via_drv.h self-contained
In reply to Sam RavnborgAdded include of header files to make via_drv.h self-contained.
v3:
- Reworded changelog a little - to reflect that more than one header files are added
--- drivers/gpu/drm/via/via_drv.h | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/via/via_drv.h +3 -0
@@ -24,13 +24,16 @@#ifndef _VIA_DRV_H_#define _VIA_DRV_H_ +#include <linux/irqreturn.h> #include <linux/jiffies.h> #include <linux/sched.h> #include <linux/sched/signal.h> #include <linux/wait.h> +#include <drm/drm_ioctl.h> #include <drm/drm_legacy.h> #include <drm/drm_mm.h> +#include <drm/via_drm.h> #define DRIVER_AUTHOR "Various"
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v3 4/4 drm/via: drop use of drmP.h
In reply to Sam RavnborgDrop use of the deprecated drmP.h header. While touching the files divide include files in blocks and sort the files alphabetically.
v2:
- Replace all uses of DRM_WAIT_ON() with VIA_WAIT_ON() and thus avoiding to pull in drm_os_linux.h
v3:
- DRM_WAIT_ON replacement moved to earlier patch (Emil)
--- drivers/gpu/drm/via/via_dma.c | 9 ++++++++- drivers/gpu/drm/via/via_dmablit.c | 13 ++++++++----- drivers/gpu/drm/via/via_drv.c | 7 +++++-- drivers/gpu/drm/via/via_irq.c | 4 +++- 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 | 3 ++- 8 files changed, 42 insertions(+), 17 deletions(-)
drivers/gpu/drm/via/via_dma.c +8 -1
@@ -34,8 +34,15 @@* Thomas Hellstrom. */ -#include <drm/drmP.h> +#include <linux/delay.h> +#include <linux/uaccess.h> + +#include <drm/drm.h> +#include <drm/drm_agpsupport.h> +#include <drm/drm_device.h> +#include <drm/drm_file.h> #include <drm/via_drm.h> +#include "via_drv.h" #include "via_3d_reg.h"
drivers/gpu/drm/via/via_dmablit.c +8 -5
@@ -34,13 +34,16 @@* the same DMA mappings? */ -#include <drm/drmP.h> -#include <drm/via_drm.h> -#include "via_drv.h" -#include "via_dmablit.h" -#include <linux/pagemap.h> #include <linux/slab.h> +#include <linux/vmalloc.h> + +#include <drm/drm_device.h> +#include <drm/drm_pci.h> +#include <drm/via_drm.h> + +#include "via_dmablit.h" +#include "via_drv.h" #define VIA_PGDN (x) (((unsigned long)(x)) & PAGE_MASK)#define VIA_PGOFF (x) (((unsigned long)(x)) & ~PAGE_MASK)
drivers/gpu/drm/via/via_drv.c +5 -2
@@ -24,11 +24,14 @@#include <linux/module.h> -#include <drm/drmP.h> +#include <drm/drm_drv.h> +#include <drm/drm_file.h> +#include <drm/drm_pci.h> +#include <drm/drm_pciids.h> #include <drm/via_drm.h> +#include "via_drv.h" -#include <drm/drm_pciids.h> static int via_driver_open (struct drm_device *dev,struct drm_file *file) {
drivers/gpu/drm/via/via_irq.c +3 -1
@@ -35,8 +35,10 @@* The refresh rate is also calculated for video playback sync purposes. */ -#include <drm/drmP.h> +#include <drm/drm_device.h> +#include <drm/drm_vblank.h> #include <drm/via_drm.h> +#include "via_drv.h" #define VIA_REG_INTERRUPT 0x200
drivers/gpu/drm/via/via_map.c +5 -1
@@ -21,8 +21,12 @@* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ -#include <drm/drmP.h> + +#include <drm/drm_device.h> +#include <drm/drm_pci.h> +#include <drm/drm_vblank.h> #include <drm/via_drm.h> +#include "via_drv.h" static int via_do_init_map (struct drm_device *dev,drm_via_init_t *init)
drivers/gpu/drm/via/via_mm.c +6 -1
@@ -25,8 +25,13 @@* Authors: Thomas Hellström <thomas-at-tungstengraphics-dot-com> */ -#include <drm/drmP.h> +#include <linux/slab.h> + +#include <drm/drm_device.h> +#include <drm/drm_file.h> +#include <drm/drm_irq.h> #include <drm/via_drm.h> +#include "via_drv.h" #define VIA_MM_ALIGN_SHIFT 4
drivers/gpu/drm/via/via_verifier.c +5 -5
@@ -28,13 +28,13 @@* be very slow. */ -#include "via_3d_reg.h" -#include <drm/drmP.h> -#include <drm/via_drm.h> +#include <drm/drm_device.h> #include <drm/drm_legacy.h> -#include "via_verifier.h" +#include <drm/via_drm.h> + +#include "via_3d_reg.h" #include "via_drv.h" -#include <linux/kernel.h> +#include "via_verifier.h" typedef enum { state_command,
drivers/gpu/drm/via/via_video.c +2 -1
@@ -25,8 +25,9 @@* Video and XvMC related functions. */ -#include <drm/drmP.h> +#include <drm/drm_device.h> #include <drm/via_drm.h> +#include "via_drv.h" void via_init_futex (drm_via_private_t *dev_priv)
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
v3 cover drm/via: drop use of deprecated headers drmP.h and drm_os_linux.h
In reply to Sam RavnborgAdded subject
Quoted 48 lines · Sam Ravnborg
The first three patches prepare for the removal of
drmP.h. The last patch remove use ofdrmP.hand 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.
v3:
- Use static inline functions for the read/write operations (Emil)
- Use dedicated*_mask_or()and*_mask_and()(Emil)
- ReplaceDRM_WAIT_ONin same path that introducesVIA_WAIT_ON(Emil)
- Collected r-b's
- Changelog adjustments
- Rebased on top of drm-misc-nextv2:
- Add a copy ofDRM_WAIT_ONto 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 <[email protected]> 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: copyDRM_WAIT_ONasVIA_WAIT_ONand use it drm/via: makevia_drv.hself-contained drm/via: drop use ofdrmP.hdrivers/gpu/drm/via/via_dma.c | 43 +++++++++++--------- drivers/gpu/drm/via/via_dmablit.c | 41 ++++++++++--------- drivers/gpu/drm/via/via_drv.c | 7 +++- drivers/gpu/drm/via/via_drv.h | 83 +++++++++++++++++++++++++++++++++++--- drivers/gpu/drm/via/via_irq.c | 54 +++++++++++++------------ drivers/gpu/drm/via/via_map.c | 6 ++- drivers/gpu/drm/via/via_mm.c | 7 +++- drivers/gpu/drm/via/via_verifier.c | 22 +++++----- drivers/gpu/drm/via/via_video.c | 5 ++- 9 files changed, 182 insertions(+), 86 deletions(-)
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
openchrome-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/openchrome-devel