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
021a8455
Commit
021a8455
authored
Jan 28, 2011
by
Chris Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm: Avoid leak of adjusted mode along quick set_mode paths
Signed-off-by:
Chris Wilson
<
chris@chris-wilson.co.uk
>
parent
ede3ff52
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
drivers/gpu/drm/drm_crtc_helper.c
drivers/gpu/drm/drm_crtc_helper.c
+3
-5
No files found.
drivers/gpu/drm/drm_crtc_helper.c
View file @
021a8455
...
@@ -343,13 +343,12 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
...
@@ -343,13 +343,12 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
struct
drm_encoder
*
encoder
;
struct
drm_encoder
*
encoder
;
bool
ret
=
true
;
bool
ret
=
true
;
adjusted_mode
=
drm_mode_duplicate
(
dev
,
mode
);
crtc
->
enabled
=
drm_helper_crtc_in_use
(
crtc
);
crtc
->
enabled
=
drm_helper_crtc_in_use
(
crtc
);
if
(
!
crtc
->
enabled
)
if
(
!
crtc
->
enabled
)
return
true
;
return
true
;
adjusted_mode
=
drm_mode_duplicate
(
dev
,
mode
);
saved_hwmode
=
crtc
->
hwmode
;
saved_hwmode
=
crtc
->
hwmode
;
saved_mode
=
crtc
->
mode
;
saved_mode
=
crtc
->
mode
;
saved_x
=
crtc
->
x
;
saved_x
=
crtc
->
x
;
...
@@ -437,10 +436,9 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
...
@@ -437,10 +436,9 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
*/
*/
drm_calc_timestamping_constants
(
crtc
);
drm_calc_timestamping_constants
(
crtc
);
/* XXX free adjustedmode */
drm_mode_destroy
(
dev
,
adjusted_mode
);
/* FIXME: add subpixel order */
/* FIXME: add subpixel order */
done:
done:
drm_mode_destroy
(
dev
,
adjusted_mode
);
if
(
!
ret
)
{
if
(
!
ret
)
{
crtc
->
hwmode
=
saved_hwmode
;
crtc
->
hwmode
=
saved_hwmode
;
crtc
->
mode
=
saved_mode
;
crtc
->
mode
=
saved_mode
;
...
...
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