projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c196cbe
)
drm/amd/display: Handle case when stream not found in set_dpms
author
Eric Yang
<
[email protected]
>
Tue, 3 Oct 2017 22:15:51 +0000
(18:15 -0400)
committer
Alex Deucher
<
[email protected]
>
Sat, 21 Oct 2017 20:48:05 +0000
(16:48 -0400)
When validate with context fail to add stream to the context, we have
a case where set_dpms won't be able to find the stream that need to
be disabled.
Signed-off-by: Eric Yang <
[email protected]
>
Reviewed-by: Tony Cheng <
[email protected]
>
Acked-by: Harry Wentland <
[email protected]
>
Signed-off-by: Alex Deucher <
[email protected]
>
drivers/gpu/drm/amd/display/dc/core/dc.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/amd/display/dc/core/dc.c
b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 4cdb855ef8558d8cac91fe0a1334eb59843279c7..fe66c6a21bc3f7be0401759bbec1d0f1962e4ce6 100644
(file)
--- a/
drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/
drivers/gpu/drm/amd/display/dc/core/dc.c
@@
-363,7
+363,7
@@
void set_dpms(
struct dc_stream_state *stream,
bool dpms_off)
{
- struct pipe_ctx *pipe_ctx;
+ struct pipe_ctx *pipe_ctx
= NULL
;
int i;
for (i = 0; i < MAX_PIPES; i++) {
@@
-373,6
+373,11
@@
void set_dpms(
}
}
+ if (!pipe_ctx) {
+ ASSERT(0);
+ return;
+ }
+
if (stream->dpms_off != dpms_off) {
stream->dpms_off = dpms_off;
if (dpms_off)