Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 228514
b: refs/heads/master
c: 7c74cbd
h: refs/heads/master
v: v3
  • Loading branch information
Ben Skeggs committed Dec 3, 2010
1 parent 6837ed4 commit cbb7241
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 128 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b921bae2eedc806b118a03d986cf0be9ffd3af40
refs/heads/master: 7c74cbd01b2698583fb74ebdfcd7ef4c768e6346
56 changes: 31 additions & 25 deletions trunk/drivers/gpu/drm/nouveau/nouveau_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,36 +108,45 @@ nouveau_call_method(struct nouveau_channel *chan, int class, int mthd, int data)
}

static bool
nouveau_fifo_swmthd(struct nouveau_channel *chan, uint32_t addr, uint32_t data)
nouveau_fifo_swmthd(struct drm_device *dev, u32 chid, u32 addr, u32 data)
{
struct drm_device *dev = chan->dev;
struct drm_nouveau_private *dev_priv = dev->dev_private;
struct nouveau_channel *chan = NULL;
struct nouveau_gpuobj *obj;
const int subc = (addr >> 13) & 0x7;
const int mthd = addr & 0x1ffc;
bool handled = false;
u32 engine;

if (mthd == 0x0000) {
struct nouveau_gpuobj *gpuobj;

gpuobj = nouveau_ramht_find(chan, data);
if (!gpuobj)
return false;
if (likely(chid >= 0 && chid < dev_priv->engine.fifo.channels))
chan = dev_priv->fifos[chid];
if (unlikely(!chan))
return false;

if (gpuobj->engine != NVOBJ_ENGINE_SW)
return false;
switch (mthd) {
case 0x0000: /* bind object to subchannel */
obj = nouveau_ramht_find(chan, data);
if (unlikely(!obj || obj->engine != NVOBJ_ENGINE_SW))
break;

chan->sw_subchannel[subc] = gpuobj->class;
nv_wr32(dev, NV04_PFIFO_CACHE1_ENGINE, nv_rd32(dev,
NV04_PFIFO_CACHE1_ENGINE) & ~(0xf << subc * 4));
return true;
}
chan->sw_subchannel[subc] = obj->class;
engine = 0x0000000f << (subc * 4);

/* hw object */
if (nv_rd32(dev, NV04_PFIFO_CACHE1_ENGINE) & (1 << (subc*4)))
return false;
nv_mask(dev, NV04_PFIFO_CACHE1_ENGINE, engine, 0x00000000);
handled = true;
break;
default:
engine = nv_rd32(dev, NV04_PFIFO_CACHE1_ENGINE);
if (unlikely(((engine >> (subc * 4)) & 0xf) != 0))
break;

if (nouveau_call_method(chan, chan->sw_subchannel[subc], mthd, data))
return false;
if (!nouveau_call_method(chan, chan->sw_subchannel[subc],
mthd, data))
handled = true;
break;
}

return true;
return handled;
}

static void
Expand All @@ -150,14 +159,11 @@ nouveau_fifo_irq_handler(struct drm_device *dev)

reassign = nv_rd32(dev, NV03_PFIFO_CACHES) & 1;
while ((status = nv_rd32(dev, NV03_PFIFO_INTR_0)) && (cnt++ < 100)) {
struct nouveau_channel *chan = NULL;
uint32_t chid, get;

nv_wr32(dev, NV03_PFIFO_CACHES, 0);

chid = engine->fifo.channel_id(dev);
if (chid >= 0 && chid < engine->fifo.channels)
chan = dev_priv->fifos[chid];
get = nv_rd32(dev, NV03_PFIFO_CACHE1_GET);

if (status & NV_PFIFO_INTR_CACHE_ERROR) {
Expand All @@ -184,7 +190,7 @@ nouveau_fifo_irq_handler(struct drm_device *dev)
NV40_PFIFO_CACHE1_DATA(ptr));
}

if (!chan || !nouveau_fifo_swmthd(chan, mthd, data)) {
if (!nouveau_fifo_swmthd(dev, chid, mthd, data)) {
NV_INFO(dev, "PFIFO_CACHE_ERROR - Ch %d/%d "
"Mthd 0x%04x Data 0x%08x\n",
chid, (mthd >> 13) & 7, mthd & 0x1ffc,
Expand Down
5 changes: 1 addition & 4 deletions trunk/drivers/gpu/drm/radeon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,10 @@ radeon-y += radeon_device.o radeon_asic.o radeon_kms.o \
rs400.o rs600.o rs690.o rv515.o r520.o r600.o rv770.o radeon_test.o \
r200.o radeon_legacy_tv.o r600_cs.o r600_blit.o r600_blit_shaders.o \
r600_blit_kms.o radeon_pm.o atombios_dp.o r600_audio.o r600_hdmi.o \
evergreen.o evergreen_cs.o evergreen_blit_shaders.o evergreen_blit_kms.o \
radeon_trace_points.o
evergreen.o evergreen_cs.o evergreen_blit_shaders.o evergreen_blit_kms.o

radeon-$(CONFIG_COMPAT) += radeon_ioc32.o
radeon-$(CONFIG_VGA_SWITCHEROO) += radeon_atpx_handler.o
radeon-$(CONFIG_ACPI) += radeon_acpi.o

obj-$(CONFIG_DRM_RADEON)+= radeon.o

CFLAGS_radeon_trace_points.o := -I$(src)
4 changes: 0 additions & 4 deletions trunk/drivers/gpu/drm/radeon/radeon_fence.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include "drm.h"
#include "radeon_reg.h"
#include "radeon.h"
#include "radeon_trace.h"

int radeon_fence_emit(struct radeon_device *rdev, struct radeon_fence *fence)
{
Expand All @@ -58,7 +57,6 @@ int radeon_fence_emit(struct radeon_device *rdev, struct radeon_fence *fence)
} else
radeon_fence_ring_emit(rdev, fence);

trace_radeon_fence_emit(rdev->ddev, fence->seq);
fence->emited = true;
list_del(&fence->list);
list_add_tail(&fence->list, &rdev->fence_drv.emited);
Expand Down Expand Up @@ -215,7 +213,6 @@ int radeon_fence_wait(struct radeon_fence *fence, bool intr)
retry:
/* save current sequence used to check for GPU lockup */
seq = rdev->fence_drv.last_seq;
trace_radeon_fence_wait_begin(rdev->ddev, seq);
if (intr) {
radeon_irq_kms_sw_irq_get(rdev);
r = wait_event_interruptible_timeout(rdev->fence_drv.queue,
Expand All @@ -230,7 +227,6 @@ int radeon_fence_wait(struct radeon_fence *fence, bool intr)
radeon_fence_signaled(fence), timeout);
radeon_irq_kms_sw_irq_put(rdev);
}
trace_radeon_fence_wait_end(rdev->ddev, seq);
if (unlikely(!radeon_fence_signaled(fence))) {
/* we were interrupted for some reason and fence isn't
* isn't signaled yet, resume wait
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/gpu/drm/radeon/radeon_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include <drm/drmP.h>
#include "radeon_drm.h"
#include "radeon.h"
#include "radeon_trace.h"


int radeon_ttm_init(struct radeon_device *rdev);
Expand Down Expand Up @@ -138,7 +137,6 @@ int radeon_bo_create(struct radeon_device *rdev, struct drm_gem_object *gobj,
list_add_tail(&bo->list, &rdev->gem.objects);
mutex_unlock(&bo->rdev->gem.mutex);
}
trace_radeon_bo_create(bo);
return 0;
}

Expand Down
82 changes: 0 additions & 82 deletions trunk/drivers/gpu/drm/radeon/radeon_trace.h

This file was deleted.

9 changes: 0 additions & 9 deletions trunk/drivers/gpu/drm/radeon/radeon_trace_points.c

This file was deleted.

2 changes: 1 addition & 1 deletion trunk/drivers/gpu/drm/ttm/ttm_bo_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ int ttm_bo_move_memcpy(struct ttm_buffer_object *bo,
}
mb();
out2:
ttm_bo_free_old_node(bo);
old_copy = *old_mem;
*old_mem = *new_mem;
new_mem->mm_node = NULL;
Expand All @@ -384,7 +385,6 @@ int ttm_bo_move_memcpy(struct ttm_buffer_object *bo,
ttm_mem_reg_iounmap(bdev, old_mem, new_iomap);
out:
ttm_mem_reg_iounmap(bdev, &old_copy, old_iomap);
ttm_bo_mem_put(bo, &old_copy);
return ret;
}
EXPORT_SYMBOL(ttm_bo_move_memcpy);
Expand Down

0 comments on commit cbb7241

Please sign in to comment.