From: Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay@intel.com> To: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, chris@chris-wilson.co.uk Subject: [PATCH] drm/vgem: Use 256B aligned pitch Date: Wed, 30 Jun 2021 17:32:15 +0530 [thread overview] Message-ID: <20210630120215.930829-1-tejaskumarx.surendrakumar.upadhyay@intel.com> (raw) Having different alignment requirement by different drivers, 256B aligned should work for all drm drivers. Signed-off-by: Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay@intel.com> --- drivers/gpu/drm/vgem/vgem_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c index bf38a7e319d1..1da6df5e256a 100644 --- a/drivers/gpu/drm/vgem/vgem_drv.c +++ b/drivers/gpu/drm/vgem/vgem_drv.c @@ -215,7 +215,7 @@ static int vgem_gem_dumb_create(struct drm_file *file, struct drm_device *dev, struct drm_gem_object *gem_object; u64 pitch, size; - pitch = args->width * DIV_ROUND_UP(args->bpp, 8); + pitch = ALIGN(args->width * DIV_ROUND_UP(args->bpp, 8), 256); size = args->height * pitch; if (size == 0) return -EINVAL; -- 2.31.1
WARNING: multiple messages have this Message-ID (diff)
From: Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay@intel.com> To: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, chris@chris-wilson.co.uk Subject: [Intel-gfx] [PATCH] drm/vgem: Use 256B aligned pitch Date: Wed, 30 Jun 2021 17:32:15 +0530 [thread overview] Message-ID: <20210630120215.930829-1-tejaskumarx.surendrakumar.upadhyay@intel.com> (raw) Having different alignment requirement by different drivers, 256B aligned should work for all drm drivers. Signed-off-by: Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay@intel.com> --- drivers/gpu/drm/vgem/vgem_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c index bf38a7e319d1..1da6df5e256a 100644 --- a/drivers/gpu/drm/vgem/vgem_drv.c +++ b/drivers/gpu/drm/vgem/vgem_drv.c @@ -215,7 +215,7 @@ static int vgem_gem_dumb_create(struct drm_file *file, struct drm_device *dev, struct drm_gem_object *gem_object; u64 pitch, size; - pitch = args->width * DIV_ROUND_UP(args->bpp, 8); + pitch = ALIGN(args->width * DIV_ROUND_UP(args->bpp, 8), 256); size = args->height * pitch; if (size == 0) return -EINVAL; -- 2.31.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2021-06-30 12:11 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-06-30 12:02 Tejas Upadhyay [this message] 2021-06-30 12:02 ` [Intel-gfx] [PATCH] drm/vgem: Use 256B aligned pitch Tejas Upadhyay 2021-06-30 12:21 ` Daniel Vetter 2021-06-30 12:21 ` Daniel Vetter 2021-06-30 12:46 ` Surendrakumar Upadhyay, TejaskumarX 2021-06-30 12:46 ` Surendrakumar Upadhyay, TejaskumarX 2021-06-30 14:03 ` Daniel Vetter 2021-06-30 14:03 ` Daniel Vetter 2021-06-30 17:41 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork 2021-07-01 0:56 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210630120215.930829-1-tejaskumarx.surendrakumar.upadhyay@intel.com \ --to=tejaskumarx.surendrakumar.upadhyay@intel.com \ --cc=chris@chris-wilson.co.uk \ --cc=dri-devel@lists.freedesktop.org \ --cc=intel-gfx@lists.freedesktop.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.