Commit 8700287b authored by Ben Skeggs's avatar Ben Skeggs
Browse files

drm/nouveau/sw: rename from software (no binary change)



Shorter device name, make consistent with our engine enums.

The namespace of NVKM is being changed to nvkm_ instead of nouveau_,
which will be used for the DRM part of the driver.  This is being
done in order to make it very clear as to what part of the driver a
given symbol belongs to, and as a minor step towards splitting the
DRM driver out to be able to stand on its own (for virt).

Because there's already a large amount of churn here anyway, this is
as good a time as any to also switch to NVIDIA's device and chipset
naming to ease collaboration with them.

A comparison of objdump disassemblies proves no code changes.

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent fd8666f7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ void nvif_device_ref(struct nvif_device *, struct nvif_device **);
#include <engine/device.h>
#include <engine/fifo.h>
#include <engine/gr.h>
#include <engine/software.h>
#include <engine/sw.h>

#define nvkm_fifo(a) nouveau_fifo(nvkm_device(a))
#define nvkm_fifo_chan(a) ((struct nouveau_fifo_chan *)nvkm_object(a))
+0 −51
Original line number Diff line number Diff line
#ifndef __NOUVEAU_SOFTWARE_H__
#define __NOUVEAU_SOFTWARE_H__

#include <core/engine.h>
#include <core/engctx.h>

struct nouveau_software_chan {
	struct nouveau_engctx base;

	int (*flip)(void *);
	void *flip_data;
};

#define nouveau_software_context_create(p,e,c,d)                               \
	nouveau_engctx_create((p), (e), (c), (p), 0, 0, 0, (d))
#define nouveau_software_context_destroy(d)                                    \
	nouveau_engctx_destroy(&(d)->base)
#define nouveau_software_context_init(d)                                       \
	nouveau_engctx_init(&(d)->base)
#define nouveau_software_context_fini(d,s)                                     \
	nouveau_engctx_fini(&(d)->base, (s))

#define _nouveau_software_context_dtor _nouveau_engctx_dtor
#define _nouveau_software_context_init _nouveau_engctx_init
#define _nouveau_software_context_fini _nouveau_engctx_fini

struct nouveau_software {
	struct nouveau_engine base;
};

#define nouveau_software_create(p,e,c,d)                                       \
	nouveau_engine_create((p), (e), (c), true, "SW", "software", (d))
#define nouveau_software_destroy(d)                                            \
	nouveau_engine_destroy(&(d)->base)
#define nouveau_software_init(d)                                               \
	nouveau_engine_init(&(d)->base)
#define nouveau_software_fini(d,s)                                             \
	nouveau_engine_fini(&(d)->base, (s))

#define _nouveau_software_dtor _nouveau_engine_dtor
#define _nouveau_software_init _nouveau_engine_init
#define _nouveau_software_fini _nouveau_engine_fini

extern struct nouveau_oclass *nv04_software_oclass;
extern struct nouveau_oclass *nv10_software_oclass;
extern struct nouveau_oclass *nv50_software_oclass;
extern struct nouveau_oclass *nvc0_software_oclass;

void nv04_software_intr(struct nouveau_subdev *);

#endif
+51 −0
Original line number Diff line number Diff line
#ifndef __NOUVEAU_SW_H__
#define __NOUVEAU_SW_H__

#include <core/engine.h>
#include <core/engctx.h>

struct nouveau_sw_chan {
	struct nouveau_engctx base;

	int (*flip)(void *);
	void *flip_data;
};

#define nouveau_sw_context_create(p,e,c,d)                               \
	nouveau_engctx_create((p), (e), (c), (p), 0, 0, 0, (d))
#define nouveau_sw_context_destroy(d)                                    \
	nouveau_engctx_destroy(&(d)->base)
#define nouveau_sw_context_init(d)                                       \
	nouveau_engctx_init(&(d)->base)
#define nouveau_sw_context_fini(d,s)                                     \
	nouveau_engctx_fini(&(d)->base, (s))

#define _nouveau_sw_context_dtor _nouveau_engctx_dtor
#define _nouveau_sw_context_init _nouveau_engctx_init
#define _nouveau_sw_context_fini _nouveau_engctx_fini

struct nouveau_sw {
	struct nouveau_engine base;
};

#define nouveau_sw_create(p,e,c,d)                                       \
	nouveau_engine_create((p), (e), (c), true, "SW", "software", (d))
#define nouveau_sw_destroy(d)                                            \
	nouveau_engine_destroy(&(d)->base)
#define nouveau_sw_init(d)                                               \
	nouveau_engine_init(&(d)->base)
#define nouveau_sw_fini(d,s)                                             \
	nouveau_engine_fini(&(d)->base, (s))

#define _nouveau_sw_dtor _nouveau_engine_dtor
#define _nouveau_sw_init _nouveau_engine_init
#define _nouveau_sw_fini _nouveau_engine_fini

extern struct nouveau_oclass *nv04_sw_oclass;
extern struct nouveau_oclass *nv10_sw_oclass;
extern struct nouveau_oclass *nv50_sw_oclass;
extern struct nouveau_oclass *nvc0_sw_oclass;

void nv04_sw_intr(struct nouveau_subdev *);

#endif
+1 −1
Original line number Diff line number Diff line
@@ -282,7 +282,7 @@ nouveau_channel_init(struct nouveau_channel *chan, u32 vram, u32 gart)
	struct nvif_device *device = chan->device;
	struct nouveau_cli *cli = (void *)nvif_client(&device->base);
	struct nouveau_mmu *mmu = nvkm_mmu(device);
	struct nouveau_software_chan *swch;
	struct nouveau_sw_chan *swch;
	struct nv_dma_v0 args = {};
	int ret, i;

+1 −1
Original line number Diff line number Diff line
@@ -231,7 +231,7 @@ nouveau_accel_init(struct nouveau_drm *drm)
	ret = nvif_object_init(drm->channel->object, NULL, NVDRM_NVSW,
			       nouveau_abi16_swclass(drm), NULL, 0, &drm->nvsw);
	if (ret == 0) {
		struct nouveau_software_chan *swch;
		struct nouveau_sw_chan *swch;
		ret = RING_SPACE(drm->channel, 2);
		if (ret == 0) {
			if (device->info.family < NV_DEVICE_INFO_V0_FERMI) {
Loading