OSDN Git Service

minigbm: fix stride logic
[android-x86/external-minigbm.git] / drv.c
diff --git a/drv.c b/drv.c
index 667151d..1b94bd6 100644 (file)
--- a/drv.c
+++ b/drv.c
@@ -506,8 +506,8 @@ uint32_t drv_resolve_format(struct driver *drv, uint32_t format)
  */
 int drv_stride_from_format(uint32_t format, uint32_t width, size_t plane)
 {
-       int stride = width * DIV_ROUND_UP(drv_bpp_from_format(format, plane),
-                                         8);
+       int stride = DIV_ROUND_UP(width * drv_bpp_from_format(format, plane),
+                                 8);
 
        /*
         * Only downsample for certain multiplanar formats which have horizontal