-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drm/nouveau/timer: namespace + nvidia gpu names (no binary change)
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: Ben Skeggs <bskeggs@redhat.com>
- Loading branch information
Ben Skeggs
committed
Jan 22, 2015
1 parent
e140461
commit 9e79a85
Showing
26 changed files
with
105 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,61 @@ | ||
#ifndef __NOUVEAU_TIMER_H__ | ||
#define __NOUVEAU_TIMER_H__ | ||
|
||
#ifndef __NVKM_TIMER_H__ | ||
#define __NVKM_TIMER_H__ | ||
#include <core/subdev.h> | ||
#include <core/device.h> | ||
|
||
struct nouveau_alarm { | ||
struct nvkm_alarm { | ||
struct list_head head; | ||
u64 timestamp; | ||
void (*func)(struct nouveau_alarm *); | ||
void (*func)(struct nvkm_alarm *); | ||
}; | ||
|
||
static inline void | ||
nouveau_alarm_init(struct nouveau_alarm *alarm, | ||
void (*func)(struct nouveau_alarm *)) | ||
nvkm_alarm_init(struct nvkm_alarm *alarm, | ||
void (*func)(struct nvkm_alarm *)) | ||
{ | ||
INIT_LIST_HEAD(&alarm->head); | ||
alarm->func = func; | ||
} | ||
|
||
bool nouveau_timer_wait_eq(void *, u64 nsec, u32 addr, u32 mask, u32 data); | ||
bool nouveau_timer_wait_ne(void *, u64 nsec, u32 addr, u32 mask, u32 data); | ||
bool nouveau_timer_wait_cb(void *, u64 nsec, bool (*func)(void *), void *data); | ||
void nouveau_timer_alarm(void *, u32 nsec, struct nouveau_alarm *); | ||
void nouveau_timer_alarm_cancel(void *, struct nouveau_alarm *); | ||
bool nvkm_timer_wait_eq(void *, u64 nsec, u32 addr, u32 mask, u32 data); | ||
bool nvkm_timer_wait_ne(void *, u64 nsec, u32 addr, u32 mask, u32 data); | ||
bool nvkm_timer_wait_cb(void *, u64 nsec, bool (*func)(void *), void *data); | ||
void nvkm_timer_alarm(void *, u32 nsec, struct nvkm_alarm *); | ||
void nvkm_timer_alarm_cancel(void *, struct nvkm_alarm *); | ||
|
||
#define NV_WAIT_DEFAULT 2000000000ULL | ||
#define nv_wait(o,a,m,v) \ | ||
nouveau_timer_wait_eq((o), NV_WAIT_DEFAULT, (a), (m), (v)) | ||
nvkm_timer_wait_eq((o), NV_WAIT_DEFAULT, (a), (m), (v)) | ||
#define nv_wait_ne(o,a,m,v) \ | ||
nouveau_timer_wait_ne((o), NV_WAIT_DEFAULT, (a), (m), (v)) | ||
nvkm_timer_wait_ne((o), NV_WAIT_DEFAULT, (a), (m), (v)) | ||
#define nv_wait_cb(o,c,d) \ | ||
nouveau_timer_wait_cb((o), NV_WAIT_DEFAULT, (c), (d)) | ||
nvkm_timer_wait_cb((o), NV_WAIT_DEFAULT, (c), (d)) | ||
|
||
struct nouveau_timer { | ||
struct nouveau_subdev base; | ||
u64 (*read)(struct nouveau_timer *); | ||
void (*alarm)(struct nouveau_timer *, u64 time, struct nouveau_alarm *); | ||
void (*alarm_cancel)(struct nouveau_timer *, struct nouveau_alarm *); | ||
struct nvkm_timer { | ||
struct nvkm_subdev base; | ||
u64 (*read)(struct nvkm_timer *); | ||
void (*alarm)(struct nvkm_timer *, u64 time, struct nvkm_alarm *); | ||
void (*alarm_cancel)(struct nvkm_timer *, struct nvkm_alarm *); | ||
}; | ||
|
||
static inline struct nouveau_timer * | ||
nouveau_timer(void *obj) | ||
static inline struct nvkm_timer * | ||
nvkm_timer(void *obj) | ||
{ | ||
return (void *)nouveau_subdev(obj, NVDEV_SUBDEV_TIMER); | ||
return (void *)nvkm_subdev(obj, NVDEV_SUBDEV_TIMER); | ||
} | ||
|
||
#define nouveau_timer_create(p,e,o,d) \ | ||
nouveau_subdev_create_((p), (e), (o), 0, "PTIMER", "timer", \ | ||
#define nvkm_timer_create(p,e,o,d) \ | ||
nvkm_subdev_create_((p), (e), (o), 0, "PTIMER", "timer", \ | ||
sizeof(**d), (void **)d) | ||
#define nouveau_timer_destroy(p) \ | ||
nouveau_subdev_destroy(&(p)->base) | ||
#define nouveau_timer_init(p) \ | ||
nouveau_subdev_init(&(p)->base) | ||
#define nouveau_timer_fini(p,s) \ | ||
nouveau_subdev_fini(&(p)->base, (s)) | ||
|
||
int nouveau_timer_create_(struct nouveau_object *, struct nouveau_engine *, | ||
struct nouveau_oclass *, int size, void **); | ||
|
||
extern struct nouveau_oclass nv04_timer_oclass; | ||
extern struct nouveau_oclass gk20a_timer_oclass; | ||
|
||
#define nvkm_timer_destroy(p) \ | ||
nvkm_subdev_destroy(&(p)->base) | ||
#define nvkm_timer_init(p) \ | ||
nvkm_subdev_init(&(p)->base) | ||
#define nvkm_timer_fini(p,s) \ | ||
nvkm_subdev_fini(&(p)->base, (s)) | ||
|
||
int nvkm_timer_create_(struct nvkm_object *, struct nvkm_engine *, | ||
struct nvkm_oclass *, int size, void **); | ||
|
||
extern struct nvkm_oclass nv04_timer_oclass; | ||
extern struct nvkm_oclass gk20a_timer_oclass; | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ | |
*/ | ||
#include <engine/falcon.h> | ||
|
||
#include <core/device.h> | ||
#include <subdev/timer.h> | ||
|
||
void | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#include <core/os.h> | ||
#include <core/device.h> | ||
#include <core/engctx.h> | ||
#include <core/enum.h> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ | |
*/ | ||
#include "priv.h" | ||
|
||
#include <core/device.h> | ||
#include <subdev/gpio.h> | ||
|
||
struct gt215_therm_priv { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.