--- /dev/null
+../shared-core/amd_legacy_fence.h
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright 2007 Jérôme Glisse
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Dave Airlie
+ * Jerome Glisse <glisse@freedesktop.org>
+ */
+#ifndef __AMD_LEGACY_FENCE_H__
+#define __AMD_LEGACY_FENCE_H__
+
+struct legacy_fence
+{
+ uint32_t sequence;
+ uint32_t sequence_last_reported;
+ uint32_t sequence_last_flush;
+ uint32_t fence_reg;
+};
+
+#endif
#define __RADEON_MS_H__
#include "radeon_ms_drv.h"
-#include "amd_r3xx_fence.h"
#include "radeon_ms_reg.h"
#include "radeon_ms_drm.h"
#include "radeon_ms_rom.h"
*/
#include "drm_pciids.h"
#include "radeon_ms.h"
+#include "amd_legacy_fence.h"
static uint32_t radeon_ms_mem_prios[] = {
return ret;
}
- dev_priv->fence = drm_alloc(sizeof(struct r3xx_fence), DRM_MEM_DRIVER);
+ dev_priv->fence = drm_alloc(sizeof(struct legacy_fence), DRM_MEM_DRIVER);
if (dev_priv->fence == NULL) {
radeon_ms_driver_unload(dev);
return -ENOMEM;
}
- memset(dev_priv->fence, 0, sizeof(struct r3xx_fence));
+ memset(dev_priv->fence, 0, sizeof(struct legacy_fence));
/* we don't want userspace to be able to map this so don't use
* drm_addmap */
drm_core_ioremapfree(&dev_priv->vram, dev);
}
DRM_INFO("[radeon_ms] map released\n");
- drm_free(dev_priv->fence, sizeof(struct r3xx_fence), DRM_MEM_DRIVER);
+ drm_free(dev_priv->fence, sizeof(struct legacy_fence), DRM_MEM_DRIVER);
drm_free(dev_priv, sizeof(*dev_priv), DRM_MEM_DRIVER);
dev->dev_private = NULL;
* Jerome Glisse <glisse@freedesktop.org>
*/
#include "radeon_ms.h"
-#include "amd_r3xx_fence.h"
+#include "amd_legacy_fence.h"
#define R3XX_FENCE_SEQUENCE_RW_FLUSH 0x80000000u
struct drm_radeon_private *dev_priv,
uint32_t sequence)
{
- struct r3xx_fence *r3xx_fence = dev_priv->fence;
+ struct legacy_fence *r3xx_fence = dev_priv->fence;
uint32_t cmd[2];
int i, r;
return -EBUSY;
}
-static inline uint32_t r3xx_fence_sequence(struct r3xx_fence *r3xx_fence)
+static inline uint32_t r3xx_fence_sequence(struct legacy_fence *r3xx_fence)
{
r3xx_fence->sequence += 1;
if (unlikely(r3xx_fence->sequence > 0x7fffffffu)) {
static inline void r3xx_fence_report(struct drm_device *dev,
struct drm_radeon_private *dev_priv,
- struct r3xx_fence *r3xx_fence)
+ struct legacy_fence *r3xx_fence)
{
uint32_t fence_types = DRM_FENCE_TYPE_EXE;
uint32_t sequence;
static void r3xx_fence_flush(struct drm_device *dev, uint32_t class)
{
struct drm_radeon_private *dev_priv = dev->dev_private;
- struct r3xx_fence *r3xx_fence = dev_priv->fence;
+ struct legacy_fence *r3xx_fence = dev_priv->fence;
uint32_t sequence;
sequence = r3xx_fence_sequence(r3xx_fence);
struct drm_radeon_private *dev_priv = dev->dev_private;
struct drm_fence_manager *fm = &dev->fm;
struct drm_fence_class_manager *fc = &fm->fence_class[fence_class];
- struct r3xx_fence *r3xx_fence = dev_priv->fence;
+ struct legacy_fence *r3xx_fence = dev_priv->fence;
if (unlikely(!dev_priv)) {
return;
uint32_t *native_type)
{
struct drm_radeon_private *dev_priv = dev->dev_private;
- struct r3xx_fence *r3xx_fence = dev_priv->fence;
+ struct legacy_fence *r3xx_fence = dev_priv->fence;
uint32_t tmp;
if (!dev_priv || dev_priv->cp_ready != 1) {
{
struct drm_device *dev = fence->dev;
struct drm_radeon_private *dev_priv = dev->dev_private;
- struct r3xx_fence *r3xx_fence = dev_priv->fence;
+ struct legacy_fence *r3xx_fence = dev_priv->fence;
struct drm_fence_driver *driver = dev->driver->fence_driver;
uint32_t flush_types, diff;