Re: [PATCH 6/6] drm/gma500: Never wait for blits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Am 01.02.21 um 14:26 schrieb Patrik Jakobsson:
Blits cannot happen anymore since we removed the 2d accel code. Stop
checking for a busy blitter and remove the remaining blitter code.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@xxxxxxxxx>

Reviewed-by: Thomas Zimmermann <tzimmermann@xxxxxxx>

---
  drivers/gpu/drm/gma500/Makefile  |  1 -
  drivers/gpu/drm/gma500/blitter.c | 43 --------------------------------
  drivers/gpu/drm/gma500/blitter.h | 16 ------------
  drivers/gpu/drm/gma500/gtt.c     | 11 --------
  4 files changed, 71 deletions(-)
  delete mode 100644 drivers/gpu/drm/gma500/blitter.c
  delete mode 100644 drivers/gpu/drm/gma500/blitter.h

diff --git a/drivers/gpu/drm/gma500/Makefile b/drivers/gpu/drm/gma500/Makefile
index 6ee1ef389979..8c649d3ef6a4 100644
--- a/drivers/gpu/drm/gma500/Makefile
+++ b/drivers/gpu/drm/gma500/Makefile
@@ -5,7 +5,6 @@
gma500_gfx-y += \
  	  backlight.o \
-	  blitter.o \
  	  cdv_device.o \
  	  cdv_intel_crt.o \
  	  cdv_intel_display.o \
diff --git a/drivers/gpu/drm/gma500/blitter.c b/drivers/gpu/drm/gma500/blitter.c
deleted file mode 100644
index cb2504a4a15f..000000000000
--- a/drivers/gpu/drm/gma500/blitter.c
+++ /dev/null
@@ -1,43 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- * Copyright (c) 2014, Patrik Jakobsson
- * All Rights Reserved.
- *
- * Authors: Patrik Jakobsson <patrik.r.jakobsson@xxxxxxxxx>
- */
-
-#include "psb_drv.h"
-
-#include "blitter.h"
-#include "psb_reg.h"
-
-/* Wait for the blitter to be completely idle */
-int gma_blt_wait_idle(struct drm_psb_private *dev_priv)
-{
-	unsigned long stop = jiffies + HZ;
-	int busy = 1;
-
-	/* NOP for Cedarview */
-	if (IS_CDV(dev_priv->dev))
-		return 0;
-
-	/* First do a quick check */
-	if ((PSB_RSGX32(PSB_CR_2D_SOCIF) == _PSB_C2_SOCIF_EMPTY) &&
-	    ((PSB_RSGX32(PSB_CR_2D_BLIT_STATUS) & _PSB_C2B_STATUS_BUSY) == 0))
-		return 0;
-
-	do {
-		busy = (PSB_RSGX32(PSB_CR_2D_SOCIF) != _PSB_C2_SOCIF_EMPTY);
-	} while (busy && !time_after_eq(jiffies, stop));
-
-	if (busy)
-		return -EBUSY;
-
-	do {
-		busy = ((PSB_RSGX32(PSB_CR_2D_BLIT_STATUS) &
-			_PSB_C2B_STATUS_BUSY) != 0);
-	} while (busy && !time_after_eq(jiffies, stop));
-
-	/* If still busy, we probably have a hang */
-	return (busy) ? -EBUSY : 0;
-}
diff --git a/drivers/gpu/drm/gma500/blitter.h b/drivers/gpu/drm/gma500/blitter.h
deleted file mode 100644
index 8d67dabd9ba3..000000000000
--- a/drivers/gpu/drm/gma500/blitter.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Copyright (c) 2014, Patrik Jakobsson
- * All Rights Reserved.
- *
- * Authors: Patrik Jakobsson <patrik.r.jakobsson@xxxxxxxxx>
- */
-
-#ifndef __BLITTER_H
-#define __BLITTER_H
-
-struct drm_psb_private;
-
-extern int gma_blt_wait_idle(struct drm_psb_private *dev_priv);
-
-#endif
diff --git a/drivers/gpu/drm/gma500/gtt.c b/drivers/gpu/drm/gma500/gtt.c
index e884750bc123..df9b611b856a 100644
--- a/drivers/gpu/drm/gma500/gtt.c
+++ b/drivers/gpu/drm/gma500/gtt.c
@@ -11,7 +11,6 @@
#include <asm/set_memory.h> -#include "blitter.h"
  #include "psb_drv.h"
@@ -229,18 +228,9 @@ void psb_gtt_unpin(struct gtt_range *gt)
  	struct drm_device *dev = gt->gem.dev;
  	struct drm_psb_private *dev_priv = dev->dev_private;
  	u32 gpu_base = dev_priv->gtt.gatt_start;
-	int ret;
- /* While holding the gtt_mutex no new blits can be initiated */
  	mutex_lock(&dev_priv->gtt_mutex);
- /* Wait for any possible usage of the memory to be finished */
-	ret = gma_blt_wait_idle(dev_priv);
-	if (ret) {
-		DRM_ERROR("Failed to idle the blitter, unpin failed!");
-		goto out;
-	}
-
  	WARN_ON(!gt->in_gart);
gt->in_gart--;
@@ -251,7 +241,6 @@ void psb_gtt_unpin(struct gtt_range *gt)
  		psb_gtt_detach_pages(gt);
  	}
-out:
  	mutex_unlock(&dev_priv->gtt_mutex);
  }

--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

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

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux