Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
a82dd49f
Commit
a82dd49f
authored
Apr 01, 2011
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau: remove remnants of nouveau_pgraph_engine
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
92abe749
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
33 additions
and
135 deletions
+33
-135
drivers/gpu/drm/nouveau/nouveau_channel.c
drivers/gpu/drm/nouveau/nouveau_channel.c
+1
-1
drivers/gpu/drm/nouveau/nouveau_display.c
drivers/gpu/drm/nouveau/nouveau_display.c
+1
-1
drivers/gpu/drm/nouveau/nouveau_drv.c
drivers/gpu/drm/nouveau/nouveau_drv.c
+0
-1
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nouveau_drv.h
+1
-31
drivers/gpu/drm/nouveau/nouveau_object.c
drivers/gpu/drm/nouveau/nouveau_object.c
+11
-27
drivers/gpu/drm/nouveau/nouveau_state.c
drivers/gpu/drm/nouveau/nouveau_state.c
+4
-41
drivers/gpu/drm/nouveau/nv20_graph.c
drivers/gpu/drm/nouveau/nv20_graph.c
+2
-4
drivers/gpu/drm/nouveau/nv50_graph.c
drivers/gpu/drm/nouveau/nv50_graph.c
+0
-1
drivers/gpu/drm/nouveau/nvc0_graph.c
drivers/gpu/drm/nouveau/nvc0_graph.c
+13
-28
No files found.
drivers/gpu/drm/nouveau/nouveau_channel.c
View file @
a82dd49f
...
@@ -406,7 +406,7 @@ nouveau_ioctl_fifo_alloc(struct drm_device *dev, void *data,
...
@@ -406,7 +406,7 @@ nouveau_ioctl_fifo_alloc(struct drm_device *dev, void *data,
struct
nouveau_channel
*
chan
;
struct
nouveau_channel
*
chan
;
int
ret
;
int
ret
;
if
(
dev_priv
->
engine
.
graph
.
accel_blocked
)
if
(
!
dev_priv
->
eng
[
NVOBJ_ENGINE_GR
]
)
return
-
ENODEV
;
return
-
ENODEV
;
if
(
init
->
fb_ctxdma_handle
==
~
0
||
init
->
tt_ctxdma_handle
==
~
0
)
if
(
init
->
fb_ctxdma_handle
==
~
0
||
init
->
tt_ctxdma_handle
==
~
0
)
...
...
drivers/gpu/drm/nouveau/nouveau_display.c
View file @
a82dd49f
...
@@ -276,7 +276,7 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
...
@@ -276,7 +276,7 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
struct
nouveau_fence
*
fence
;
struct
nouveau_fence
*
fence
;
int
ret
;
int
ret
;
if
(
dev_priv
->
engine
.
graph
.
accel_blocked
)
if
(
!
dev_priv
->
channel
)
return
-
ENODEV
;
return
-
ENODEV
;
s
=
kzalloc
(
sizeof
(
*
s
),
GFP_KERNEL
);
s
=
kzalloc
(
sizeof
(
*
s
),
GFP_KERNEL
);
...
...
drivers/gpu/drm/nouveau/nouveau_drv.c
View file @
a82dd49f
...
@@ -310,7 +310,6 @@ nouveau_pci_resume(struct pci_dev *pdev)
...
@@ -310,7 +310,6 @@ nouveau_pci_resume(struct pci_dev *pdev)
if
(
dev_priv
->
eng
[
i
])
if
(
dev_priv
->
eng
[
i
])
dev_priv
->
eng
[
i
]
->
init
(
dev
,
i
);
dev_priv
->
eng
[
i
]
->
init
(
dev
,
i
);
}
}
engine
->
graph
.
init
(
dev
);
engine
->
fifo
.
init
(
dev
);
engine
->
fifo
.
init
(
dev
);
nouveau_irq_postinstall
(
dev
);
nouveau_irq_postinstall
(
dev
);
...
...
drivers/gpu/drm/nouveau/nouveau_drv.h
View file @
a82dd49f
...
@@ -241,10 +241,7 @@ struct nouveau_channel {
...
@@ -241,10 +241,7 @@ struct nouveau_channel {
struct
nouveau_gpuobj
*
cache
;
struct
nouveau_gpuobj
*
cache
;
void
*
fifo_priv
;
void
*
fifo_priv
;
/* PGRAPH context */
/* Execution engine contexts */
/* XXX may be merge 2 pointers as private data ??? */
struct
nouveau_gpuobj
*
ramin_grctx
;
void
*
pgraph_ctx
;
void
*
engctx
[
NVOBJ_ENGINE_NR
];
void
*
engctx
[
NVOBJ_ENGINE_NR
];
/* NV50 VM */
/* NV50 VM */
...
@@ -372,30 +369,6 @@ struct nouveau_fifo_engine {
...
@@ -372,30 +369,6 @@ struct nouveau_fifo_engine {
void
(
*
tlb_flush
)(
struct
drm_device
*
dev
);
void
(
*
tlb_flush
)(
struct
drm_device
*
dev
);
};
};
struct
nouveau_pgraph_engine
{
bool
accel_blocked
;
bool
registered
;
int
grctx_size
;
void
*
priv
;
/* NV2x/NV3x context table (0x400780) */
struct
nouveau_gpuobj
*
ctx_table
;
int
(
*
init
)(
struct
drm_device
*
);
void
(
*
takedown
)(
struct
drm_device
*
);
void
(
*
fifo_access
)(
struct
drm_device
*
,
bool
);
struct
nouveau_channel
*
(
*
channel
)(
struct
drm_device
*
);
int
(
*
create_context
)(
struct
nouveau_channel
*
);
void
(
*
destroy_context
)(
struct
nouveau_channel
*
);
int
(
*
load_context
)(
struct
nouveau_channel
*
);
int
(
*
unload_context
)(
struct
drm_device
*
);
int
(
*
object_new
)(
struct
nouveau_channel
*
chan
,
u32
handle
,
u16
class
);
void
(
*
tlb_flush
)(
struct
drm_device
*
dev
);
};
struct
nouveau_display_engine
{
struct
nouveau_display_engine
{
void
*
priv
;
void
*
priv
;
int
(
*
early_init
)(
struct
drm_device
*
);
int
(
*
early_init
)(
struct
drm_device
*
);
...
@@ -522,7 +495,6 @@ struct nouveau_engine {
...
@@ -522,7 +495,6 @@ struct nouveau_engine {
struct
nouveau_mc_engine
mc
;
struct
nouveau_mc_engine
mc
;
struct
nouveau_timer_engine
timer
;
struct
nouveau_timer_engine
timer
;
struct
nouveau_fb_engine
fb
;
struct
nouveau_fb_engine
fb
;
struct
nouveau_pgraph_engine
graph
;
struct
nouveau_fifo_engine
fifo
;
struct
nouveau_fifo_engine
fifo
;
struct
nouveau_display_engine
display
;
struct
nouveau_display_engine
display
;
struct
nouveau_gpio_engine
gpio
;
struct
nouveau_gpio_engine
gpio
;
...
@@ -1168,8 +1140,6 @@ extern struct nouveau_enum nv50_data_error_names[];
...
@@ -1168,8 +1140,6 @@ extern struct nouveau_enum nv50_data_error_names[];
/* nvc0_graph.c */
/* nvc0_graph.c */
extern
int
nvc0_graph_create
(
struct
drm_device
*
);
extern
int
nvc0_graph_create
(
struct
drm_device
*
);
extern
void
nvc0_graph_fifo_access
(
struct
drm_device
*
,
bool
);
extern
struct
nouveau_channel
*
nvc0_graph_channel
(
struct
drm_device
*
);
/* nv84_crypt.c */
/* nv84_crypt.c */
extern
int
nv84_crypt_create
(
struct
drm_device
*
);
extern
int
nv84_crypt_create
(
struct
drm_device
*
);
...
...
drivers/gpu/drm/nouveau/nouveau_object.c
View file @
a82dd49f
...
@@ -620,7 +620,6 @@ int
...
@@ -620,7 +620,6 @@ int
nouveau_gpuobj_gr_new
(
struct
nouveau_channel
*
chan
,
u32
handle
,
int
class
)
nouveau_gpuobj_gr_new
(
struct
nouveau_channel
*
chan
,
u32
handle
,
int
class
)
{
{
struct
drm_nouveau_private
*
dev_priv
=
chan
->
dev
->
dev_private
;
struct
drm_nouveau_private
*
dev_priv
=
chan
->
dev
->
dev_private
;
struct
nouveau_pgraph_engine
*
pgraph
=
&
dev_priv
->
engine
.
graph
;
struct
drm_device
*
dev
=
chan
->
dev
;
struct
drm_device
*
dev
=
chan
->
dev
;
struct
nouveau_gpuobj_class
*
oc
;
struct
nouveau_gpuobj_class
*
oc
;
int
ret
;
int
ret
;
...
@@ -628,37 +627,25 @@ nouveau_gpuobj_gr_new(struct nouveau_channel *chan, u32 handle, int class)
...
@@ -628,37 +627,25 @@ nouveau_gpuobj_gr_new(struct nouveau_channel *chan, u32 handle, int class)
NV_DEBUG
(
dev
,
"ch%d class=0x%04x
\n
"
,
chan
->
id
,
class
);
NV_DEBUG
(
dev
,
"ch%d class=0x%04x
\n
"
,
chan
->
id
,
class
);
list_for_each_entry
(
oc
,
&
dev_priv
->
classes
,
head
)
{
list_for_each_entry
(
oc
,
&
dev_priv
->
classes
,
head
)
{
if
(
oc
->
id
==
class
)
struct
nouveau_exec_engine
*
eng
=
dev_priv
->
eng
[
oc
->
engine
];
goto
found
;
}
NV_ERROR
(
dev
,
"illegal object class: 0x%x
\n
"
,
class
);
if
(
oc
->
id
!=
class
)
return
-
EINVAL
;
continue
;
found:
if
(
oc
->
engine
==
NVOBJ_ENGINE_SW
)
if
(
!
dev_priv
->
eng
[
oc
->
engine
])
{
switch
(
oc
->
engine
)
{
case
NVOBJ_ENGINE_SW
:
return
nouveau_gpuobj_sw_new
(
chan
,
handle
,
class
);
return
nouveau_gpuobj_sw_new
(
chan
,
handle
,
class
);
case
NVOBJ_ENGINE_GR
:
if
((
dev_priv
->
card_type
>=
NV_20
&&
!
chan
->
ramin_grctx
)
||
(
dev_priv
->
card_type
<
NV_20
&&
!
chan
->
pgraph_ctx
))
{
ret
=
pgraph
->
create_context
(
chan
);
if
(
ret
)
return
ret
;
}
return
pgraph
->
object_new
(
chan
,
handle
,
class
);
if
(
!
chan
->
engctx
[
oc
->
engine
])
{
ret
=
eng
->
context_new
(
chan
,
oc
->
engine
);
if
(
ret
)
return
ret
;
}
}
}
if
(
!
chan
->
engctx
[
oc
->
engine
])
{
return
eng
->
object_new
(
chan
,
oc
->
engine
,
handle
,
class
);
ret
=
dev_priv
->
eng
[
oc
->
engine
]
->
context_new
(
chan
,
oc
->
engine
);
if
(
ret
)
return
ret
;
}
}
return
dev_priv
->
eng
[
oc
->
engine
]
->
object_new
(
chan
,
oc
->
engine
,
handle
,
class
);
NV_ERROR
(
dev
,
"illegal object class: 0x%x
\n
"
,
class
);
return
-
EINVAL
;
}
}
static
int
static
int
...
@@ -676,9 +663,6 @@ nouveau_gpuobj_channel_init_pramin(struct nouveau_channel *chan)
...
@@ -676,9 +663,6 @@ nouveau_gpuobj_channel_init_pramin(struct nouveau_channel *chan)
size
=
0x2000
;
size
=
0x2000
;
base
=
0
;
base
=
0
;
/* PGRAPH context */
size
+=
dev_priv
->
engine
.
graph
.
grctx_size
;
if
(
dev_priv
->
card_type
==
NV_50
)
{
if
(
dev_priv
->
card_type
==
NV_50
)
{
/* Various fixed table thingos */
/* Various fixed table thingos */
size
+=
0x1400
;
/* mostly unknown stuff */
size
+=
0x1400
;
/* mostly unknown stuff */
...
...
drivers/gpu/drm/nouveau/nouveau_state.c
View file @
a82dd49f
...
@@ -65,10 +65,6 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
...
@@ -65,10 +65,6 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
engine
->
timer
.
takedown
=
nv04_timer_takedown
;
engine
->
timer
.
takedown
=
nv04_timer_takedown
;
engine
->
fb
.
init
=
nv04_fb_init
;
engine
->
fb
.
init
=
nv04_fb_init
;
engine
->
fb
.
takedown
=
nv04_fb_takedown
;
engine
->
fb
.
takedown
=
nv04_fb_takedown
;
engine
->
graph
.
init
=
nouveau_stub_init
;
engine
->
graph
.
takedown
=
nouveau_stub_takedown
;
engine
->
graph
.
channel
=
nvc0_graph_channel
;
engine
->
graph
.
fifo_access
=
nvc0_graph_fifo_access
;
engine
->
fifo
.
channels
=
16
;
engine
->
fifo
.
channels
=
16
;
engine
->
fifo
.
init
=
nv04_fifo_init
;
engine
->
fifo
.
init
=
nv04_fifo_init
;
engine
->
fifo
.
takedown
=
nv04_fifo_fini
;
engine
->
fifo
.
takedown
=
nv04_fifo_fini
;
...
@@ -117,10 +113,6 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
...
@@ -117,10 +113,6 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
engine
->
fb
.
init_tile_region
=
nv10_fb_init_tile_region
;
engine
->
fb
.
init_tile_region
=
nv10_fb_init_tile_region
;
engine
->
fb
.
set_tile_region
=
nv10_fb_set_tile_region
;
engine
->
fb
.
set_tile_region
=
nv10_fb_set_tile_region
;
engine
->
fb
.
free_tile_region
=
nv10_fb_free_tile_region
;
engine
->
fb
.
free_tile_region
=
nv10_fb_free_tile_region
;
engine
->
graph
.
init
=
nouveau_stub_init
;
engine
->
graph
.
takedown
=
nouveau_stub_takedown
;
engine
->
graph
.
channel
=
nvc0_graph_channel
;
engine
->
graph
.
fifo_access
=
nvc0_graph_fifo_access
;
engine
->
fifo
.
channels
=
32
;
engine
->
fifo
.
channels
=
32
;
engine
->
fifo
.
init
=
nv10_fifo_init
;
engine
->
fifo
.
init
=
nv10_fifo_init
;
engine
->
fifo
.
takedown
=
nv04_fifo_fini
;
engine
->
fifo
.
takedown
=
nv04_fifo_fini
;
...
@@ -169,10 +161,6 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
...
@@ -169,10 +161,6 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
engine
->
fb
.
init_tile_region
=
nv10_fb_init_tile_region
;
engine
->
fb
.
init_tile_region
=
nv10_fb_init_tile_region
;
engine
->
fb
.
set_tile_region
=
nv10_fb_set_tile_region
;
engine
->
fb
.
set_tile_region
=
nv10_fb_set_tile_region
;
engine
->
fb
.
free_tile_region
=
nv10_fb_free_tile_region
;
engine
->
fb
.
free_tile_region
=
nv10_fb_free_tile_region
;
engine
->
graph
.
init
=
nouveau_stub_init
;
engine
->
graph
.
takedown
=
nouveau_stub_takedown
;
engine
->
graph
.
channel
=
nvc0_graph_channel
;
engine
->
graph
.
fifo_access
=
nvc0_graph_fifo_access
;
engine
->
fifo
.
channels
=
32
;
engine
->
fifo
.
channels
=
32
;
engine
->
fifo
.
init
=
nv10_fifo_init
;
engine
->
fifo
.
init
=
nv10_fifo_init
;
engine
->
fifo
.
takedown
=
nv04_fifo_fini
;
engine
->
fifo
.
takedown
=
nv04_fifo_fini
;
...
@@ -221,10 +209,6 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
...
@@ -221,10 +209,6 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
engine
->
fb
.
init_tile_region
=
nv30_fb_init_tile_region
;
engine
->
fb
.
init_tile_region
=
nv30_fb_init_tile_region
;
engine
->
fb
.
set_tile_region
=
nv10_fb_set_tile_region
;
engine
->
fb
.
set_tile_region
=
nv10_fb_set_tile_region
;
engine
->
fb
.
free_tile_region
=
nv30_fb_free_tile_region
;
engine
->
fb
.
free_tile_region
=
nv30_fb_free_tile_region
;
engine
->
graph
.
init
=
nouveau_stub_init
;
engine
->
graph
.
takedown
=
nouveau_stub_takedown
;
engine
->
graph
.
channel
=
nvc0_graph_channel
;
engine
->
graph
.
fifo_access
=
nvc0_graph_fifo_access
;
engine
->
fifo
.
channels
=
32
;
engine
->
fifo
.
channels
=
32
;
engine
->
fifo
.
init
=
nv10_fifo_init
;
engine
->
fifo
.
init
=
nv10_fifo_init
;
engine
->
fifo
.
takedown
=
nv04_fifo_fini
;
engine
->
fifo
.
takedown
=
nv04_fifo_fini
;
...
@@ -276,10 +260,6 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
...
@@ -276,10 +260,6 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
engine
->
fb
.
init_tile_region
=
nv30_fb_init_tile_region
;
engine
->
fb
.
init_tile_region
=
nv30_fb_init_tile_region
;
engine
->
fb
.
set_tile_region
=
nv40_fb_set_tile_region
;
engine
->
fb
.
set_tile_region
=
nv40_fb_set_tile_region
;
engine
->
fb
.
free_tile_region
=
nv30_fb_free_tile_region
;
engine
->
fb
.
free_tile_region
=
nv30_fb_free_tile_region
;
engine
->
graph
.
init
=
nouveau_stub_init
;
engine
->
graph
.
takedown
=
nouveau_stub_takedown
;
engine
->
graph
.
fifo_access
=
nvc0_graph_fifo_access
;
engine
->
graph
.
channel
=
nvc0_graph_channel
;
engine
->
fifo
.
channels
=
32
;
engine
->
fifo
.
channels
=
32
;
engine
->
fifo
.
init
=
nv40_fifo_init
;
engine
->
fifo
.
init
=
nv40_fifo_init
;
engine
->
fifo
.
takedown
=
nv04_fifo_fini
;
engine
->
fifo
.
takedown
=
nv04_fifo_fini
;
...
@@ -334,10 +314,6 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
...
@@ -334,10 +314,6 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
engine
->
timer
.
takedown
=
nv04_timer_takedown
;
engine
->
timer
.
takedown
=
nv04_timer_takedown
;
engine
->
fb
.
init
=
nv50_fb_init
;
engine
->
fb
.
init
=
nv50_fb_init
;
engine
->
fb
.
takedown
=
nv50_fb_takedown
;
engine
->
fb
.
takedown
=
nv50_fb_takedown
;
engine
->
graph
.
init
=
nouveau_stub_init
;
engine
->
graph
.
takedown
=
nouveau_stub_takedown
;
engine
->
graph
.
fifo_access
=
nvc0_graph_fifo_access
;
engine
->
graph
.
channel
=
nvc0_graph_channel
;
engine
->
fifo
.
channels
=
128
;
engine
->
fifo
.
channels
=
128
;
engine
->
fifo
.
init
=
nv50_fifo_init
;
engine
->
fifo
.
init
=
nv50_fifo_init
;
engine
->
fifo
.
takedown
=
nv50_fifo_takedown
;
engine
->
fifo
.
takedown
=
nv50_fifo_takedown
;
...
@@ -411,8 +387,6 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
...
@@ -411,8 +387,6 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
engine
->
timer
.
takedown
=
nv04_timer_takedown
;
engine
->
timer
.
takedown
=
nv04_timer_takedown
;
engine
->
fb
.
init
=
nvc0_fb_init
;
engine
->
fb
.
init
=
nvc0_fb_init
;
engine
->
fb
.
takedown
=
nvc0_fb_takedown
;
engine
->
fb
.
takedown
=
nvc0_fb_takedown
;
engine
->
graph
.
fifo_access
=
nvc0_graph_fifo_access
;
engine
->
graph
.
channel
=
nvc0_graph_channel
;
engine
->
fifo
.
channels
=
128
;
engine
->
fifo
.
channels
=
128
;
engine
->
fifo
.
init
=
nvc0_fifo_init
;
engine
->
fifo
.
init
=
nvc0_fifo_init
;
engine
->
fifo
.
takedown
=
nvc0_fifo_takedown
;
engine
->
fifo
.
takedown
=
nvc0_fifo_takedown
;
...
@@ -624,9 +598,7 @@ nouveau_card_init(struct drm_device *dev)
...
@@ -624,9 +598,7 @@ nouveau_card_init(struct drm_device *dev)
break
;
break
;
}
}
if
(
nouveau_noaccel
)
if
(
!
nouveau_noaccel
)
{
engine
->
graph
.
accel_blocked
=
true
;
else
{
for
(
e
=
0
;
e
<
NVOBJ_ENGINE_NR
;
e
++
)
{
for
(
e
=
0
;
e
<
NVOBJ_ENGINE_NR
;
e
++
)
{
if
(
dev_priv
->
eng
[
e
])
{
if
(
dev_priv
->
eng
[
e
])
{
ret
=
dev_priv
->
eng
[
e
]
->
init
(
dev
,
e
);
ret
=
dev_priv
->
eng
[
e
]
->
init
(
dev
,
e
);
...
@@ -635,15 +607,10 @@ nouveau_card_init(struct drm_device *dev)
...
@@ -635,15 +607,10 @@ nouveau_card_init(struct drm_device *dev)
}
}
}
}
/* PGRAPH */
ret
=
engine
->
graph
.
init
(
dev
);
if
(
ret
)
goto
out_engine
;
/* PFIFO */
/* PFIFO */
ret
=
engine
->
fifo
.
init
(
dev
);
ret
=
engine
->
fifo
.
init
(
dev
);
if
(
ret
)
if
(
ret
)
goto
out_
graph
;
goto
out_
engine
;
}
}
ret
=
engine
->
display
.
create
(
dev
);
ret
=
engine
->
display
.
create
(
dev
);
...
@@ -660,7 +627,7 @@ nouveau_card_init(struct drm_device *dev)
...
@@ -660,7 +627,7 @@ nouveau_card_init(struct drm_device *dev)
/* what about PVIDEO/PCRTC/PRAMDAC etc? */
/* what about PVIDEO/PCRTC/PRAMDAC etc? */
if
(
!
engine
->
graph
.
accel_blocked
)
{
if
(
dev_priv
->
eng
[
NVOBJ_ENGINE_GR
]
)
{
ret
=
nouveau_fence_init
(
dev
);
ret
=
nouveau_fence_init
(
dev
);
if
(
ret
)
if
(
ret
)
goto
out_irq
;
goto
out_irq
;
...
@@ -684,9 +651,6 @@ nouveau_card_init(struct drm_device *dev)
...
@@ -684,9 +651,6 @@ nouveau_card_init(struct drm_device *dev)
out_fifo:
out_fifo:
if
(
!
nouveau_noaccel
)
if
(
!
nouveau_noaccel
)
engine
->
fifo
.
takedown
(
dev
);
engine
->
fifo
.
takedown
(
dev
);
out_graph:
if
(
!
nouveau_noaccel
)
engine
->
graph
.
takedown
(
dev
);
out_engine:
out_engine:
if
(
!
nouveau_noaccel
)
{
if
(
!
nouveau_noaccel
)
{
for
(
e
=
e
-
1
;
e
>=
0
;
e
--
)
{
for
(
e
=
e
-
1
;
e
>=
0
;
e
--
)
{
...
@@ -728,14 +692,13 @@ static void nouveau_card_takedown(struct drm_device *dev)
...
@@ -728,14 +692,13 @@ static void nouveau_card_takedown(struct drm_device *dev)
struct
nouveau_engine
*
engine
=
&
dev_priv
->
engine
;
struct
nouveau_engine
*
engine
=
&
dev_priv
->
engine
;
int
e
;
int
e
;
if
(
!
engine
->
graph
.
accel_blocked
)
{
if
(
dev_priv
->
channel
)
{
nouveau_fence_fini
(
dev
);
nouveau_fence_fini
(
dev
);
nouveau_channel_put_unlocked
(
&
dev_priv
->
channel
);
nouveau_channel_put_unlocked
(
&
dev_priv
->
channel
);
}
}
if
(
!
nouveau_noaccel
)
{
if
(
!
nouveau_noaccel
)
{
engine
->
fifo
.
takedown
(
dev
);
engine
->
fifo
.
takedown
(
dev
);
engine
->
graph
.
takedown
(
dev
);
for
(
e
=
NVOBJ_ENGINE_NR
-
1
;
e
>=
0
;
e
--
)
{
for
(
e
=
NVOBJ_ENGINE_NR
-
1
;
e
>=
0
;
e
--
)
{
if
(
dev_priv
->
eng
[
e
])
{
if
(
dev_priv
->
eng
[
e
])
{
dev_priv
->
eng
[
e
]
->
fini
(
dev
,
e
);
dev_priv
->
eng
[
e
]
->
fini
(
dev
,
e
);
...
...
drivers/gpu/drm/nouveau/nv20_graph.c
View file @
a82dd49f
...
@@ -752,8 +752,7 @@ nv20_graph_create(struct drm_device *dev)
...
@@ -752,8 +752,7 @@ nv20_graph_create(struct drm_device *dev)
pgraph
->
grctx_user
=
0x0000
;
pgraph
->
grctx_user
=
0x0000
;
break
;
break
;
default:
default:
NV_ERROR
(
dev
,
"unknown nv20, disabling acceleration
\n
"
);
NV_ERROR
(
dev
,
"PGRAPH: unknown chipset
\n
"
);
dev_priv
->
engine
.
graph
.
accel_blocked
=
true
;
return
0
;
return
0
;
}
}
}
else
{
}
else
{
...
@@ -774,8 +773,7 @@ nv20_graph_create(struct drm_device *dev)
...
@@ -774,8 +773,7 @@ nv20_graph_create(struct drm_device *dev)
pgraph
->
grctx_size
=
NV35_36_GRCTX_SIZE
;
pgraph
->
grctx_size
=
NV35_36_GRCTX_SIZE
;
break
;
break
;
default:
default:
NV_ERROR
(
dev
,
"unknown nv30, disabling acceleration
\n
"
);
NV_ERROR
(
dev
,
"PGRAPH: unknown chipset
\n
"
);
dev_priv
->
engine
.
graph
.
accel_blocked
=
true
;
return
0
;
return
0
;
}
}
}
}
...
...
drivers/gpu/drm/nouveau/nv50_graph.c
View file @
a82dd49f
...
@@ -1053,7 +1053,6 @@ nv50_graph_create(struct drm_device *dev)
...
@@ -1053,7 +1053,6 @@ nv50_graph_create(struct drm_device *dev)
ret
=
nv50_grctx_init
(
&
ctx
);
ret
=
nv50_grctx_init
(
&
ctx
);
if
(
ret
)
{
if
(
ret
)
{
NV_ERROR
(
dev
,
"PGRAPH: ctxprog build failed
\n
"
);
NV_ERROR
(
dev
,
"PGRAPH: ctxprog build failed
\n
"
);
dev_priv
->
engine
.
graph
.
accel_blocked
=
true
;
kfree
(
pgraph
);
kfree
(
pgraph
);
return
0
;
return
0
;
}
}
...
...
drivers/gpu/drm/nouveau/nvc0_graph.c
View file @
a82dd49f
...
@@ -30,17 +30,6 @@
...
@@ -30,17 +30,6 @@
#include "nouveau_mm.h"
#include "nouveau_mm.h"
#include "nvc0_graph.h"
#include "nvc0_graph.h"
void
nvc0_graph_fifo_access
(
struct
drm_device
*
dev
,
bool
enabled
)
{
}
struct
nouveau_channel
*
nvc0_graph_channel
(
struct
drm_device
*
dev
)
{
return
NULL
;
}
static
int
static
int
nvc0_graph_load_context
(
struct
nouveau_channel
*
chan
)
nvc0_graph_load_context
(
struct
nouveau_channel
*
chan
)
{
{
...
@@ -508,23 +497,8 @@ nvc0_graph_init_ctxctl(struct drm_device *dev)
...
@@ -508,23 +497,8 @@ nvc0_graph_init_ctxctl(struct drm_device *dev)
static
int
static
int
nvc0_graph_init
(
struct
drm_device
*
dev
,
int
engine
)
nvc0_graph_init
(
struct
drm_device
*
dev
,
int
engine
)
{
{
struct
drm_nouveau_private
*
dev_priv
=
dev
->
dev_private
;
int
ret
;
int
ret
;
dev_priv
->
engine
.
graph
.
accel_blocked
=
true
;
switch
(
dev_priv
->
chipset
)
{
case
0xc0
:
case
0xc3
:
case
0xc4
:
break
;
default:
NV_ERROR
(
dev
,
"PGRAPH: unsupported chipset, please report!
\n
"
);
if
(
nouveau_noaccel
!=
0
)
return
0
;
break
;
}
nv_mask
(
dev
,
0x000200
,
0x18001000
,
0x00000000
);
nv_mask
(
dev
,
0x000200
,
0x18001000
,
0x00000000
);
nv_mask
(
dev
,
0x000200
,
0x18001000
,
0x18001000
);
nv_mask
(
dev
,
0x000200
,
0x18001000
,
0x18001000
);
...
@@ -551,8 +525,9 @@ nvc0_graph_init(struct drm_device *dev, int engine)
...
@@ -551,8 +525,9 @@ nvc0_graph_init(struct drm_device *dev, int engine)
nv_wr32
(
dev
,
0x400054
,
0x34ce3464
);
nv_wr32
(
dev
,
0x400054
,
0x34ce3464
);
ret
=
nvc0_graph_init_ctxctl
(
dev
);
ret
=
nvc0_graph_init_ctxctl
(
dev
);
if
(
ret
==
0
)
if
(
ret
)
dev_priv
->
engine
.
graph
.
accel_blocked
=
false
;
return
ret
;
return
0
;
return
0
;
}
}
...
@@ -686,6 +661,16 @@ nvc0_graph_create(struct drm_device *dev)
...
@@ -686,6 +661,16 @@ nvc0_graph_create(struct drm_device *dev)
struct
nvc0_graph_priv
*
priv
;
struct
nvc0_graph_priv
*
priv
;
int
ret
,
gpc
,
i
;
int
ret
,
gpc
,
i
;
switch
(
dev_priv
->
chipset
)
{
case
0xc0
:
case
0xc3
:
case
0xc4
:
break
;
default:
NV_ERROR
(
dev
,
"PGRAPH: unsupported chipset, please report!
\n
"
);
return
0
;
}
priv
=
kzalloc
(
sizeof
(
*
priv
),
GFP_KERNEL
);
priv
=
kzalloc
(
sizeof
(
*
priv
),
GFP_KERNEL
);
if
(
!
priv
)
if
(
!
priv
)
return
-
ENOMEM
;
return
-
ENOMEM
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment