Commit a8b0032
drm/i915/power: fix size for for_each_set_bit() in abox iteration
[ Upstream commit cfa7b76 ]
for_each_set_bit() expects size to be in bits, not bytes. The abox mask
iteration uses bytes, but it works by coincidence, because the local
variable holding the mask is unsigned long, and the mask only ever has
bit 2 as the highest bit. Using a smaller type could lead to subtle and
very hard to track bugs.
Fixes: 62afef2 ("drm/i915/rkl: RKL uses ABOX0 for pixel transfers")
Cc: Ville Syrjälä <[email protected]>
Cc: Matt Roper <[email protected]>
Cc: [email protected] # v5.9+
Reviewed-by: Matt Roper <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jani Nikula <[email protected]>
(cherry picked from commit 7ea3baa)
Signed-off-by: Tvrtko Ursulin <[email protected]>
[ adapted struct intel_display *display parameters to struct drm_i915_private *dev_priv ]
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent f1b3497 commit a8b0032
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5293 | 5293 | | |
5294 | 5294 | | |
5295 | 5295 | | |
5296 | | - | |
| 5296 | + | |
5297 | 5297 | | |
5298 | 5298 | | |
5299 | 5299 | | |
| |||
5754 | 5754 | | |
5755 | 5755 | | |
5756 | 5756 | | |
5757 | | - | |
| 5757 | + | |
5758 | 5758 | | |
5759 | 5759 | | |
5760 | 5760 | | |
5761 | | - | |
| 5761 | + | |
5762 | 5762 | | |
5763 | 5763 | | |
5764 | 5764 | | |
| |||
0 commit comments