diff options
-rw-r--r-- | drivers/gpu/drm/gma500/Makefile | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/blitter.c | 43 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/blitter.h | 16 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/gtt.c | 11 |
4 files changed, 0 insertions, 71 deletions
diff --git a/drivers/gpu/drm/gma500/Makefile b/drivers/gpu/drm/gma500/Makefile index 160b75e28b0e..63012bf2485a 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@gmail.com> - */ - -#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@gmail.com> - */ - -#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); } |