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
nexedi
linux
Commits
27d5030a
Commit
27d5030a
authored
Oct 06, 2011
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau: move master modesetting init to nouveau_display
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
549cd872
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
27 deletions
+51
-27
drivers/gpu/drm/nouveau/nouveau_display.c
drivers/gpu/drm/nouveau/nouveau_display.c
+46
-1
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nouveau_drv.h
+2
-0
drivers/gpu/drm/nouveau/nouveau_fb.h
drivers/gpu/drm/nouveau/nouveau_fb.h
+0
-2
drivers/gpu/drm/nouveau/nouveau_state.c
drivers/gpu/drm/nouveau/nouveau_state.c
+3
-24
No files found.
drivers/gpu/drm/nouveau/nouveau_display.c
View file @
27d5030a
...
@@ -147,11 +147,56 @@ nouveau_user_framebuffer_create(struct drm_device *dev,
...
@@ -147,11 +147,56 @@ nouveau_user_framebuffer_create(struct drm_device *dev,
return
&
nouveau_fb
->
base
;
return
&
nouveau_fb
->
base
;
}
}
const
struct
drm_mode_config_funcs
nouveau_mode_config_funcs
=
{
static
const
struct
drm_mode_config_funcs
nouveau_mode_config_funcs
=
{
.
fb_create
=
nouveau_user_framebuffer_create
,
.
fb_create
=
nouveau_user_framebuffer_create
,
.
output_poll_changed
=
nouveau_fbcon_output_poll_changed
,
.
output_poll_changed
=
nouveau_fbcon_output_poll_changed
,
};
};
int
nouveau_display_create
(
struct
drm_device
*
dev
)
{
struct
drm_nouveau_private
*
dev_priv
=
dev
->
dev_private
;
struct
nouveau_display_engine
*
disp
=
&
dev_priv
->
engine
.
display
;
int
ret
;
drm_mode_config_init
(
dev
);
drm_mode_create_scaling_mode_property
(
dev
);
drm_mode_create_dithering_property
(
dev
);
dev
->
mode_config
.
funcs
=
(
void
*
)
&
nouveau_mode_config_funcs
;
dev
->
mode_config
.
fb_base
=
pci_resource_start
(
dev
->
pdev
,
1
);
dev
->
mode_config
.
min_width
=
0
;
dev
->
mode_config
.
min_height
=
0
;
if
(
dev_priv
->
card_type
<
NV_10
)
{
dev
->
mode_config
.
max_width
=
2048
;
dev
->
mode_config
.
max_height
=
2048
;
}
else
if
(
dev_priv
->
card_type
<
NV_50
)
{
dev
->
mode_config
.
max_width
=
4096
;
dev
->
mode_config
.
max_height
=
4096
;
}
else
{
dev
->
mode_config
.
max_width
=
8192
;
dev
->
mode_config
.
max_height
=
8192
;
}
ret
=
disp
->
create
(
dev
);
if
(
ret
)
return
ret
;
return
0
;
}
void
nouveau_display_destroy
(
struct
drm_device
*
dev
)
{
struct
drm_nouveau_private
*
dev_priv
=
dev
->
dev_private
;
struct
nouveau_display_engine
*
disp
=
&
dev_priv
->
engine
.
display
;
disp
->
destroy
(
dev
);
drm_mode_config_cleanup
(
dev
);
}
int
int
nouveau_vblank_enable
(
struct
drm_device
*
dev
,
int
crtc
)
nouveau_vblank_enable
(
struct
drm_device
*
dev
,
int
crtc
)
{
{
...
...
drivers/gpu/drm/nouveau/nouveau_drv.h
View file @
27d5030a
...
@@ -1442,6 +1442,8 @@ extern int nouveau_gem_ioctl_info(struct drm_device *, void *,
...
@@ -1442,6 +1442,8 @@ extern int nouveau_gem_ioctl_info(struct drm_device *, void *,
struct
drm_file
*
);
struct
drm_file
*
);
/* nouveau_display.c */
/* nouveau_display.c */
int
nouveau_display_create
(
struct
drm_device
*
dev
);
void
nouveau_display_destroy
(
struct
drm_device
*
dev
);
int
nouveau_vblank_enable
(
struct
drm_device
*
dev
,
int
crtc
);
int
nouveau_vblank_enable
(
struct
drm_device
*
dev
,
int
crtc
);
void
nouveau_vblank_disable
(
struct
drm_device
*
dev
,
int
crtc
);
void
nouveau_vblank_disable
(
struct
drm_device
*
dev
,
int
crtc
);
int
nouveau_crtc_page_flip
(
struct
drm_crtc
*
crtc
,
struct
drm_framebuffer
*
fb
,
int
nouveau_crtc_page_flip
(
struct
drm_crtc
*
crtc
,
struct
drm_framebuffer
*
fb
,
...
...
drivers/gpu/drm/nouveau/nouveau_fb.h
View file @
27d5030a
...
@@ -42,8 +42,6 @@ nouveau_framebuffer(struct drm_framebuffer *fb)
...
@@ -42,8 +42,6 @@ nouveau_framebuffer(struct drm_framebuffer *fb)
return
container_of
(
fb
,
struct
nouveau_framebuffer
,
base
);
return
container_of
(
fb
,
struct
nouveau_framebuffer
,
base
);
}
}
extern
const
struct
drm_mode_config_funcs
nouveau_mode_config_funcs
;
int
nouveau_framebuffer_init
(
struct
drm_device
*
dev
,
struct
nouveau_framebuffer
*
nouveau_fb
,
int
nouveau_framebuffer_init
(
struct
drm_device
*
dev
,
struct
nouveau_framebuffer
*
nouveau_fb
,
struct
drm_mode_fb_cmd2
*
mode_cmd
,
struct
nouveau_bo
*
nvbo
);
struct
drm_mode_fb_cmd2
*
mode_cmd
,
struct
nouveau_bo
*
nvbo
);
#endif
/* __NOUVEAU_FB_H__ */
#endif
/* __NOUVEAU_FB_H__ */
drivers/gpu/drm/nouveau/nouveau_state.c
View file @
27d5030a
...
@@ -733,27 +733,7 @@ nouveau_card_init(struct drm_device *dev)
...
@@ -733,27 +733,7 @@ nouveau_card_init(struct drm_device *dev)
if
(
ret
)
if
(
ret
)
goto
out_fifo
;
goto
out_fifo
;
/* initialise general modesetting */
ret
=
nouveau_display_create
(
dev
);
drm_mode_config_init
(
dev
);
drm_mode_create_scaling_mode_property
(
dev
);
drm_mode_create_dithering_property
(
dev
);
dev
->
mode_config
.
funcs
=
(
void
*
)
&
nouveau_mode_config_funcs
;
dev
->
mode_config
.
fb_base
=
pci_resource_start
(
dev
->
pdev
,
1
);
dev
->
mode_config
.
min_width
=
0
;
dev
->
mode_config
.
min_height
=
0
;
if
(
dev_priv
->
card_type
<
NV_10
)
{
dev
->
mode_config
.
max_width
=
2048
;
dev
->
mode_config
.
max_height
=
2048
;
}
else
if
(
dev_priv
->
card_type
<
NV_50
)
{
dev
->
mode_config
.
max_width
=
4096
;
dev
->
mode_config
.
max_height
=
4096
;
}
else
{
dev
->
mode_config
.
max_width
=
8192
;
dev
->
mode_config
.
max_height
=
8192
;
}
ret
=
engine
->
display
.
create
(
dev
);
if
(
ret
)
if
(
ret
)
goto
out_irq
;
goto
out_irq
;
...
@@ -789,7 +769,7 @@ nouveau_card_init(struct drm_device *dev)
...
@@ -789,7 +769,7 @@ nouveau_card_init(struct drm_device *dev)
nouveau_fence_fini
(
dev
);
nouveau_fence_fini
(
dev
);
out_disp:
out_disp:
nouveau_backlight_exit
(
dev
);
nouveau_backlight_exit
(
dev
);
engine
->
display
.
destroy
(
dev
);
nouveau_display_
destroy
(
dev
);
out_irq:
out_irq:
nouveau_irq_fini
(
dev
);
nouveau_irq_fini
(
dev
);
out_fifo:
out_fifo:
...
@@ -850,8 +830,7 @@ static void nouveau_card_takedown(struct drm_device *dev)
...
@@ -850,8 +830,7 @@ static void nouveau_card_takedown(struct drm_device *dev)
}
}
nouveau_backlight_exit
(
dev
);
nouveau_backlight_exit
(
dev
);
engine
->
display
.
destroy
(
dev
);
nouveau_display_destroy
(
dev
);
drm_mode_config_cleanup
(
dev
);
if
(
!
dev_priv
->
noaccel
)
{
if
(
!
dev_priv
->
noaccel
)
{
engine
->
fifo
.
takedown
(
dev
);
engine
->
fifo
.
takedown
(
dev
);
...
...
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