drm/i915: fix intel_framebuffer_pitch_for_width for <8bpp
Subsystems (2)
PATCH 1/1 drm/i915: fix intel_framebuffer_pitch_for_width for <8bpp
As Imre pointed out, this will do the wrong thing.
Reported-by Imre Deak <[email protected]>
Signed-off-by Jesse Barnes <[email protected]>
--- drivers/gpu/drm/i915/intel_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_drv.h +1 -1
@@ -137,7 +137,7 @@ struct intel_framebuffer {inline static u32 intel_framebuffer_pitch_for_width (int width,int bpp) { -u32 pitch =DIV_ROUND_UP (width * bpp,8 ); +u32 pitch = width *DIV_ROUND_UP (bpp,8 );return ALIGN (pitch,64 ); }
Signature · 1 line
1.7.9.5
Quoted 4 lines · Jesse Barnes
As Imre pointed out, this will do the wrong thing.
Reported-by Imre Deak <[email protected]>Signed-off-by Jesse Barnes <[email protected]>
We don't actually support anything w/ bpp%8!=0, so either works. Actually, for something like bpp=4, the original code might even be more correct. But I don't really want to think about <8bpp stuff, so I won't object to the patch.
Quoted 24 lines
--- drivers/gpu/drm/i915/intel_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/intel_drv.h +1
-1@@ -137,7 +137,7 @@ struct intel_framebuffer {inline static u32 intel_framebuffer_pitch_for_width (int width,int bpp) { -u32 pitch =DIV_ROUND_UP (width * bpp,8 ); +u32 pitch = width *DIV_ROUND_UP (bpp,8 );return ALIGN (pitch,64 ); }Signature · 6 lines
1.7.9.5 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Ville Syrjälä Intel OTC