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:
47ed324
)
drm/i915: fix a read size argument
author
Dan Carpenter
<
[email protected]
>
Thu, 13 Oct 2016 08:55:08 +0000
(11:55 +0300)
committer
Jani Nikula
<
[email protected]
>
Fri, 28 Oct 2016 12:19:12 +0000
(15:19 +0300)
We want to read 3 bytes here, but because the parenthesis are in the
wrong place we instead read:
sizeof(intel_dp->edp_dpcd) == sizeof(intel_dp->edp_dpcd)
which is one byte.
Fixes: fe5a66f91c88 ("drm/i915: Read PSR caps/intermediate freqs/etc. only once on eDP")
Reviewed-by: Chris Wilson <
[email protected]
>
Cc: <
[email protected]
>
Signed-off-by: Dan Carpenter <
[email protected]
>
Signed-off-by: Daniel Vetter <
[email protected]
>
Link:
http://patchwork.freedesktop.org/patch/msgid/20161013085508.GJ16198@mwanda
(cherry picked from commit
f7170e2eb8f6bf7ef2032cc0659cd38740bf5b97
)
Signed-off-by: Jani Nikula <
[email protected]
>
drivers/gpu/drm/i915/intel_dp.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/i915/intel_dp.c
b/drivers/gpu/drm/i915/intel_dp.c
index 14a3cf0b72133a2734cb98059fbdd524578dc392..ee8aa95967deb4c394de7561900a5555be3110a3 100644
(file)
--- a/
drivers/gpu/drm/i915/intel_dp.c
+++ b/
drivers/gpu/drm/i915/intel_dp.c
@@
-3551,8
+3551,8
@@
intel_edp_init_dpcd(struct intel_dp *intel_dp)
/* Read the eDP Display control capabilities registers */
if ((intel_dp->dpcd[DP_EDP_CONFIGURATION_CAP] & DP_DPCD_DISPLAY_CONTROL_CAPABLE) &&
drm_dp_dpcd_read(&intel_dp->aux, DP_EDP_DPCD_REV,
- intel_dp->edp_dpcd, sizeof(intel_dp->edp_dpcd) ==
- sizeof(intel_dp->edp_dpcd))
)
+ intel_dp->edp_dpcd, sizeof(intel_dp->edp_dpcd)
)
==
+ sizeof(intel_dp->edp_dpcd))
DRM_DEBUG_KMS("EDP DPCD : %*ph\n", (int) sizeof(intel_dp->edp_dpcd),
intel_dp->edp_dpcd);