All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/4] drm/via: drop use of deprecated headers drmP.h + drm_os_linux.h
@ 2019-07-23 20:09 Sam Ravnborg
  2019-07-23 20:09 ` [PATCH v4 1/4] drm/via: drop use of DRM(READ|WRITE) macros Sam Ravnborg
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Sam Ravnborg @ 2019-07-23 20:09 UTC (permalink / raw)
  To: dri-devel, openchrome-devel
  Cc: Thomas Hellstrom, Gustavo A. R. Silva, David Airlie,
	Daniel Vetter, Michel Dänzer, Kevin Brace, Mike Marshall,
	Ira Weiny, Emil Velikov

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.

v4:
- Use a more standard variant for via_write8_mask() (Emil)

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 <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: 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      | 75 +++++++++++++++++++++++++++++++++++---
 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, 174 insertions(+), 86 deletions(-)


_______________________________________________
openchrome-devel mailing list
openchrome-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/openchrome-devel

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

* [PATCH v4 1/4] drm/via: drop use of DRM(READ|WRITE) macros
  2019-07-23 20:09 [PATCH v4 0/4] drm/via: drop use of deprecated headers drmP.h + drm_os_linux.h Sam Ravnborg
@ 2019-07-23 20:09 ` Sam Ravnborg
  2019-07-23 20:09 ` [PATCH v4 2/4] drm/via: copy DRM_WAIT_ON as VIA_WAIT_ON and use it Sam Ravnborg
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Sam Ravnborg @ 2019-07-23 20:09 UTC (permalink / raw)
  To: dri-devel, openchrome-devel
  Cc: Thomas Hellstrom, Sam Ravnborg, Gustavo A. R. Silva,
	David Airlie, Daniel Vetter, Michel Dänzer, Kevin Brace,
	Mike Marshall, Ira Weiny, Emil Velikov

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.

v4:
- Use a more standard via_write8_mask() function (Emil)

v3:
- Use static inline functions, rather than macros (Emil)
- Use dedicated mask variants for byte access (Emil)

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Kevin Brace <kevinbrace@gmx.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Mike Marshall <hubcap@omnibond.com>
Cc: Ira Weiny <ira.weiny@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Emil Velikov <emil.velikov@collabora.com>
Cc: Michel Dänzer <michel@daenzer.net>
---
 drivers/gpu/drm/via/via_dma.c      | 34 +++++++++++-----------
 drivers/gpu/drm/via/via_dmablit.c  | 24 ++++++++--------
 drivers/gpu/drm/via/via_drv.h      | 32 +++++++++++++++++----
 drivers/gpu/drm/via/via_irq.c      | 46 +++++++++++++++---------------
 drivers/gpu/drm/via/via_verifier.c | 12 ++++----
 5 files changed, 84 insertions(+), 64 deletions(-)

diff --git a/drivers/gpu/drm/via/via_dma.c b/drivers/gpu/drm/via/via_dma.c
index d17d8f245c1a..344a12b63967 100644
--- a/drivers/gpu/drm/via/via_dma.c
+++ b/drivers/gpu/drm/via/via_dma.c
@@ -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) +
diff --git a/drivers/gpu/drm/via/via_dmablit.c b/drivers/gpu/drm/via/via_dmablit.c
index 062067438f1d..e1557dd67083 100644
--- a/drivers/gpu/drm/via/via_dmablit.c
+++ b/drivers/gpu/drm/via/via_dmablit.c
@@ -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;
diff --git a/drivers/gpu/drm/via/via_drv.h b/drivers/gpu/drm/via/via_drv.h
index 6d1ae834484c..368185b80184 100644
--- a/drivers/gpu/drm/via/via_drv.h
+++ b/drivers/gpu/drm/via/via_drv.h
@@ -113,12 +113,32 @@ 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(struct drm_via_private *dev_priv,
+				   u32 reg, u32 mask, u32 val)
+{
+	u32 tmp;
+
+	tmp = readb((void __iomem *)(dev_priv->mmio->handle + reg));
+	tmp = (tmp & ~mask) | (val & mask);
+	writeb(tmp, (void __iomem *)(dev_priv->mmio->handle + reg));
+}
 
 extern const struct drm_ioctl_desc via_ioctls[];
 extern int via_max_ioctl;
diff --git a/drivers/gpu/drm/via/via_irq.c b/drivers/gpu/drm/via/via_irq.c
index c96830ccc0ec..08c87127f143 100644
--- a/drivers/gpu/drm/via/via_irq.c
+++ b/drivers/gpu/drm/via/via_irq.c
@@ -108,7 +108,7 @@ irqreturn_t via_driver_irq_handler(int irq, void *arg)
 	drm_via_irq_t *cur_irq = dev_priv->via_irqs;
 	int i;
 
-	status = VIA_READ(VIA_REG_INTERRUPT);
+	status = via_read(dev_priv, VIA_REG_INTERRUPT);
 	if (status & VIA_IRQ_VBLANK_PENDING) {
 		atomic_inc(&dev_priv->vbl_received);
 		if (!(atomic_read(&dev_priv->vbl_received) & 0x0F)) {
@@ -143,7 +143,7 @@ irqreturn_t via_driver_irq_handler(int irq, void *arg)
 	}
 
 	/* Acknowledge interrupts */
-	VIA_WRITE(VIA_REG_INTERRUPT, status);
+	via_write(dev_priv, VIA_REG_INTERRUPT, status);
 
 
 	if (handled)
@@ -158,8 +158,8 @@ static __inline__ void viadrv_acknowledge_irqs(drm_via_private_t *dev_priv)
 
 	if (dev_priv) {
 		/* Acknowledge interrupts */
-		status = VIA_READ(VIA_REG_INTERRUPT);
-		VIA_WRITE(VIA_REG_INTERRUPT, status |
+		status = via_read(dev_priv, VIA_REG_INTERRUPT);
+		via_write(dev_priv, VIA_REG_INTERRUPT, status |
 			  dev_priv->irq_pending_mask);
 	}
 }
@@ -174,11 +174,11 @@ int via_enable_vblank(struct drm_device *dev, unsigned int pipe)
 		return -EINVAL;
 	}
 
-	status = VIA_READ(VIA_REG_INTERRUPT);
-	VIA_WRITE(VIA_REG_INTERRUPT, status | VIA_IRQ_VBLANK_ENABLE);
+	status = via_read(dev_priv, VIA_REG_INTERRUPT);
+	via_write(dev_priv, VIA_REG_INTERRUPT, status | VIA_IRQ_VBLANK_ENABLE);
 
-	VIA_WRITE8(0x83d4, 0x11);
-	VIA_WRITE8(0x83d5, VIA_READ8(0x83d5) | 0x30);
+	via_write8(dev_priv, 0x83d4, 0x11);
+	via_write8_mask(dev_priv, 0x83d5, 0x30, 0x30);
 
 	return 0;
 }
@@ -188,11 +188,11 @@ void via_disable_vblank(struct drm_device *dev, unsigned int pipe)
 	drm_via_private_t *dev_priv = dev->dev_private;
 	u32 status;
 
-	status = VIA_READ(VIA_REG_INTERRUPT);
-	VIA_WRITE(VIA_REG_INTERRUPT, status & ~VIA_IRQ_VBLANK_ENABLE);
+	status = via_read(dev_priv, VIA_REG_INTERRUPT);
+	via_write(dev_priv, VIA_REG_INTERRUPT, status & ~VIA_IRQ_VBLANK_ENABLE);
 
-	VIA_WRITE8(0x83d4, 0x11);
-	VIA_WRITE8(0x83d5, VIA_READ8(0x83d5) & ~0x30);
+	via_write8(dev_priv, 0x83d4, 0x11);
+	via_write8_mask(dev_priv, 0x83d5, 0x30, 0);
 
 	if (pipe != 0)
 		DRM_ERROR("%s:  bad crtc %u\n", __func__, pipe);
@@ -234,7 +234,7 @@ via_driver_irq_wait(struct drm_device *dev, unsigned int irq, int force_sequence
 
 	if (masks[real_irq][2] && !force_sequence) {
 		DRM_WAIT_ON(ret, cur_irq->irq_queue, 3 * HZ,
-			    ((VIA_READ(masks[irq][2]) & masks[irq][3]) ==
+			    ((via_read(dev_priv, masks[irq][2]) & masks[irq][3]) ==
 			     masks[irq][4]));
 		cur_irq_sequence = atomic_read(&cur_irq->irq_received);
 	} else {
@@ -292,8 +292,8 @@ void via_driver_irq_preinstall(struct drm_device *dev)
 		dev_priv->last_vblank_valid = 0;
 
 		/* Clear VSync interrupt regs */
-		status = VIA_READ(VIA_REG_INTERRUPT);
-		VIA_WRITE(VIA_REG_INTERRUPT, status &
+		status = via_read(dev_priv, VIA_REG_INTERRUPT);
+		via_write(dev_priv, VIA_REG_INTERRUPT, status &
 			  ~(dev_priv->irq_enable_mask));
 
 		/* Clear bits if they're already high */
@@ -310,13 +310,13 @@ int via_driver_irq_postinstall(struct drm_device *dev)
 	if (!dev_priv)
 		return -EINVAL;
 
-	status = VIA_READ(VIA_REG_INTERRUPT);
-	VIA_WRITE(VIA_REG_INTERRUPT, status | VIA_IRQ_GLOBAL
+	status = via_read(dev_priv, VIA_REG_INTERRUPT);
+	via_write(dev_priv, VIA_REG_INTERRUPT, status | VIA_IRQ_GLOBAL
 		  | dev_priv->irq_enable_mask);
 
 	/* Some magic, oh for some data sheets ! */
-	VIA_WRITE8(0x83d4, 0x11);
-	VIA_WRITE8(0x83d5, VIA_READ8(0x83d5) | 0x30);
+	via_write8(dev_priv, 0x83d4, 0x11);
+	via_write8_mask(dev_priv, 0x83d5, 0x30, 0x30);
 
 	return 0;
 }
@@ -331,11 +331,11 @@ void via_driver_irq_uninstall(struct drm_device *dev)
 
 		/* Some more magic, oh for some data sheets ! */
 
-		VIA_WRITE8(0x83d4, 0x11);
-		VIA_WRITE8(0x83d5, VIA_READ8(0x83d5) & ~0x30);
+		via_write8(dev_priv, 0x83d4, 0x11);
+		via_write8_mask(dev_priv, 0x83d5, 0x30, 0);
 
-		status = VIA_READ(VIA_REG_INTERRUPT);
-		VIA_WRITE(VIA_REG_INTERRUPT, status &
+		status = via_read(dev_priv, VIA_REG_INTERRUPT);
+		via_write(dev_priv, VIA_REG_INTERRUPT, status &
 			  ~(VIA_IRQ_VBLANK_ENABLE | dev_priv->irq_enable_mask));
 	}
 }
diff --git a/drivers/gpu/drm/via/via_verifier.c b/drivers/gpu/drm/via/via_verifier.c
index fb2609434df7..002c883b0d4b 100644
--- a/drivers/gpu/drm/via/via_verifier.c
+++ b/drivers/gpu/drm/via/via_verifier.c
@@ -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)
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH v4 2/4] drm/via: copy DRM_WAIT_ON as VIA_WAIT_ON and use it
  2019-07-23 20:09 [PATCH v4 0/4] drm/via: drop use of deprecated headers drmP.h + drm_os_linux.h Sam Ravnborg
  2019-07-23 20:09 ` [PATCH v4 1/4] drm/via: drop use of DRM(READ|WRITE) macros Sam Ravnborg
@ 2019-07-23 20:09 ` Sam Ravnborg
  2019-07-23 20:09 ` [PATCH v4 3/4] drm/via: make via_drv.h self-contained Sam Ravnborg
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Sam Ravnborg @ 2019-07-23 20:09 UTC (permalink / raw)
  To: dri-devel, openchrome-devel
  Cc: Thomas Hellstrom, Sam Ravnborg, Gustavo A. R. Silva,
	David Airlie, Daniel Vetter, Michel Dänzer, Kevin Brace,
	Mike Marshall, Ira Weiny, Emil Velikov

VIA_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)

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Kevin Brace <kevinbrace@gmx.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Mike Marshall <hubcap@omnibond.com>
Cc: Ira Weiny <ira.weiny@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Emil Velikov <emil.velikov@collabora.com>
Cc: Michel Dänzer <michel@daenzer.net>
---
 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(-)

diff --git a/drivers/gpu/drm/via/via_dmablit.c b/drivers/gpu/drm/via/via_dmablit.c
index e1557dd67083..2ec93d976a43 100644
--- a/drivers/gpu/drm/via/via_dmablit.c
+++ b/drivers/gpu/drm/via/via_dmablit.c
@@ -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;
 
diff --git a/drivers/gpu/drm/via/via_drv.h b/drivers/gpu/drm/via/via_drv.h
index 368185b80184..9e6a0c5f316c 100644
--- a/drivers/gpu/drm/via/via_drv.h
+++ b/drivers/gpu/drm/via/via_drv.h
@@ -24,8 +24,13 @@
 #ifndef _VIA_DRV_H_
 #define _VIA_DRV_H_
 
-#include <drm/drm_mm.h>
+#include <linux/jiffies.h>
+#include <linux/sched.h>
+#include <linux/sched/signal.h>
+#include <linux/wait.h>
+
 #include <drm/drm_legacy.h>
+#include <drm/drm_mm.h>
 
 #define DRIVER_AUTHOR	"Various"
 
@@ -140,6 +145,41 @@ static inline void via_write8_mask(struct drm_via_private *dev_priv,
 	writeb(tmp, (void __iomem *)(dev_priv->mmio->handle + reg));
 }
 
+/*
+ * Poll in a loop waiting for 'contidition' to be true.
+ * Note: A direct replacement with wait_event_interruptible_timeout()
+ *       will not work unless driver is updated to emit wake_up()
+ *       in relevant places that can impact the 'condition'
+ *
+ * Returns:
+ *   ret keeps current value if 'condition' becomes true
+ *   ret = -BUSY if timeout happens
+ *   ret = -EINTR if a signal interrupted the waiting period
+ */
+#define VIA_WAIT_ON( ret, queue, timeout, condition )		\
+do {								\
+	DECLARE_WAITQUEUE(entry, current);			\
+	unsigned long end = jiffies + (timeout);		\
+	add_wait_queue(&(queue), &entry);			\
+								\
+	for (;;) {						\
+		__set_current_state(TASK_INTERRUPTIBLE);	\
+		if (condition)					\
+			break;					\
+		if (time_after_eq(jiffies, end)) {		\
+			ret = -EBUSY;				\
+			break;					\
+		}						\
+		schedule_timeout((HZ/100 > 1) ? HZ/100 : 1);	\
+		if (signal_pending(current)) {			\
+			ret = -EINTR;				\
+			break;					\
+		}						\
+	}							\
+	__set_current_state(TASK_RUNNING);			\
+	remove_wait_queue(&(queue), &entry);			\
+} while (0)
+
 extern const struct drm_ioctl_desc via_ioctls[];
 extern int via_max_ioctl;
 
diff --git a/drivers/gpu/drm/via/via_irq.c b/drivers/gpu/drm/via/via_irq.c
index 08c87127f143..3e68cfa65b12 100644
--- a/drivers/gpu/drm/via/via_irq.c
+++ b/drivers/gpu/drm/via/via_irq.c
@@ -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)));
diff --git a/drivers/gpu/drm/via/via_video.c b/drivers/gpu/drm/via/via_video.c
index a9ffbad1cfdd..cf53612c945e 100644
--- a/drivers/gpu/drm/via/via_video.c
+++ b/drivers/gpu/drm/via/via_video.c
@@ -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:
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH v4 3/4] drm/via: make via_drv.h self-contained
  2019-07-23 20:09 [PATCH v4 0/4] drm/via: drop use of deprecated headers drmP.h + drm_os_linux.h Sam Ravnborg
  2019-07-23 20:09 ` [PATCH v4 1/4] drm/via: drop use of DRM(READ|WRITE) macros Sam Ravnborg
  2019-07-23 20:09 ` [PATCH v4 2/4] drm/via: copy DRM_WAIT_ON as VIA_WAIT_ON and use it Sam Ravnborg
@ 2019-07-23 20:09 ` Sam Ravnborg
  2019-07-23 20:09 ` [PATCH v4 4/4] drm/via: drop use of drmP.h Sam Ravnborg
  2019-07-24 16:18 ` [PATCH v4 0/4] drm/via: drop use of deprecated headers drmP.h + drm_os_linux.h Emil Velikov
  4 siblings, 0 replies; 8+ messages in thread
From: Sam Ravnborg @ 2019-07-23 20:09 UTC (permalink / raw)
  To: dri-devel, openchrome-devel
  Cc: Thomas Hellstrom, Sam Ravnborg, Gustavo A. R. Silva,
	David Airlie, Daniel Vetter, Michel Dänzer, Kevin Brace,
	Mike Marshall, Ira Weiny, Emil Velikov

Added 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

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Cc: Kevin Brace <kevinbrace@gmx.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Mike Marshall <hubcap@omnibond.com>
Cc: Ira Weiny <ira.weiny@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Michel Dänzer <michel@daenzer.net>
---
 drivers/gpu/drm/via/via_drv.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/via/via_drv.h b/drivers/gpu/drm/via/via_drv.h
index 9e6a0c5f316c..d5ad1b05bf77 100644
--- a/drivers/gpu/drm/via/via_drv.h
+++ b/drivers/gpu/drm/via/via_drv.h
@@ -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"
 
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH v4 4/4] drm/via: drop use of drmP.h
  2019-07-23 20:09 [PATCH v4 0/4] drm/via: drop use of deprecated headers drmP.h + drm_os_linux.h Sam Ravnborg
                   ` (2 preceding siblings ...)
  2019-07-23 20:09 ` [PATCH v4 3/4] drm/via: make via_drv.h self-contained Sam Ravnborg
@ 2019-07-23 20:09 ` Sam Ravnborg
  2019-07-24 16:18 ` [PATCH v4 0/4] drm/via: drop use of deprecated headers drmP.h + drm_os_linux.h Emil Velikov
  4 siblings, 0 replies; 8+ messages in thread
From: Sam Ravnborg @ 2019-07-23 20:09 UTC (permalink / raw)
  To: dri-devel, openchrome-devel
  Cc: Thomas Hellstrom, Sam Ravnborg, Gustavo A. R. Silva,
	David Airlie, Daniel Vetter, Michel Dänzer, Kevin Brace,
	Mike Marshall, Ira Weiny, Emil Velikov

Drop 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)

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Cc: Kevin Brace <kevinbrace@gmx.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Mike Marshall <hubcap@omnibond.com>
Cc: Ira Weiny <ira.weiny@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Michel Dänzer <michel@daenzer.net>
---
 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(-)

diff --git a/drivers/gpu/drm/via/via_dma.c b/drivers/gpu/drm/via/via_dma.c
index 344a12b63967..1208445e341d 100644
--- a/drivers/gpu/drm/via/via_dma.c
+++ b/drivers/gpu/drm/via/via_dma.c
@@ -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"
 
diff --git a/drivers/gpu/drm/via/via_dmablit.c b/drivers/gpu/drm/via/via_dmablit.c
index 2ec93d976a43..feaa538026a0 100644
--- a/drivers/gpu/drm/via/via_dmablit.c
+++ b/drivers/gpu/drm/via/via_dmablit.c
@@ -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)
diff --git a/drivers/gpu/drm/via/via_drv.c b/drivers/gpu/drm/via/via_drv.c
index af6a12d3c058..666a16de84f9 100644
--- a/drivers/gpu/drm/via/via_drv.c
+++ b/drivers/gpu/drm/via/via_drv.c
@@ -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)
 {
diff --git a/drivers/gpu/drm/via/via_irq.c b/drivers/gpu/drm/via/via_irq.c
index 3e68cfa65b12..24cc445169e2 100644
--- a/drivers/gpu/drm/via/via_irq.c
+++ b/drivers/gpu/drm/via/via_irq.c
@@ -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
diff --git a/drivers/gpu/drm/via/via_map.c b/drivers/gpu/drm/via/via_map.c
index 2ad865870372..431c150df014 100644
--- a/drivers/gpu/drm/via/via_map.c
+++ b/drivers/gpu/drm/via/via_map.c
@@ -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)
diff --git a/drivers/gpu/drm/via/via_mm.c b/drivers/gpu/drm/via/via_mm.c
index 4217d66a5cc6..45cc9e900260 100644
--- a/drivers/gpu/drm/via/via_mm.c
+++ b/drivers/gpu/drm/via/via_mm.c
@@ -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
diff --git a/drivers/gpu/drm/via/via_verifier.c b/drivers/gpu/drm/via/via_verifier.c
index 002c883b0d4b..8d8135f424ef 100644
--- a/drivers/gpu/drm/via/via_verifier.c
+++ b/drivers/gpu/drm/via/via_verifier.c
@@ -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,
diff --git a/drivers/gpu/drm/via/via_video.c b/drivers/gpu/drm/via/via_video.c
index cf53612c945e..53b1f58f99b4 100644
--- a/drivers/gpu/drm/via/via_video.c
+++ b/drivers/gpu/drm/via/via_video.c
@@ -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)
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH v4 0/4] drm/via: drop use of deprecated headers drmP.h + drm_os_linux.h
  2019-07-23 20:09 [PATCH v4 0/4] drm/via: drop use of deprecated headers drmP.h + drm_os_linux.h Sam Ravnborg
                   ` (3 preceding siblings ...)
  2019-07-23 20:09 ` [PATCH v4 4/4] drm/via: drop use of drmP.h Sam Ravnborg
@ 2019-07-24 16:18 ` Emil Velikov
  2019-07-24 18:55   ` Sam Ravnborg
  4 siblings, 1 reply; 8+ messages in thread
From: Emil Velikov @ 2019-07-24 16:18 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Thomas Hellstrom, Gustavo A. R. Silva, David Airlie,
	Daniel Vetter, openchrome-devel, Kevin Brace, dri-devel,
	Ira Weiny, Michel Dänzer, Mike Marshall

On 2019/07/23, Sam Ravnborg wrote:
> 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.
> 
> v4:
> - Use a more standard variant for via_write8_mask() (Emil)
> 
Thank you. The series is:
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>

-Emil
_______________________________________________
openchrome-devel mailing list
openchrome-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/openchrome-devel

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

* Re: [PATCH v4 0/4] drm/via: drop use of deprecated headers drmP.h + drm_os_linux.h
  2019-07-24 16:18 ` [PATCH v4 0/4] drm/via: drop use of deprecated headers drmP.h + drm_os_linux.h Emil Velikov
@ 2019-07-24 18:55   ` Sam Ravnborg
  2019-07-25 15:39     ` Sam Ravnborg
  0 siblings, 1 reply; 8+ messages in thread
From: Sam Ravnborg @ 2019-07-24 18:55 UTC (permalink / raw)
  To: Emil Velikov
  Cc: Thomas Hellstrom, Gustavo A. R. Silva, David Airlie,
	Daniel Vetter, openchrome-devel, Kevin Brace, dri-devel,
	Ira Weiny, Michel Dänzer, Mike Marshall

Hi Emil.

On Wed, Jul 24, 2019 at 05:18:21PM +0100, Emil Velikov wrote:
> On 2019/07/23, Sam Ravnborg wrote:
> > 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.
> > 
> > v4:
> > - Use a more standard variant for via_write8_mask() (Emil)
> > 
> Thank you. The series is:
> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>

Thanks for your patience with me!
I will apply when I am back home tomorrow.

	Sam
_______________________________________________
openchrome-devel mailing list
openchrome-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/openchrome-devel

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

* Re: [PATCH v4 0/4] drm/via: drop use of deprecated headers drmP.h + drm_os_linux.h
  2019-07-24 18:55   ` Sam Ravnborg
@ 2019-07-25 15:39     ` Sam Ravnborg
  0 siblings, 0 replies; 8+ messages in thread
From: Sam Ravnborg @ 2019-07-25 15:39 UTC (permalink / raw)
  To: Emil Velikov
  Cc: Thomas Hellstrom, Kevin Brace, David Airlie, Daniel Vetter,
	openchrome-devel, Gustavo A. R. Silva, dri-devel, Ira Weiny,
	Michel Dänzer, Mike Marshall

On Wed, Jul 24, 2019 at 08:55:55PM +0200, Sam Ravnborg wrote:
> Hi Emil.
> 
> On Wed, Jul 24, 2019 at 05:18:21PM +0100, Emil Velikov wrote:
> > On 2019/07/23, Sam Ravnborg wrote:
> > > 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.
> > > 
> > > v4:
> > > - Use a more standard variant for via_write8_mask() (Emil)
> > > 
> > Thank you. The series is:
> > Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
> 
> Thanks for your patience with me!
> I will apply when I am back home tomorrow.

Patches applied and pushed out to drm-misc-next.

	Sam
_______________________________________________
openchrome-devel mailing list
openchrome-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/openchrome-devel

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

end of thread, other threads:[~2019-07-25 15:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-23 20:09 [PATCH v4 0/4] drm/via: drop use of deprecated headers drmP.h + drm_os_linux.h Sam Ravnborg
2019-07-23 20:09 ` [PATCH v4 1/4] drm/via: drop use of DRM(READ|WRITE) macros Sam Ravnborg
2019-07-23 20:09 ` [PATCH v4 2/4] drm/via: copy DRM_WAIT_ON as VIA_WAIT_ON and use it Sam Ravnborg
2019-07-23 20:09 ` [PATCH v4 3/4] drm/via: make via_drv.h self-contained Sam Ravnborg
2019-07-23 20:09 ` [PATCH v4 4/4] drm/via: drop use of drmP.h Sam Ravnborg
2019-07-24 16:18 ` [PATCH v4 0/4] drm/via: drop use of deprecated headers drmP.h + drm_os_linux.h Emil Velikov
2019-07-24 18:55   ` Sam Ravnborg
2019-07-25 15:39     ` Sam Ravnborg

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.