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
57cd6508
Commit
57cd6508
authored
Aug 08, 2010
by
Chris Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/i915: Sanity check user framebuffer parameters on creation
Signed-off-by:
Chris Wilson
<
chris@chris-wilson.co.uk
>
parent
763a4a01
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_display.c
+17
-0
No files found.
drivers/gpu/drm/i915/intel_display.c
View file @
57cd6508
...
@@ -5371,8 +5371,25 @@ int intel_framebuffer_init(struct drm_device *dev,
...
@@ -5371,8 +5371,25 @@ int intel_framebuffer_init(struct drm_device *dev,
struct
drm_mode_fb_cmd
*
mode_cmd
,
struct
drm_mode_fb_cmd
*
mode_cmd
,
struct
drm_gem_object
*
obj
)
struct
drm_gem_object
*
obj
)
{
{
struct
drm_i915_gem_object
*
obj_priv
=
to_intel_bo
(
obj
);
int
ret
;
int
ret
;
if
(
obj_priv
->
tiling_mode
==
I915_TILING_Y
)
return
-
EINVAL
;
if
(
mode_cmd
->
pitch
&
63
)
return
-
EINVAL
;
switch
(
mode_cmd
->
bpp
)
{
case
8
:
case
16
:
case
24
:
case
32
:
break
;
default:
return
-
EINVAL
;
}
ret
=
drm_framebuffer_init
(
dev
,
&
intel_fb
->
base
,
&
intel_fb_funcs
);
ret
=
drm_framebuffer_init
(
dev
,
&
intel_fb
->
base
,
&
intel_fb_funcs
);
if
(
ret
)
{
if
(
ret
)
{
DRM_ERROR
(
"framebuffer init failed %d
\n
"
,
ret
);
DRM_ERROR
(
"framebuffer init failed %d
\n
"
,
ret
);
...
...
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